Beispiel #1
0
 }
 // increment the post counter of the surfer
 Users::increment_posts(Surfer::get_id());
 // do whatever is necessary on page publication
 if (isset($_REQUEST['publish_date']) && $_REQUEST['publish_date'] > NULL_DATE) {
     Articles::finalize_publication($anchor, $_REQUEST, $overlay, isset($_REQUEST['silent']) && $_REQUEST['silent'] == 'Y', isset($_REQUEST['notify_followers']) && $_REQUEST['notify_followers'] == 'Y');
     // else do whatever is necessary on page submission
 } else {
     Articles::finalize_submission($anchor, $_REQUEST, $overlay);
 }
 // get the new item
 $article = Anchors::get('article:' . $_REQUEST['id'], TRUE);
 // list persons that have been notified
 $context['text'] .= Mailer::build_recipients('article:' . $_REQUEST['id']);
 // list endpoints that have been notified
 $context['text'] .= Servers::build_endpoints(i18n::s('Servers that have been notified'));
 // follow-up commands
 $follow_up = i18n::s('What do you want to do now?');
 $menu = array();
 $menu = array_merge($menu, array($article->get_url() => i18n::s('View the page')));
 if (Surfer::may_upload()) {
     $menu = array_merge($menu, array('files/edit.php?anchor=' . urlencode('article:' . $_REQUEST['id']) => i18n::s('Add a file')));
 }
 if ((!isset($_REQUEST['publish_date']) || $_REQUEST['publish_date'] <= NULL_DATE) && Surfer::is_empowered()) {
     $menu = array_merge($menu, array(Articles::get_url($_REQUEST['id'], 'publish') => i18n::s('Publish the page')));
 }
 if (is_object($anchor) && Surfer::is_empowered()) {
     $menu = array_merge($menu, array('articles/edit.php?anchor=' . urlencode($anchor->get_reference()) => i18n::s('Add another page')));
 }
 $follow_up .= Skin::build_list($menu, 'menu_bar');
 $context['text'] .= Skin::build_block($follow_up, 'bottom');