aboutsummaryrefslogtreecommitdiffstats
path: root/include/section_init.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/section_init.inc.php')
-rw-r--r--include/section_init.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/section_init.inc.php b/include/section_init.inc.php
index b2bb4c90e..8f2232bb8 100644
--- a/include/section_init.inc.php
+++ b/include/section_init.inc.php
@@ -86,7 +86,7 @@ $tokens = explode(
// );
$next_token = 0;
-if (basename($_SERVER['SCRIPT_FILENAME']) == 'picture.php')
+if (script_basename() == 'picture.php')
{ // the first token must be the identifier for the picture
if ( isset($_GET['image_id'])
and isset($_GET['cat']) and is_numeric($_GET['cat']) )
@@ -625,7 +625,7 @@ if (isset($page['chronology_field']))
$page['cat_nb_images'] = isset($page['items']) ? count($page['items']) : 0;
-if (basename($_SERVER['SCRIPT_FILENAME']) == 'picture.php'
+if (script_basename() == 'picture.php'
and !isset($page['image_id']) )
{
if ( !empty($page['items']) )