diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-04-11 00:04:19 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-04-11 00:04:19 -0400 |
| commit | 716f514ee9717906e2d62c9c401b78cab80a2141 (patch) | |
| tree | 9ad7f74cf0e2cd6bd81bed133995501d936e217e /phpBB/includes/functions.php | |
| parent | 00a69b43723b89a90bc59763a1cdae9a7001a153 (diff) | |
| parent | ad81637300bfbbb4f18d80cd87326fbc90dd38f8 (diff) | |
| download | forums-716f514ee9717906e2d62c9c401b78cab80a2141.tar forums-716f514ee9717906e2d62c9c401b78cab80a2141.tar.gz forums-716f514ee9717906e2d62c9c401b78cab80a2141.tar.bz2 forums-716f514ee9717906e2d62c9c401b78cab80a2141.tar.xz forums-716f514ee9717906e2d62c9c401b78cab80a2141.zip | |
Merge branch 'ticket/nickvergessen/9684' into develop
* ticket/nickvergessen/9684:
[ticket/9684] Also display forum-name in subsilver2 template
[ticket/9684] Move currently existing GAs to a selectable forum while updating.
[ticket/9684] View origin-forumname for GAs in topic-list
[ticket/9684] Fix Forum/Topic-Tracking for global announcements
[ticket/9684] Fix a SQL-Error in the posting.php
[ticket/9684] Remove code in some more files especially includes/
[ticket/9684] Remove code for global announcement in root-files
Diffstat (limited to 'phpBB/includes/functions.php')
| -rw-r--r-- | phpBB/includes/functions.php | 66 |
1 files changed, 4 insertions, 62 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index f910611b76..0638cfccb6 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -1323,35 +1323,6 @@ function get_topic_tracking($forum_id, $topic_ids, &$rowset, $forum_mark_time, $ { $mark_time = array(); - // Get global announcement info - if ($global_announce_list && sizeof($global_announce_list)) - { - if (!isset($forum_mark_time[0])) - { - global $db; - - $sql = 'SELECT mark_time - FROM ' . FORUMS_TRACK_TABLE . " - WHERE user_id = {$user->data['user_id']} - AND forum_id = 0"; - $result = $db->sql_query($sql); - $row = $db->sql_fetchrow($result); - $db->sql_freeresult($result); - - if ($row) - { - $mark_time[0] = $row['mark_time']; - } - } - else - { - if ($forum_mark_time[0] !== false) - { - $mark_time[0] = $forum_mark_time[0]; - } - } - } - if (!empty($forum_mark_time[$forum_id]) && $forum_mark_time[$forum_id] !== false) { $mark_time[$forum_id] = $forum_mark_time[$forum_id]; @@ -1361,14 +1332,7 @@ function get_topic_tracking($forum_id, $topic_ids, &$rowset, $forum_mark_time, $ foreach ($topic_ids as $topic_id) { - if ($global_announce_list && isset($global_announce_list[$topic_id])) - { - $last_read[$topic_id] = (isset($mark_time[0])) ? $mark_time[0] : $user_lastmark; - } - else - { - $last_read[$topic_id] = $user_lastmark; - } + $last_read[$topic_id] = $user_lastmark; } } @@ -1412,8 +1376,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis $sql = 'SELECT forum_id, mark_time FROM ' . FORUMS_TRACK_TABLE . " WHERE user_id = {$user->data['user_id']} - AND forum_id " . - (($global_announce_list && sizeof($global_announce_list)) ? "IN (0, $forum_id)" : "= $forum_id"); + AND forum_id = $forum_id"; $result = $db->sql_query($sql); $mark_time = array(); @@ -1427,14 +1390,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis foreach ($topic_ids as $topic_id) { - if ($global_announce_list && isset($global_announce_list[$topic_id])) - { - $last_read[$topic_id] = (isset($mark_time[0])) ? $mark_time[0] : $user_lastmark; - } - else - { - $last_read[$topic_id] = $user_lastmark; - } + $last_read[$topic_id] = $user_lastmark; } } } @@ -1472,13 +1428,6 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis if (sizeof($topic_ids)) { $mark_time = array(); - if ($global_announce_list && sizeof($global_announce_list)) - { - if (isset($tracking_topics['f'][0])) - { - $mark_time[0] = base_convert($tracking_topics['f'][0], 36, 10) + $config['board_startdate']; - } - } if (isset($tracking_topics['f'][$forum_id])) { @@ -1489,14 +1438,7 @@ function get_complete_topic_tracking($forum_id, $topic_ids, $global_announce_lis foreach ($topic_ids as $topic_id) { - if ($global_announce_list && isset($global_announce_list[$topic_id])) - { - $last_read[$topic_id] = (isset($mark_time[0])) ? $mark_time[0] : $user_lastmark; - } - else - { - $last_read[$topic_id] = $user_lastmark; - } + $last_read[$topic_id] = $user_lastmark; } } } |
