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; case "message": if ($PHORUM["DATA"]["OPTION_ALLOWED"]["subscribe_mail"]) {
* // Log the closed thread id * $PHORUM["mod_foo"]["closed_threads"][] = $msgthd_id; * phorum_db_update_settings(array("mod_foo" => $PHORUM["mod_foo"])); * } * </hookcode> */ if (isset($PHORUM["hooks"]["close_thread"])) { phorum_hook("close_thread", $msgthd_id); } $invalidate_message_cache[] = array("message_id" => $msgthd_id, "forum_id" => $PHORUM["forum_id"]); break; case PHORUM_REOPEN_THREAD: // we have to reopen a thread $PHORUM['DATA']['OKMSG'] = $PHORUM["DATA"]['LANG']['ThreadReopenedOk']; $PHORUM['DATA']["URL"]["REDIRECT"] = $PHORUM["DATA"]["URL"]["LIST"]; phorum_db_reopen_thread($msgthd_id); /* * [hook] * reopen_thread * * [description] * This hook can be used for performing actions like sending * notifications or making log entries after reopening threads. * * [category] * Moderation * * [when] * In <filename>moderation.php</filename>, right after a thread has * been reopened by a moderator. *