Changeset 22996
- Timestamp:
- 2013/07/21 00:39:35 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/helper/SC_Helper_Session.php
r22857 r22996 228 228 function adminAuthorization() 229 229 { 230 $masterData = new SC_DB_MasterData_Ex(); 231 $arrExcludes = $masterData->getMasterData('mtb_auth_excludes'); 232 if (preg_match('|^' . ROOT_URLPATH . ADMIN_DIR . '|', $_SERVER['SCRIPT_NAME'])) { 233 $is_auth = true; 234 235 foreach ($arrExcludes as $exclude) { 236 if (preg_match('|^' . ROOT_URLPATH . ADMIN_DIR . $exclude . '|', $_SERVER['SCRIPT_NAME'])) { 237 $is_auth = false; 238 break; 230 if (($script_path = realpath($_SERVER['SCRIPT_FILENAME'])) !== FALSE) { 231 $arrScriptPath = explode('/', str_replace('\\', '/', $script_path)); 232 $arrAdminPath = explode('/', str_replace('\\', '/', substr(HTML_REALDIR . ADMIN_DIR, 0, -1))); 233 $arrDiff = array_diff_assoc($arrAdminPath, $arrScriptPath); 234 if (in_array(substr(ADMIN_DIR, 0, -1), $arrDiff)) { 235 return; 236 } else { 237 $masterData = new SC_DB_MasterData_Ex(); 238 $arrExcludes = $masterData->getMasterData('mtb_auth_excludes'); 239 foreach ($arrExcludes as $exclude) { 240 $arrExcludesPath = explode('/', str_replace('\\', '/', HTML_REALDIR . ADMIN_DIR . $exclude)); 241 $arrDiff = array_diff_assoc($arrExcludesPath, $arrScriptPath); 242 if (count($arrDiff) === 0) { 243 return; 244 } 239 245 } 240 246 } 241 if ($is_auth) { 242 SC_Utils_Ex::sfIsSuccess(new SC_Session_Ex()); 243 } 244 } 247 } 248 SC_Utils_Ex::sfIsSuccess(new SC_Session_Ex()); 245 249 } 246 250 }
Note: See TracChangeset
for help on using the changeset viewer.