[geeklog-cvs] geeklog: Don't display the comment form for a story when comment...

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sat Oct 17 09:22:41 EDT 2009


changeset 7383:2b8b42245059
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/2b8b42245059
user: Dirk Haun <dirk at haun-online.de>
date: Sat Oct 17 14:09:44 2009 +0200
description:
Don't display the comment form for a story when comments aren't enabled for it (bug #0000994)

diffstat:

 public_html/comment.php  |  5 ++---
 public_html/docs/history |  2 ++
 2 files changed, 4 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r dfadb4aad5d1 -r 2b8b42245059 public_html/comment.php
--- a/public_html/comment.php	Sat Oct 17 13:51:45 2009 +0200
+++ b/public_html/comment.php	Sat Oct 17 14:09:44 2009 +0200
@@ -446,9 +446,8 @@
 
     if ($type == 'article') {
         $dbTitle = DB_getItem($_TABLES['stories'], 'title',
-                                "sid = '{$sid}'" . COM_getPermSQL('AND')
-                                . " AND (draft_flag = 0) AND (date <= NOW()) "
-                                . COM_getTopicSQL('AND'));
+                    "(sid = '$sid') AND (draft_flag = 0) AND (date <= NOW()) AND (commentcode = 0)"
+                    . COM_getPermSQL('AND') . COM_getTopicSQL('AND'));
         if ($dbTitle === null) {
             // no permissions, or no story of that title
             $display = COM_refresh($_CONF['site_url'] . '/index.php');
diff -r dfadb4aad5d1 -r 2b8b42245059 public_html/docs/history
--- a/public_html/docs/history	Sat Oct 17 13:51:45 2009 +0200
+++ b/public_html/docs/history	Sat Oct 17 14:09:44 2009 +0200
@@ -3,6 +3,8 @@
 Oct ??, 2009 (1.6.1)
 ------------
 
+- Don't display the comment form for a story when comments aren't enabled for it
+  (bug #0000994) [Dirk]
 - Fixed a long-standing quirk of the submission handling where the "Submissions"
   entry in the Admins Block wasn't updated after accepting / rejecting a
   submission [Dirk]



More information about the geeklog-cvs mailing list