Comments: fixed failure to supply $q to fetchrow() in JSON fetcher
authorDan
Fri, 29 May 2009 16:37:32 -0400
changeset 1011 96119a79cf81
parent 1010 12e76b1acb4e
child 1012 d966be8d79a3
Comments: fixed failure to supply $q to fetchrow() in JSON fetcher
includes/comment.php
--- a/includes/comment.php	Fri May 29 14:03:05 2009 -0400
+++ b/includes/comment.php	Fri May 29 16:37:32 2009 -0400
@@ -115,7 +115,7 @@
         $ret['comments'] = Array();
         if (!$q)
           $db->die_json();
-        if ( $row = $db->fetchrow() )
+        if ( $row = $db->fetchrow($q) )
         {
           do {
             
@@ -162,7 +162,7 @@
             // Add the comment to the list
             $ret['comments'][] = $row;
             
-          } while ( $row = $db->fetchrow() );
+          } while ( $row = $db->fetchrow($q) );
         }
         $db->free_result();
         $ret['count_appr'] = $count_appr;