mirror of
https://github.com/claradex/nativegallery.git
synced 2024-11-15 03:31:10 +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>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
|
||||||
<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>
|
|
||||||
<div id="posts">
|
|
||||||
<?php
|
<?php
|
||||||
$comments = DB::query('SELECT * FROM photos_comments WHERE photo_id=:pid', array(':pid' => $id));
|
$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> <?=count($comments)?></span></h4>
|
||||||
|
<div id="posts">
|
||||||
|
<?php
|
||||||
|
|
||||||
foreach ($comments as $c) {
|
foreach ($comments as $c) {
|
||||||
$comm = new Comment($c);
|
$comm = new Comment($c);
|
||||||
$comm->i();
|
$comm->i();
|
||||||
|
|
Loading…
Reference in a new issue