<?php if (!defined('PHORUM') || phorum_page !== 'moderation') { return; } phorum_api_thread_set_sort($msgthd_id, PHORUM_SORT_DEFAULT); $PHORUM['DATA']['OKMSG'] = $PHORUM['DATA']['LANG']['MsgUnstickyOk']; $PHORUM['DATA']["URL"]["REDIRECT"] = phorum_moderation_back_url(); /* * [hook] * make_sticky * * [description] * This hook can be used for performing actions like sending * notifications or making log entries after making a message sticky. * * [category] * Moderation * * [when] * In <filename>include/moderation/make_sticky.php</filename>, * right after a message has been made sticky by a moderator. * * [input] * The id of the thread that has to be made sticky. * * [output] * Same as input. * * [example] * <hookcode>
include PHORUM_PATH . '/include/moderation/split_thread.php'; break; case PHORUM_DO_THREAD_SPLIT: // this is the last step of a thread split include PHORUM_PATH . '/include/moderation/do_thread_split.php'; break; case PHORUM_MAKE_STICKY: // make a thread sticky include PHORUM_PATH . '/include/moderation/make_sticky.php'; break; case PHORUM_MAKE_UNSTICKY: // make a thread unsticky 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); } } }