equal
deleted
inserted
replaced
113 $count_total = 0; |
113 $count_total = 0; |
114 $count_unappr = 0; |
114 $count_unappr = 0; |
115 $ret['comments'] = Array(); |
115 $ret['comments'] = Array(); |
116 if (!$q) |
116 if (!$q) |
117 $db->die_json(); |
117 $db->die_json(); |
118 if ( $row = $db->fetchrow() ) |
118 if ( $row = $db->fetchrow($q) ) |
119 { |
119 { |
120 do { |
120 do { |
121 |
121 |
122 // Increment counters |
122 // Increment counters |
123 $count_total++; |
123 $count_total++; |
160 $row['avatar_path'] = make_avatar_url($row['user_id'], $row['avatar_type'], $row['email']); |
160 $row['avatar_path'] = make_avatar_url($row['user_id'], $row['avatar_type'], $row['email']); |
161 |
161 |
162 // Add the comment to the list |
162 // Add the comment to the list |
163 $ret['comments'][] = $row; |
163 $ret['comments'][] = $row; |
164 |
164 |
165 } while ( $row = $db->fetchrow() ); |
165 } while ( $row = $db->fetchrow($q) ); |
166 } |
166 } |
167 $db->free_result(); |
167 $db->free_result(); |
168 $ret['count_appr'] = $count_appr; |
168 $ret['count_appr'] = $count_appr; |
169 $ret['count_total'] = $count_total; |
169 $ret['count_total'] = $count_total; |
170 $ret['count_unappr'] = $count_unappr; |
170 $ret['count_unappr'] = $count_unappr; |