[geeklog-hg] geeklog: Fixed view count for article, should not be cached.
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Mon Nov 4 17:24:20 EST 2013
changeset 9331:bf38f4d16001
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/bf38f4d16001
user: Tom <websitemaster at cogeco.net>
date: Mon Nov 04 17:23:43 2013 -0500
description:
Fixed view count for article, should not be cached.
diffstat:
system/lib-story.php | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (28 lines):
diff -r cebf7c509b23 -r bf38f4d16001 system/lib-story.php
--- a/system/lib-story.php Mon Nov 04 07:16:23 2013 -0500
+++ b/system/lib-story.php Mon Nov 04 17:23:43 2013 -0500
@@ -104,6 +104,12 @@
// Date formatting set by user therefore cannot be cached
$article->set_var('story_date', $story->DisplayElements('date'), false, true);
+
+ // Story views increase with every visit so cannot be cached
+ if( $_CONF['hideviewscount'] != 1 ) {
+ $article->set_var('lang_views', $LANG01[106], false, true);
+ $article->set_var('story_hits', $story->DisplayElements('hits'), false, true);
+ }
// Topic Icon is user configurable so do not cache
$topicname = $story->DisplayElements('topic');
@@ -197,11 +203,6 @@
$article->set_var( 'story_date_short', $story->DisplayElements('shortdate') );
$article->set_var( 'story_date_only', $story->DisplayElements('dateonly') );
$article->set_var( 'story_id', $story->getSid() );
-
- if( $_CONF['hideviewscount'] != 1 ) {
- $article->set_var('lang_views', $LANG01[106]);
- $article->set_var('story_hits', $story->DisplayElements('hits'));
- }
if ($_CONF['contributedbyline'] == 1) {
$article->set_var('lang_contributed_by', $LANG01[1]);
More information about the geeklog-cvs
mailing list