[geeklog-hg] geeklog: Fixed checking of cache_time for article and block when...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Nov 4 20:42:17 EST 2013


changeset 9332:8aaf9ab27e45
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/8aaf9ab27e45
user: Tom <websitemaster at cogeco.net>
date: Mon Nov 04 20:40:23 2013 -0500
description:
Fixed checking of cache_time for article and block when saving. If cache time = "" then set to default (instead of using empty since 0 is also considered empty)

diffstat:

 public_html/admin/block.php    |  2 +-
 system/classes/story.class.php |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (24 lines):

diff -r bf38f4d16001 -r 8aaf9ab27e45 public_html/admin/block.php
--- a/public_html/admin/block.php	Mon Nov 04 17:23:43 2013 -0500
+++ b/public_html/admin/block.php	Mon Nov 04 20:40:23 2013 -0500
@@ -593,7 +593,7 @@
             $allow_autotags = 0;
         }
         
-        if (empty($cache_time) OR $cache_time < -1) {
+        if ($cache_time < -1 OR $cache_time == "") {
             $cache_time = $_CONF['default_cache_time_block'];
         }        
 
diff -r bf38f4d16001 -r 8aaf9ab27e45 system/classes/story.class.php
--- a/system/classes/story.class.php	Mon Nov 04 17:23:43 2013 -0500
+++ b/system/classes/story.class.php	Mon Nov 04 20:40:23 2013 -0500
@@ -1685,7 +1685,7 @@
             break;
             
         case 'cache_time':
-            if (empty($this->_cache_time) OR $this->_cache_time < -1) {
+            if ($this->_cache_time < -1 OR $this->_cache_time == '') {
                 $return  = $_CONF['default_cache_time_article'];
             } else {
                 $return = intval($this->_cache_time);



More information about the geeklog-cvs mailing list