Changeset 1686
- Timestamp:
- Dec 31, 2006, 6:02:36 PM (17 years ago)
- Location:
- branches/branch-1_6/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/branch-1_6/include/common.inc.php
r1572 r1686 175 175 176 176 if ($user['is_the_guest'] and !$conf['guest_access'] 177 and !in_array( basename($_SERVER['SCRIPT_FILENAME']),177 and !in_array( script_basename(), 178 178 array('identification.php', 179 179 'password.php', -
branches/branch-1_6/include/functions.inc.php
r1572 r1686 968 968 } 969 969 } 970 971 /** 972 * Return basename of the current script 973 * Return value are chnage to loawer case 974 * 975 * @param void 976 * 977 * @return script basename 978 */ 979 function script_basename() 980 { 981 if (!empty($_SERVER['SCRIPT_NAME'])) 982 { 983 $file_name = $_SERVER['SCRIPT_NAME']; 984 } 985 else if (!empty($_SERVER['PHP_SELF'])) 986 { 987 $file_name = $_SERVER['PHP_SELF']; 988 } 989 else if (!empty($_SERVER['SCRIPT_FILENAME'])) 990 { 991 $file_name = $_SERVER['SCRIPT_FILENAME']; 992 } 993 else if (!empty($_SERVER['PATH_TRANSLATED'])) 994 { 995 $file_name = $_SERVER['PATH_TRANSLATED']; 996 } 997 else 998 { 999 $file_name = ''; 1000 } 1001 1002 // $_SERVER return lower string following var ans systems 1003 return basename(strtolower($file_name)); 1004 } 1005 970 1006 ?> -
branches/branch-1_6/include/functions_calendar.inc.php
r1162 r1686 178 178 179 179 $must_show_list = true; // true until calendar generates its own display 180 if ( basename($_SERVER['SCRIPT_FILENAME']) != 'picture.php')180 if (script_basename() != 'picture.php') 181 181 { 182 182 $template->assign_block_vars('calendar', array()); -
branches/branch-1_6/include/section_init.inc.php
r1372 r1686 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']) … … 626 626 $page['cat_nb_images'] = isset($page['items']) ? count($page['items']) : 0; 627 627 628 if ( basename($_SERVER['SCRIPT_FILENAME']) == 'picture.php'628 if (script_basename() == 'picture.php' 629 629 and !isset($page['image_id']) ) 630 630 {
Note: See TracChangeset
for help on using the changeset viewer.