예제 #1
0
    $messages = phorum_db_get_messages($message["thread"], 0);
    unset($messages["users"]);
    foreach ($messages as $message_id => $msg) {
        if ($msg["sort"] != $dbmessage["sort"] || $msg["forum_id"] != $dbmessage["forum_id"]) {
            $msg["sort"] = $dbmessage["sort"];
            phorum_db_update_message($message_id, $msg);
            if ($PHORUM['cache_messages']) {
                phorum_cache_remove('message', $message_id);
            }
        }
    }
}
// Update all thread messages to the same closed setting.
if (!$message["parent_id"] && $origmessage["closed"] != $dbmessage["closed"]) {
    if ($dbmessage["closed"]) {
        phorum_db_close_thread($message["thread"]);
    } else {
        phorum_db_reopen_thread($message["thread"]);
    }
}
// Update thread info.
phorum_update_thread_info($message['thread']);
// Update thread subscription.
if (isset($message["subscription"])) {
    $subscribe_type = NULL;
    switch ($message["subscription"]) {
        case "bookmark":
            if ($PHORUM["DATA"]["OPTION_ALLOWED"]["subscribe"]) {
                $subscribe_type = PHORUM_SUBSCRIPTION_BOOKMARK;
            }
            break;
예제 #2
0
          *     }
          *     </hookcode>
          */
         if (isset($PHORUM["hooks"]["move_thread"])) {
             phorum_hook("move_thread", $msgthd_id);
         }
         foreach ($message['meta']['message_ids'] as $message_id) {
             $invalidate_message_cache[] = array("message_id" => $message_id, "forum_id" => $message['forum_id']);
         }
     }
     break;
 case PHORUM_CLOSE_THREAD:
     // we have to close a thread
     $PHORUM['DATA']['OKMSG'] = $PHORUM["DATA"]['LANG']['ThreadClosedOk'];
     $PHORUM['DATA']["URL"]["REDIRECT"] = $PHORUM["DATA"]["URL"]["LIST"];
     phorum_db_close_thread($msgthd_id);
     /*
      * [hook]
      *     close_thread
      *
      * [description]
      *     This hook can be used for performing actions like sending
      *     notifications or making log entries after closing threads.
      *
      * [category]
      *     Moderation
      *
      * [when]
      *     In <filename>moderation.php</filename>, right after a thread has
      *     been closed by a moderator.
      *