Ignore:
Timestamp:
Sep 24, 2005, 9:05:55 PM (19 years ago)
Author:
plg
Message:
  • bug 162 fixed: division by zero when trying to view "all" items in admin/element_set_(global|unit)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/element_set_unit.php

    r836 r875  
    158158// +-----------------------------------------------------------------------+
    159159
    160 $page['nb_images'] = !empty($_GET['display']) ? intval($_GET['display']) : 5;
     160// how many items to display on this page
     161if (!empty($_GET['display']))
     162{
     163  if ('all' == $_GET['display'])
     164  {
     165    $page['nb_images'] = count($page['cat_elements_id']);
     166  }
     167  else
     168  {
     169    $page['nb_images'] = intval($_GET['display']);
     170  }
     171}
     172else
     173{
     174  $page['nb_images'] = 5;
     175}
     176
    161177
    162178
Note: See TracChangeset for help on using the changeset viewer.