public function addAnnotation()
    {
        if ($_SERVER["REQUEST_METHOD"] == "POST") {
            $this->checkTokenInUrl();

            // the date used is for the annotation manager HTML that gets echo'd. we
            // use this date for the new annotation, unless it is a date range, in
            // which case we use the first date of the range.
            $date = Common::getRequestVar('date');
            if (strpos($date, ',') !== false) {
                $date = reset(explode(',', $date));
            }

            // add the annotation. NOTE: permissions checked in API method
            Request::processRequest("Annotations.add", array('date' => $date));

            $managerDate = Common::getRequestVar('managerDate', false);
            $managerPeriod = Common::getRequestVar('managerPeriod', false);
            return $this->getAnnotationManager($fetch = true, $managerDate, $managerPeriod);
        }
    }