public static function onActionLegacy($core, dcPostsActionsPage $as, $post) { $core->callBehavior('adminPostsActions', $core, $as->getRS(), $as->getAction(), $as->getRedirection()); $as->beginPage('', dcPage::jsLoad('js/jquery/jquery.autocomplete.js') . dcPage::jsMetaEditor() . $core->callBehavior('adminPostsActionsHeaders'), ''); $core->callBehavior('adminPostsActionsContent', $core, $as->getAction(), $as->getHiddenFields(true)); $as->endPage(); }
public static function doUpdateSelectedPost($core, dcPostsActionsPage $ap, $post) { $posts_ids = $ap->getIDs(); if (empty($posts_ids)) { throw new Exception(__('No entry selected')); } $action = $ap->getAction(); $core->blog->updPostsSelected($posts_ids, $action == 'selected'); if ($action == 'selected') { dcPage::addSuccessNotice(sprintf(__('%d entry has been successfully marked as selected', '%d entries have been successfully marked as selected', count($posts_ids)), count($posts_ids))); } else { dcPage::addSuccessNotice(sprintf(__('%d entry has been successfully marked as unselected', '%d entries have been successfully marked as unselected', count($posts_ids)), count($posts_ids))); } $ap->redirect(true); }