Changeset 8926
- Timestamp:
- Feb 4, 2009, 11:58:03 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/inc/utils.inc.php ¶
r8858 r8926 1010 1010 return preg_replace( "/(&|&){$sExceptParam}=([a-z0-9\_\-]{1,})/i",'', $sString); 1011 1011 } 1012 1013 /** 1014 * import class file, it detect class path by its prefix or module array 1015 * 1016 * @param $sClassName - full class name or class postfix in a case of module class 1017 * @param $aModule - module array or true to get module array from global variable 1018 */ 1019 function bx_import ($sClassName, $aModule = array()) 1020 { 1021 if (class_exists($sClassName)) 1022 return; 1023 1024 if ($aModule) 1025 { 1026 $a = (true === $aModule) ? $GLOABLS['aModule'] : $aModule; 1027 if (class_exists($a['class_prefix'] . $sClassName)) 1028 return; 1029 require_once (BX_DIRECTORY_PATH_MODULES . $a['path'] . '/classes/' . $a['class_prefix'] . $sClassName . '.php'); 1030 } 1031 1032 if (0 == strncmp($sClassName, 'BxDol', 5)) 1033 { 1034 require_once(BX_DIRECTORY_PATH_CLASSES . $sClassName . '.php'); 1035 return; 1036 } 1037 if (0 == strncmp($sClassName, 'BxBase', 6)) 1038 { 1039 require_once(BX_DIRECTORY_PATH_BASE . 'scripts/' . $sClassName . '.php'); 1040 return; 1041 } 1042 if (0 == strncmp($sClassName, 'BxTmpl', 6)) 1043 { 1044 require_once(BX_DIRECTORY_PATH_ROOT . "templates/tmpl_{$GLOBALS['tmpl']}/scripts/" . $sClassName . '.php'); 1045 return; 1046 } 1047 } 1048 1012 1049 ?>
Note: See TracChangeset
for help on using the changeset viewer.