Changeset 694
- Timestamp:
- Jan 15, 2005, 12:16:46 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_category.inc.php
r676 r694 593 593 594 594 $conf['order_by'] = ' ORDER BY hit DESC, file ASC'; 595 $page['cat_nb_images'] = $conf['top_number']; 595 596 // $page['cat_nb_images'] equals $conf['top_number'] unless there 597 // are less visited items 598 $query =' 599 SELECT COUNT(DISTINCT(id)) AS count 600 FROM '.IMAGES_TABLE.' 601 INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id 602 '.$page['where'].' 603 ;'; 604 $row = mysql_fetch_array(pwg_query($query)); 605 if ($row['count'] < $conf['top_number']) 606 { 607 $page['cat_nb_images'] = $row['count']; 608 } 609 else 610 { 611 $page['cat_nb_images'] = $conf['top_number']; 612 } 613 unset($query); 614 596 615 if ( isset( $page['start'] ) 597 616 and ($page['start']+$user['nb_image_page']>=$conf['top_number']))
Note: See TracChangeset
for help on using the changeset viewer.