@@ -125,7 +125,7 @@ class LoadTree extends Action
$query = 'SELECT t.forum_id, t.last_post
FROM ::topics AS t
LEFT JOIN ::mark_of_topic AS mot ON (mot.uid=?i:uid AND mot.tid=t.id)
- WHERE t.forum_id IN(?ai:forums)
+ WHERE t.forum_id IN (?ai:forums)
AND t.moved_to=0
AND t.last_post>?i:max
AND (mot.mt_last_visit IS NULL OR t.last_post>mot.mt_last_visit)';
@@ -58,7 +58,7 @@ class Feed extends Action
p.hide_smilies, p.posted, p.edited, t.id as tid, t.subject as topic_name, t.forum_id as fid
FROM ::posts AS p
INNER JOIN ::topics AS t ON t.id=p.topic_id
ORDER BY p.id DESC
LIMIT 50';
@@ -80,7 +80,7 @@ class Index extends Method
];
$query = 'SELECT sw.word
FROM ::search_words AS sw
- WHERE sw.word IN(?as:words)';
+ WHERE sw.word IN (?as:words)';
$oldWords = $this->c->DB->query($query, $vars)->fetchAll(PDO::FETCH_COLUMN);
$newWords = \array_diff($allWords, $oldWords);
@@ -53,7 +53,7 @@ class CalcStat extends Method
$query = 'SELECT p.id, p.poster, p.poster_id, p.posted, p.edited
- WHERE p.id IN(?ai:ids)';
+ WHERE p.id IN (?ai:ids)';
$result = $this->c->DB->query($query, $vars)->fetchAll(PDO::FETCH_UNIQUE);
@@ -24,6 +24,7 @@ class UpdateLastVisit extends Action
if ($user->isGuest) {
throw new RuntimeException('Expected user');
}
+
if ($user->logged > 0) {
$vars = [
':logged' => $user->logged,
@@ -34,6 +35,7 @@ class UpdateLastVisit extends Action
WHERE id=?i:id AND last_visit<?i:logged';
$this->c->DB->exec($query, $vars);
$user->__last_visit = $user->logged;