- Timestamp:
- Dec 31, 2006, 6:08:37 PM (17 years ago)
- Location:
- trunk/include
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/common.inc.php
r1679 r1687 178 178 179 179 if ($user['is_the_guest'] and !$conf['guest_access'] 180 and !in_array( basename($_SERVER['SCRIPT_FILENAME']),180 and !in_array( script_basename(), 181 181 array('identification.php', 182 182 'password.php', -
trunk/include/filter.inc.php
r1685 r1687 35 35 36 36 $filter['enabled'] = 37 (in_array( basename($_SERVER['SCRIPT_FILENAME']), $conf['filter_pages'])) and37 (in_array(script_basename(), $conf['filter_pages'])) and 38 38 ( 39 39 (isset($_GET['filter']) and ($_GET['filter'] == 'start')) or … … 41 41 ); 42 42 43 if (in_array( basename($_SERVER['SCRIPT_FILENAME']), $conf['filter_pages']))43 if (in_array(script_basename(), $conf['filter_pages'])) 44 44 { 45 45 if (isset($_GET['filter'])) -
trunk/include/functions.inc.php
r1679 r1687 1109 1109 } 1110 1110 } 1111 1112 /** 1113 * Return basename of the current script 1114 * Return value are chnage to loawer case 1115 * 1116 * @param void 1117 * 1118 * @return script basename 1119 */ 1120 function script_basename() 1121 { 1122 if (!empty($_SERVER['SCRIPT_NAME'])) 1123 { 1124 $file_name = $_SERVER['SCRIPT_NAME']; 1125 } 1126 else if (!empty($_SERVER['PHP_SELF'])) 1127 { 1128 $file_name = $_SERVER['PHP_SELF']; 1129 } 1130 else if (!empty($_SERVER['SCRIPT_FILENAME'])) 1131 { 1132 $file_name = $_SERVER['SCRIPT_FILENAME']; 1133 } 1134 else if (!empty($_SERVER['PATH_TRANSLATED'])) 1135 { 1136 $file_name = $_SERVER['PATH_TRANSLATED']; 1137 } 1138 else 1139 { 1140 $file_name = ''; 1141 } 1142 1143 // $_SERVER return lower string following var ans systems 1144 return basename(strtolower($file_name)); 1145 } 1146 1111 1147 ?> -
trunk/include/functions_calendar.inc.php
r1677 r1687 187 187 188 188 $must_show_list = true; // true until calendar generates its own display 189 if ( basename($_SERVER['SCRIPT_FILENAME']) != 'picture.php')189 if (script_basename() != 'picture.php') 190 190 { 191 191 $template->assign_block_vars('calendar', array()); -
trunk/include/section_init.inc.php
r1681 r1687 87 87 88 88 $next_token = 0; 89 if ( basename($_SERVER['SCRIPT_FILENAME']) == 'picture.php')89 if (script_basename() == 'picture.php') 90 90 { // the first token must be the identifier for the picture 91 91 if ( isset($_GET['image_id']) … … 707 707 $page['cat_nb_images'] = isset($page['items']) ? count($page['items']) : 0; 708 708 709 if ( basename($_SERVER['SCRIPT_FILENAME']) == 'picture.php'709 if (script_basename() == 'picture.php' 710 710 and !isset($page['image_id']) ) 711 711 {
Note: See TracChangeset
for help on using the changeset viewer.