/** * This function starts the chain of calls needed to show any submissions * needing moderation for the plugins. * * @return string returns list of items needing moderation for plugins * */ function PLG_showModerationList($token) { global $_PLUGINS; // needed until story becomes a plugin // also ensures that story moderation is always first // here is where it might be handy to control plugin order ... $retval = MODERATE_itemList('story', $token); foreach ($_PLUGINS as $pi_name) { $retval .= MODERATE_itemList($pi_name, $token); } return $retval; }
/** * Generates a series of moderation list for the various object types * * This is the primary function called for the Submissions panel * */ function MODERATE_submissions() { global $_CONF, $LANG01, $LANG29, $LANG_ADMIN, $_IMAGE_TYPE; $retval = COM_startBlock($LANG01[10], '', COM_getBlockTemplate('_admin_block', 'header')); $menu_arr = array(array('url' => $_CONF['site_admin_url'], 'text' => $LANG_ADMIN['admin_home'])); $retval .= ADMIN_createMenu($menu_arr, $LANG29['info'], $_CONF['layout_url'] . '/images/icons/moderation.' . $_IMAGE_TYPE); $token = SEC_createToken(); // user submissions $retval .= MODERATE_ismoderator_user() && MODERATE_submissioncount_user() > 0 && $_CONF['usersubmission'] == 1 ? MODERATE_itemList('user', $token) : ''; // draft story submissions $retval .= plugin_ismoderator_story() && MODERATE_submissioncount_draftstory() > 0 && $_CONF['listdraftstories'] == 1 ? MODERATE_itemList('draftstory', $token) : ''; // story & plugin submissions $retval .= PLG_showModerationList($token); // if empty at this point, we have no submissions to moderate $retval .= empty($retval) ? '<br /><p>' . $LANG29[39] . '</p>' : ''; $retval .= COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer')); return $retval; }