/** * @deprecated Replaced by {@link phorum_api_forums_tree()}. */ function phorum_build_forum_list() { require_once PHORUM_PATH . '/include/api/forums.php'; return phorum_api_forums_tree(); }
if (!defined('PHORUM') || phorum_page !== 'moderation') { return; } $message = $PHORUM['DB']->get_message($msgthd_id); $PHORUM['DATA']['HEADING'] = $PHORUM['DATA']['LANG']['Moderate'] . ': ' . $PHORUM['DATA']['LANG']['MoveThread']; $PHORUM['DATA']['URL']["ACTION"] = phorum_api_url(PHORUM_MODERATION_ACTION_URL); $PHORUM['DATA']["FORM"]["forum_id"] = $PHORUM["forum_id"]; $PHORUM['DATA']["FORM"]["thread_id"] = $msgthd_id; $PHORUM['DATA']["FORM"]["mod_step"] = PHORUM_DO_THREAD_MOVE; $PHORUM['DATA']["FORM"]["subject"] = htmlspecialchars($message["subject"], ENT_COMPAT, $PHORUM["DATA"]["HCHARSET"]); // get all the forums the moderator may move to $PHORUM['DATA']["MoveForumsOption"] = ""; // TODO: this does not match the check at the start of the read // TODO: and list scripts, where we check if this user has perms // TODO: for moderation of two or more forums, before we // TODO: enable the move feature. We should either check // TODO: for 2 or more moderated forums and check that moving // TODO: is only done between moderated forums or check for // TODO: 1 or more moderated forums and allow moving between // TODO: any two forums. Now we have a mix of those two. // add && phorum_api_user_check_access(PHORUM_USER_ALLOW_MODERATE_MESSAGES, $id) if the // mod should only be able to move to forums he also moderates // get the forumlist $forums = phorum_api_forums_tree(); // ignore the current forum unset($forums[$PHORUM['forum_id']]); $PHORUM['DATA']['FORUMS'] = $forums; $PHORUM['DATA']['FRM'] = 1; // Include the 'message' template, which is used by the // do_thread_move.php script to handle error reporting. $template = isset($PHORUM['DATA']['ERROR']) ? array('message', 'move_form') : 'move_form';
} } else { // Set cursor focus to message search entry. $PHORUM["DATA"]["FOCUS_TO_ID"] = 'phorum_search_message'; if (isset($PHORUM["hooks"]["search_start"])) { $PHORUM['args'] = phorum_api_hook('search_start', $PHORUM['args']); } } $PHORUM["DATA"]["URL"]["ACTION"] = phorum_api_url(PHORUM_SEARCH_ACTION_URL); $PHORUM["DATA"]["SEARCH"]["forum_id"] = $PHORUM["forum_id"]; $PHORUM["DATA"]["SEARCH"]["match_type"] = $PHORUM["args"]["match_type"]; $PHORUM["DATA"]["SEARCH"]["match_dates"] = $PHORUM["args"]["match_dates"]; $PHORUM["DATA"]["SEARCH"]["match_forum"] = $PHORUM["args"]["match_forum"]; $PHORUM["DATA"]["SEARCH"]["match_threads"] = (int) $PHORUM["args"]["match_threads"]; require_once './include/api/forums.php'; $PHORUM["DATA"]["SEARCH"]["forum_list"] = phorum_api_forums_tree(); if (isset($PHORUM["args"]["match_forum"])) { $match_forum = is_array($PHORUM['args']['match_forum']) ? $PHORUM['args']['match_forum'] : explode(",", $PHORUM["args"]["match_forum"]); foreach ($PHORUM["DATA"]["SEARCH"]["forum_list"] as $key => $list_item) { if (in_array($list_item["forum_id"], $match_forum)) { $PHORUM["DATA"]["SEARCH"]["forum_list"][$key]["selected"] = true; } } } $PHORUM["DATA"]["SEARCH"]["forum_list_length"] = min(10, count($PHORUM["DATA"]["SEARCH"]["forum_list"]) + 1); if ($PHORUM["args"]["match_type"] == "USER_ID") { $search_user = phorum_api_user_get((int) $phorum_author); if (!$search_user) { $search_name = $PHORUM["DATA"]["LANG"]["AnonymousUser"]; } else { $search_name = $search_user["display_name"];