Changeset 1750 for trunk/include/functions_session.inc.php
- Timestamp:
- Jan 24, 2007, 6:07:08 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/functions_session.inc.php
r1623 r1750 112 112 } 113 113 $scr = substr($scr,0,strrpos( $scr,'/')); 114 114 115 // add a trailing '/' if needed 115 return ($scr{strlen($scr)-1} == '/') ? $scr : $scr . '/'; 116 $scr .= ($scr{strlen($scr)-1} == '/') ? '' : '/'; 117 118 if ( substr(PHPWG_ROOT_PATH,0,3)=='../') 119 { // this is maybe a plugin inside pwg directory 120 // TODO - what if it is an external script outside PWG ? 121 $scr = $scr.PHPWG_ROOT_PATH; 122 while (1) 123 { 124 $new = preg_replace('#[^/]+/\.\.(/|$)#', '', $scr); 125 if ($new==$scr) 126 { 127 break; 128 } 129 $scr=$new; 130 } 131 } 132 return $scr; 116 133 } 117 134
Note: See TracChangeset
for help on using the changeset viewer.