Topic watch fix

Мелкий фикс запроса.
This commit is contained in:
Exile 2014-08-19 01:55:16 +04:00
commit 48c5e149c2
2 changed files with 4 additions and 4 deletions

View file

@ -69,8 +69,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do
// Version info // Version info
$bb_cfg['tp_version'] = '2.0.9 (RC)'; $bb_cfg['tp_version'] = '2.0.9 (RC)';
$bb_cfg['tp_release_date'] = '14-08-2014'; $bb_cfg['tp_release_date'] = '19-08-2014';
$bb_cfg['tp_release_state'] = 'R595'; $bb_cfg['tp_release_state'] = 'R596';
// Database // Database
$charset = 'utf8'; $charset = 'utf8';

View file

@ -93,7 +93,7 @@ if ($topic_id)
$sql = "SELECT t.*, f.*, tw.notify_status $sql = "SELECT t.*, f.*, tw.notify_status
FROM ". BB_TOPICS ." t FROM ". BB_TOPICS ." t
LEFT JOIN ". BB_FORUMS ." f USING(forum_id) LEFT JOIN ". BB_FORUMS ." f USING(forum_id)
LEFT JOIN ". BB_TOPICS_WATCH ." tw ON(tw.topic_id = t.topic_id AND user_id = {$userdata['user_id']}) LEFT JOIN ". BB_TOPICS_WATCH ." tw ON(tw.topic_id = t.topic_id AND tw.user_id = {$userdata['user_id']})
WHERE t.topic_id = $topic_id WHERE t.topic_id = $topic_id
"; ";
} }
@ -103,7 +103,7 @@ elseif ($post_id)
FROM ". BB_TOPICS ." t FROM ". BB_TOPICS ." t
LEFT JOIN ". BB_FORUMS ." f USING(forum_id) LEFT JOIN ". BB_FORUMS ." f USING(forum_id)
LEFT JOIN ". BB_POSTS ." p USING(topic_id) LEFT JOIN ". BB_POSTS ." p USING(topic_id)
LEFT JOIN ". BB_TOPICS_WATCH ." tw ON(tw.topic_id = t.topic_id AND user_id = {$userdata['user_id']}) LEFT JOIN ". BB_TOPICS_WATCH ." tw ON(tw.topic_id = t.topic_id AND tw.user_id = {$userdata['user_id']})
WHERE p.post_id = $post_id WHERE p.post_id = $post_id
"; ";
} }