src/Gn36/OoPostingApi/topic.php
function bump($user_id = 0)
	{
		global $db, $user;

		$current_time = time();
		if ($user_id == 0)
			$user_id = $user->data['user_id'];

		$db->sql_transaction('begin');

		$sql = 'UPDATE ' . POSTS_TABLE . "
		SET post_time = $current_time
		WHERE post_id = {$this->topic_last_post_id}
		AND topic_id = {$this->topic_id}";
		$db->sql_query($sql);

		$this->topic_bumped = 1;
		$this->topic_bumper = $user_id;
		$this->topic_last_post_time = $current_time;
		$sql = 'UPDATE ' . TOPICS_TABLE . "
		SET topic_last_post_time = $current_time,
		topic_bumped = 1,
		topic_bumper = $user_id
		WHERE topic_id = $topic_id";
		$db->sql_query($sql);

		update_post_information('forum', $this->forum_id);

		$sql = 'UPDATE ' . USERS_TABLE . "
		SET user_lastpost_time = $current_time
		WHERE user_id = $user_id";
		$db->sql_query($sql);

		$db->sql_transaction('commit');

		markread('post', $this->forum_id, $this->topic_id, $current_time, $user_id);

		add_log('mod', $this->forum_id, $this->topic_id, 'LOG_BUMP_TOPIC', $this->topic_title);
	}
function bump($user_id = 0)
	{
		global $db, $user;

		$current_time = time();
		if ($user_id == 0)
			$user_id = $user->data['user_id'];

		$db->sql_transaction('begin');

		$sql = 'UPDATE ' . POSTS_TABLE . "
		SET post_time = $current_time
		WHERE post_id = {$this->topic_last_post_id}
		AND topic_id = {$this->topic_id}";
		$db->sql_query($sql);

		$this->topic_bumped = 1;
		$this->topic_bumper = $user_id;
		$this->topic_last_post_time = $current_time;
		$sql = 'UPDATE ' . TOPICS_TABLE . "
		SET topic_last_post_time = $current_time,
		topic_bumped = 1,
		topic_bumper = $user_id
		WHERE topic_id = $topic_id";
		$db->sql_query($sql);

		update_post_information('forum', $this->forum_id);

		$sql = 'UPDATE ' . USERS_TABLE . "
		SET user_lastpost_time = $current_time
		WHERE user_id = $user_id";
		$db->sql_query($sql);

		$db->sql_transaction('commit');

		markread('post', $this->forum_id, $this->topic_id, $current_time, $user_id);

		add_log('mod', $this->forum_id, $this->topic_id, 'LOG_BUMP_TOPIC', $this->topic_title);
	}
function bump ( $ user_id = 0 ) { global $ db , $ user ; $ current_time = time ( ) ; if ( $ user_id == 0 ) $ user_id = $ user -> data [ 'user_id' ] ; $ db -> sql_transaction ( 'begin' ) ; $ sql = 'UPDATE ' . POSTS_TABLE . "
		SET post_time = $current_time
		WHERE post_id = {$this->topic_last_post_id}
		AND topic_id = {$this->topic_id}" ; $ db -> sql_query ( $ sql ) ; $ this -> topic_bumped = 1 ; $ this -> topic_bumper = $ user_id ; $ this -> topic_last_post_time = $ current_time ; $ sql = 'UPDATE ' . TOPICS_TABLE . "
		SET topic_last_post_time = $current_time,
		topic_bumped = 1,
		topic_bumper = $user_id
		WHERE topic_id = $topic_id" ; $ db -> sql_query ( $ sql ) ; update_post_information ( 'forum' , $ this -> forum_id ) ; $ sql = 'UPDATE ' . USERS_TABLE . "
		SET user_lastpost_time = $current_time
		WHERE user_id = $user_id" ; $ db -> sql_query ( $ sql ) ; $ db -> sql_transaction ( 'commit' ) ; markread ( 'post' , $ this -> forum_id , $ this -> topic_id , $ current_time , $ user_id ) ; add_log ( 'mod' , $ this -> forum_id , $ this -> topic_id , 'LOG_BUMP_TOPIC' , $ this -> topic_title ) ; }
bumps the topic

@param
bumps the topic