Skip to content

Commit 3a54d9e

Browse files
authored
Fixed #33 issue not incrementing news view counter
Fixed #33 issue not incrementing news view counter
1 parent d3f6ded commit 3a54d9e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

flatnews/include/news_view.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ function view_news($section, $news, $proposed=FALSE){
252252
else $newsfile = get_news_file($section,$news);
253253

254254
if (!is_file($newsfile)) return;
255+
256+
// add 1 visit to the news (if you aren't admin or moderator)
257+
if (!_FN_IS_ADMIN and !_FN_IS_NEWS_MODERATOR)
258+
news_add_read($section,$news);
255259

256260
// if (!user_can_view_news($section,$news)) return;
257261

0 commit comments

Comments
 (0)