[geeklog-cvs] geeklog: Initialize comment expiry time to avoid an SQL error wh...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Wed Jul 29 05:51:45 EDT 2009


details:   http://project.geeklog.net/cgi-bin/hgweb.cgi/rev/d9e3fbb9e583
changeset: 7197:d9e3fbb9e583
user:      Dirk Haun <dirk at haun-online.de>
date:      Wed Jul 29 11:51:34 2009 +0200
description:
Initialize comment expiry time to avoid an SQL error when story submission queue is disabled (reported by Dieter Thomas)

diffstat:

 system/classes/story.class.php |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diffs (24 lines):

diff -r a88b92761fb9 -r d9e3fbb9e583 system/classes/story.class.php
--- a/system/classes/story.class.php	Wed Jul 29 11:13:39 2009 +0200
+++ b/system/classes/story.class.php	Wed Jul 29 11:51:34 2009 +0200
@@ -1957,6 +1957,8 @@
      */
     function _sanitizeData()
     {
+        global $_CONF;
+
         if (empty($this->_hits)) {
             $this->_hits = 0;
         }
@@ -1984,6 +1986,11 @@
         } elseif ($this->_show_topic_icon != 1) {
             $this->_show_topic_icon = 0;
         }
+
+        if (empty($this->_comment_expire)) {
+            $this->_comment_expire = $this->_date
+                            + ($_CONF['article_comment_close_days'] * 86400);
+        }
     }
 // End Private Methods.
 



More information about the geeklog-cvs mailing list