* $dbmessage["user_id"] * ); * } * * return $dbmessage; * } * </hookcode> */ if (isset($PHORUM["hooks"]["after_edit"])) { phorum_api_hook("after_edit", $dbmessage, $origmessage); } // remove the message from the cache if caching is enabled // no need to clear the thread-index as the message has only been changed if ($PHORUM['cache_messages']) { phorum_api_cache_remove('message', $PHORUM["forum_id"] . "-" . $message["message_id"]); phorum_api_forums_increment_cache_version($PHORUM['forum_id']); } // Update children to the same sort setting. if (!$message["parent_id"] && $origmessage["sort"] != $dbmessage["sort"]) { $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_api_cache_remove('message', $PHORUM["forum_id"] . "-" . $message_id); } } } }
include PHORUM_PATH . '/include/moderation/make_unsticky.php'; break; default: phorum_api_redirect(phorum_moderation_back_url()); } // Remove the affected messages from the cache if caching is enabled. if ($PHORUM['cache_messages']) { $invalidate_forums = array(); foreach ($invalidate_message_cache as $message) { phorum_api_cache_remove('message', $message['forum_id'] . "-" . $message["message_id"]); $invalidate_forums[$message['forum_id']] = $message['forum_id']; } if (is_array($invalidate_forums) && count($invalidate_forums)) { // increment the cache version for all involved forums once foreach ($invalidate_forums as $forum_id) { phorum_api_forums_increment_cache_version($forum_id); } } } if (!isset($PHORUM['DATA']['BACKMSG'])) { $PHORUM['DATA']["BACKMSG"] = $PHORUM['DATA']["LANG"]["BacktoForum"]; } phorum_api_output($template); // ---------------------------------------------------------------------- // Functions // ---------------------------------------------------------------------- /** * Outputs a confirmation form. * * To maintain backwards compatibility with the templates, * we generate a form in code and output it using stdblock.