Permalink
Browse files

Disallow visitors without UID to increment view count of topic

Closes #40
  • Loading branch information...
r04r committed Jul 17, 2016
1 parent bd2cb3e commit 9ceee406b0be2b3e71395c9f90b2791242d60fdb
Showing with 1 addition and 1 deletion.
  1. +1 −1 topic.php
@@ -92,7 +92,7 @@ function create_no_link($var)
$page_title = 'Topic: '.htmlspecialchars($topic_headline, ENT_COMPAT | ENT_HTML401, '');
// Increment visit count.
if (!isset($visited_topics[$_GET['id']])) {
if ($_SESSION['UID'] && !isset($visited_topics[$_GET['id']])) {
$link->db_exec('UPDATE topics SET visits = visits + 1 WHERE id = "%1"', $_GET['id']);
}

0 comments on commit 9ceee40

Please sign in to comment.