mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-07-20 16:42:59 +02:00
- bug 162 fixed: division by zero when trying to view "all" items in
admin/element_set_(global|unit) git-svn-id: http://piwigo.org/svn/trunk@875 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -157,7 +157,23 @@ $template->assign_vars(
|
||||
// | global mode thumbnails |
|
||||
// +-----------------------------------------------------------------------+
|
||||
|
||||
$page['nb_images'] = !empty($_GET['display']) ? intval($_GET['display']) : 5;
|
||||
// how many items to display on this page
|
||||
if (!empty($_GET['display']))
|
||||
{
|
||||
if ('all' == $_GET['display'])
|
||||
{
|
||||
$page['nb_images'] = count($page['cat_elements_id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['nb_images'] = intval($_GET['display']);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['nb_images'] = 5;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (count($page['cat_elements_id']) > 0)
|
||||
|
||||
Reference in New Issue
Block a user