diff --git a/includes/post_list.php b/includes/post_list.php index bb00a6e..dd7a0e1 100644 --- a/includes/post_list.php +++ b/includes/post_list.php @@ -145,6 +145,8 @@ //Limit main tag listing to $tags_limit tags. Keep the loop down to the minimum really. while($row = $result->fetch_assoc()) { + $post = new post(); + $has_children = $post->has_children($row['id']) ? ' data-has_children="true"' : ''; $tags = mb_trim($row['tags']); if($tcount <= $tags_limit) { @@ -158,7 +160,7 @@ } } } - $images .= 'post'; + $images .= 'post'; $script .= 'posts['.$row['id'].'] = {\'tags\':\''.strtolower(str_replace('\\',"\",str_replace("'","'",$tags))).'\'.split(/ /g), \'rating\':\''.$row['rating'].'\', \'score\':'.$row['score'].', \'user\':\''.str_replace('\\',"\",str_replace(' ','%20',str_replace("'","'",$row['owner']))).'\'};'; } $result->free_result();