Changeset 18747
- Timestamp:
- Oct 25, 2012, 10:01:14 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/picture_comment.inc.php
r18164 r18747 32 32 foreach ($related_categories as $category) 33 33 { 34 if ($category['commentable'] )34 if ($category['commentable']=='true') 35 35 { 36 36 $page['show_comments'] = true; -
trunk/picture.php
r18637 r18747 454 454 //---------------------------------------------------------- related categories 455 455 $query = ' 456 SELECT category_id,uppercats,commentable,global_rank456 SELECT id,uppercats,commentable,visible,status,global_rank 457 457 FROM '.IMAGE_CATEGORY_TABLE.' 458 458 INNER JOIN '.CATEGORIES_TABLE.' ON category_id = id … … 462 462 array 463 463 ( 464 'forbidden_categories' => ' category_id',465 'visible_categories' => ' category_id'464 'forbidden_categories' => 'id', 465 'visible_categories' => 'id' 466 466 ), 467 467 'AND' 468 468 ).' 469 469 ;'; 470 $result = pwg_query($query); 471 $related_categories = array(); 472 while ($row = pwg_db_fetch_assoc($result)) 473 { 474 $row['commentable'] = get_boolean($row['commentable']); 475 array_push($related_categories, $row); 476 } 470 $related_categories = array_from_query($query); 477 471 usort($related_categories, 'global_rank_compare'); 478 472 //-------------------------first, prev, current, next & last picture management
Note: See TracChangeset
for help on using the changeset viewer.