예제 #1
0
     $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_build_forum_list();
     // ignore the current forum
     unset($forums[$PHORUM["forum_id"]]);
     $PHORUM['DATA']['FORUMS'] = $forums;
     $PHORUM['DATA']['FRM'] = 1;
     $output = true;
     $template = "move_form";
     break;
 case PHORUM_DO_THREAD_MOVE:
     // this is the last step of a message move
     $movetoid = (int) $_POST['moveto'];
     // only do something if a forum was selected
     if (empty($movetoid)) {
         $PHORUM['DATA']['MESSAGE'] = $PHORUM["DATA"]['LANG']['MsgMoveSelectForum'];
     } else {
         $PHORUM['DATA']['OKMSG'] = $PHORUM["DATA"]['LANG']['MsgMoveOk'];
예제 #2
0
파일: search.php 프로젝트: sheldon/dejavu
        $PHORUM["DATA"]["FOCUS_TO_ID"] = 'phorum_search_message';
    }
} 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_hook('search_start', $PHORUM['args']);
    }
}
$PHORUM["DATA"]["URL"]["ACTION"] = phorum_get_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"];
$PHORUM["DATA"]["SEARCH"]["forum_list"] = phorum_build_forum_list();
if (isset($PHORUM["args"]["match_forum"])) {
    $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;
        }
    }
}
foreach ($PHORUM["DATA"]["SEARCH"]["forum_list"] as $key => $list_item) {
    $PHORUM["DATA"]["SEARCH"]["forum_list"][$key]['indent_spaces'] = str_repeat(" ", $list_item['indent']);
}
$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) {