Don't display the comment form for a story when comments aren't enabled for it (bug #0000994) HEAD
authorDirk Haun <dirk@haun-online.de>
Sat Oct 17 14:09:44 2009 +0200 (3 months ago)
branchHEAD
changeset 73832b8b42245059
parent 7382dfadb4aad5d1
child 7384062fc7ef2c35
Don't display the comment form for a story when comments aren't enabled for it (bug #0000994)
public_html/comment.php
public_html/docs/history
     1.1 --- a/public_html/comment.php	Sat Oct 17 13:51:45 2009 +0200
     1.2 +++ b/public_html/comment.php	Sat Oct 17 14:09:44 2009 +0200
     1.3 @@ -446,9 +446,8 @@
     1.4  
     1.5      if ($type == 'article') {
     1.6          $dbTitle = DB_getItem($_TABLES['stories'], 'title',
     1.7 -                                "sid = '{$sid}'" . COM_getPermSQL('AND')
     1.8 -                                . " AND (draft_flag = 0) AND (date <= NOW()) "
     1.9 -                                . COM_getTopicSQL('AND'));
    1.10 +                    "(sid = '$sid') AND (draft_flag = 0) AND (date <= NOW()) AND (commentcode = 0)"
    1.11 +                    . COM_getPermSQL('AND') . COM_getTopicSQL('AND'));
    1.12          if ($dbTitle === null) {
    1.13              // no permissions, or no story of that title
    1.14              $display = COM_refresh($_CONF['site_url'] . '/index.php');
     2.1 --- a/public_html/docs/history	Sat Oct 17 13:51:45 2009 +0200
     2.2 +++ b/public_html/docs/history	Sat Oct 17 14:09:44 2009 +0200
     2.3 @@ -3,6 +3,8 @@
     2.4  Oct ??, 2009 (1.6.1)
     2.5  ------------
     2.6  
     2.7 +- Don't display the comment form for a story when comments aren't enabled for it
     2.8 +  (bug #0000994) [Dirk]
     2.9  - Fixed a long-standing quirk of the submission handling where the "Submissions"
    2.10    entry in the Admins Block wasn't updated after accepting / rejecting a
    2.11    submission [Dirk]