mirror of
https://github.com/WerySkok/nativegallery.git
synced 2024-12-22 16:41:17 +03:00
fix comments count
This commit is contained in:
parent
45e8eb9438
commit
40c53bf0fb
1 changed files with 5 additions and 3 deletions
|
@ -294,12 +294,14 @@ if ($photo->i('id') !== null) {
|
|||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php
|
||||
$comments = DB::query('SELECT * FROM photos_comments WHERE photo_id=:pid', array(':pid' => $id));
|
||||
?>
|
||||
<div class="p0" id="pp-item-comments">
|
||||
<h4 class="pp-item-header">Комментарии<span style="font-weight:normal"> <span style="color:#aaa">·</span> 1</span></h4>
|
||||
<h4 class="pp-item-header">Комментарии<span style="font-weight:normal"> <span style="color:#aaa">·</span> <?=count($comments)?></span></h4>
|
||||
<div id="posts">
|
||||
<?php
|
||||
$comments = DB::query('SELECT * FROM photos_comments WHERE photo_id=:pid', array(':pid' => $id));
|
||||
|
||||
foreach ($comments as $c) {
|
||||
$comm = new Comment($c);
|
||||
$comm->i();
|
||||
|
|
Loading…
Reference in a new issue