[geeklog-cvs] geeklog-1.3/public_html comment.php,1.44.2.5,1.44.2.6

dhaun at iowaoutdoors.org dhaun at iowaoutdoors.org
Thu Oct 7 16:14:54 EDT 2004


Update of /var/cvs/geeklog-1.3/public_html
In directory www:/tmp/cvs-serv20384

Modified Files:
Tag: geeklog_1_3_8_1_1
comment.php
Log Message:
Don't allow posting comments on stories or polls where comment posting has been disabled.


Index: comment.php
===================================================================
RCS file: /var/cvs/geeklog-1.3/public_html/comment.php,v
retrieving revision 1.44.2.5
retrieving revision 1.44.2.6
diff -C2 -d -r1.44.2.5 -r1.44.2.6
*** comment.php 31 May 2004 12:49:51 -0000 1.44.2.5
--- comment.php 7 Oct 2004 20:14:52 -0000 1.44.2.6
***************
*** 256,259 ****
--- 256,271 ----
}

+ $commentcode = 0;
+ if ($type == 'article') {
+ $commentcode = DB_getItem ($_TABLES['stories'], 'commentcode',
+ "sid = '$sid'");
+ } else if ($type == 'poll') {
+ $commentcode = DB_getItem ($_TABLES['pollquestions'], 'commentcode',
+ "qid = '$sid'");
+ }
+ if ($commentcode < 0) {
+ return COM_refresh ($_CONF['site_url'] . '/index.php');
+ }
+
// Clean 'em up a bit!
if ($postmode == 'html') {




More information about the geeklog-cvs mailing list