includes/comment.php
changeset 86 c162ca39db8f
parent 78 4df25dfdde63
child 108 1c7f59df9474
--- a/includes/comment.php	Thu Aug 09 12:26:16 2007 -0400
+++ b/includes/comment.php	Fri Aug 10 15:57:22 2007 -0400
@@ -85,7 +85,15 @@
     $data = decode_unicode_array($data);
     if ( !isset($data['mode']) )
     {
-      return $parser->encode(Array('mode'=>'error','error'=>'No mode defined!'));
+      $ret = Array('mode'=>'error','error'=>'No mode defined!');
+      echo $parser->encode($ret);
+      return $ret;
+    }
+    if ( getConfig('enable_comments') == '0' )
+    {
+      $ret = Array('mode'=>'error','error'=>'Comments are not enabled on this site.');
+      echo $parser->encode($ret);
+      return $ret;
     }
     $ret = Array();
     $ret['mode'] = $data['mode'];