Sources/BestAnswer/Actions.php
/**
	 * Unmarks the best answer of a topic
	 *
	 * @hook integrate_display_topic
	 */
Unmarks the best answer of a topic
@hook integrate_display_topic
Unmarks the best answer of a topic @hook integrate_display_topic
public static function unmarkBestAnswer()
	{
		global $context, $smcFunc;
		if (!isset($_GET['unmark_best_answer']))
			return;
		checkSession('get');
		self::$policy->assertCanMarkBestAnswer();
		$smcFunc['db_query']('', '
			UPDATE {db_prefix}topics
			SET id_best_msg = {int:best_answer}
			WHERE id_topic = {int:current_topic}',
			array(
				'best_answer' => 0,
				'current_topic' => (int) $context['current_topic'],
			)
		);
		redirectexit("topic={$context['current_topic']}");
	}
public static function unmarkBestAnswer ( ) { global $ context , $ smcFunc ; if ( ! isset ( $ _GET [ 'unmark_best_answer' ] ) ) return ; checkSession ( 'get' ) ; self :: $ policy -> assertCanMarkBestAnswer ( ) ; $ smcFunc [ 'db_query' ] ( '' , '
			UPDATE {db_prefix}topics
			SET id_best_msg = {int:best_answer}
			WHERE id_topic = {int:current_topic}' , array ( 'best_answer' => 0 , 'current_topic' => ( int ) $ context [ 'current_topic' ] , ) ) ; redirectexit ( " topic= { $ context [ 'current_topic' ] } " ) ; }
Unmarks the best answer of a topic
 @hook integrate_display_topic
Unmarks the best answer of a topic @hook integrate_display_topic