aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/posting.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2011-06-10 00:24:43 +0200
committerNils Adermann <naderman@naderman.de>2011-06-10 00:24:43 +0200
commit5b701dc3ed83345c70eabc1d88a721a7df8e43e5 (patch)
tree11b383fdaa32a7b0c5dd16037273d510ab31431b /phpBB/posting.php
parent4f4c3220ad51389c2e08e7f5909ec6010974e76f (diff)
parent7f3d6150fc636289a4739a90403201076a5085e4 (diff)
downloadforums-5b701dc3ed83345c70eabc1d88a721a7df8e43e5.tar
forums-5b701dc3ed83345c70eabc1d88a721a7df8e43e5.tar.gz
forums-5b701dc3ed83345c70eabc1d88a721a7df8e43e5.tar.bz2
forums-5b701dc3ed83345c70eabc1d88a721a7df8e43e5.tar.xz
forums-5b701dc3ed83345c70eabc1d88a721a7df8e43e5.zip
Merge branch 'ticket/rxu/6712' into develop-olympus
* ticket/rxu/6712: [ticket/6712] Properly explain result of setting the bump interval to 0. [ticket/6712] Add phpbb_ function name prefix, more docs, rename current_time [ticket/6712] Pass $post_data by the value instead of by the reference. [ticket/6712] Bump does not create new topic icon on index.
Diffstat (limited to 'phpBB/posting.php')
-rw-r--r--phpBB/posting.php30
1 files changed, 1 insertions, 29 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index d05abc6a0e..1bc498efe7 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -321,35 +321,7 @@ if ($mode == 'bump')
if ($bump_time = bump_topic_allowed($forum_id, $post_data['topic_bumped'], $post_data['topic_last_post_time'], $post_data['topic_poster'], $post_data['topic_last_poster_id'])
&& check_link_hash(request_var('hash', ''), "topic_{$post_data['topic_id']}"))
{
- $db->sql_transaction('begin');
-
- $sql = 'UPDATE ' . POSTS_TABLE . "
- SET post_time = $current_time
- WHERE post_id = {$post_data['topic_last_post_id']}
- AND topic_id = $topic_id";
- $db->sql_query($sql);
-
- $sql = 'UPDATE ' . TOPICS_TABLE . "
- SET topic_last_post_time = $current_time,
- topic_bumped = 1,
- topic_bumper = " . $user->data['user_id'] . "
- WHERE topic_id = $topic_id";
- $db->sql_query($sql);
-
- update_post_information('forum', $forum_id);
-
- $sql = 'UPDATE ' . USERS_TABLE . "
- SET user_lastpost_time = $current_time
- WHERE user_id = " . $user->data['user_id'];
- $db->sql_query($sql);
-
- $db->sql_transaction('commit');
-
- markread('post', $forum_id, $topic_id, $current_time);
-
- add_log('mod', $forum_id, $topic_id, 'LOG_BUMP_TOPIC', $post_data['topic_title']);
-
- $meta_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&amp;t=$topic_id&amp;p={$post_data['topic_last_post_id']}") . "#p{$post_data['topic_last_post_id']}";
+ $meta_url = phpbb_bump_topic($forum_id, $topic_id, $post_data, $current_time);
meta_refresh(3, $meta_url);
$message = $user->lang['TOPIC_BUMPED'] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $meta_url . '">', '</a>');