aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2006-08-09 21:03:46 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2006-08-09 21:03:46 +0000
commit53085a4c78b3004d1e4adf8e06b0617f7f8a288b (patch)
tree142b5ee82ce545e4c141b87664ec3bad76a8d255 /phpBB/includes/functions_posting.php
parentb470f34807dc2e54be72d26ae354ee0be2e1c7dc (diff)
downloadforums-53085a4c78b3004d1e4adf8e06b0617f7f8a288b.tar
forums-53085a4c78b3004d1e4adf8e06b0617f7f8a288b.tar.gz
forums-53085a4c78b3004d1e4adf8e06b0617f7f8a288b.tar.bz2
forums-53085a4c78b3004d1e4adf8e06b0617f7f8a288b.tar.xz
forums-53085a4c78b3004d1e4adf8e06b0617f7f8a288b.zip
- load tracking updates. Need to be tested on a clean installation too - at the moment only tiny quirks are noticed at area51.
- reported bugs fixed git-svn-id: file:///svn/phpbb/trunk@6256 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 87a7b63533..3fe1fbab9f 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1905,6 +1905,35 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
// We do not use post_time here, this is intended (post_time can have a date in the past if editing a message)
markread('topic', $data['forum_id'], $data['topic_id'], time());
+ //
+ if ($config['load_db_lastread'] && $user->data['is_registered'])
+ {
+ $sql = 'SELECT mark_time
+ FROM ' . FORUMS_TRACK_TABLE . '
+ WHERE user_id = ' . $user->data['user_id'] . '
+ AND forum_id = ' . $data['forum_id'];
+ $result = $db->sql_query($sql);
+ $f_mark_time = (int) $db->sql_fetchfield('mark_time');
+ $db->sql_freeresult($result);
+ }
+ else if ($config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ $f_mark_time = false;
+ }
+
+ if ($config['load_db_lastread'] || $config['load_anon_lastread'] || $user->data['is_registered'])
+ {
+ // Update forum info
+ $sql = 'SELECT forum_last_post_time
+ FROM ' . FORUMS_TABLE . '
+ WHERE forum_id = ' . $data['forum_id'];
+ $result = $db->sql_query($sql);
+ $forum_last_post_time = (int) $db->sql_fetchfield('forum_last_post_time');
+ $db->sql_freeresult($result);
+
+ update_forum_tracking_info($data['forum_id'], $forum_last_post_time, $f_mark_time, false);
+ }
+
// Send Notifications
if ($mode != 'edit' && $mode != 'delete' && ($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])))
{