aboutsummaryrefslogtreecommitdiffstats
path: root/include/section_init.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/section_init.inc.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index d5bbce645..68fe8d452 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -247,13 +247,24 @@ else if ('list' == $tokens[$next_token])
$next_token++;
$page['list'] = array();
- if (!preg_match('/^\d+(,\d+)*$/', $tokens[$next_token]))
+
+ // No pictures
+ if (empty($tokens[$next_token]))
{
- die('wrong format on list GET parameter');
+ // Add dummy element list
+ array_push($page['list'], -1);
}
- foreach (explode(',', $tokens[$next_token]) as $image_id)
+ // With pictures list
+ else
{
- array_push($page['list'], $image_id);
+ if (!preg_match('/^\d+(,\d+)*$/', $tokens[$next_token]))
+ {
+ die('wrong format on list GET parameter');
+ }
+ foreach (explode(',', $tokens[$next_token]) as $image_id)
+ {
+ array_push($page['list'], $image_id);
+ }
}
$next_token++;
}