Changeset 1182 in ExiteCMS for trunk/includes/theme_functions.php
- Timestamp:
- 12/25/07 17:32:57 (4 years ago)
- File:
-
- 1 edited
-
trunk/includes/theme_functions.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/theme_functions.php
r1158 r1182 49 49 // set the compile ID for this website/theme (themes can have different templates!) 50 50 if (isset($userdata['user_theme']) && $userdata['user_theme'] != "Default") { 51 $this->compile_id = $_SERVER['SERVER_NAME']." .".$userdata['user_theme'];51 $this->compile_id = $_SERVER['SERVER_NAME']."~".$userdata['user_theme']; 52 52 } else { 53 $this->compile_id = $_SERVER['SERVER_NAME']." .".$settings['theme'];53 $this->compile_id = $_SERVER['SERVER_NAME']."~".$settings['theme']; 54 54 } 55 55 … … 84 84 $_return = $auto_base . DIRECTORY_SEPARATOR; 85 85 86 if(isset($auto_id)) {87 // make auto_id safe for directory names88 $auto_id = str_replace('%7C',$_compile_dir_sep,(urlencode($auto_id)));89 }90 91 86 if(isset($auto_source)) { 92 87 // make source name safe for filename … … 95 90 $auto_source = md5($auto_source); 96 91 } 97 $_crc32 = sprintf('%08X', crc32($auto_source)); 98 // prepend %% to avoid name conflicts with 99 // with $params['auto_id'] names 100 $_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep . 101 substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32; 92 $_return .= $auto_source."~"; 102 93 } 103 return $_return.(isset($auto_source)?($auto_source."."):"").(isset($auto_id)?($auto_id."."):"").(isset($_crc32)?$_crc32:""); 94 95 if(isset($auto_id)) { 96 // make auto_id safe for directory names 97 $auto_id = str_replace('%7C',$_compile_dir_sep,(urlencode($auto_id))); 98 $auto_id = str_replace('%7E','~',$auto_id); 99 $_return .= $auto_id; 100 } 101 102 return $_return; 104 103 } 105 104 … … 357 356 $_panel['type'] = $column; 358 357 $_panel['title'] = $p_data['panel_name']; 359 $_panel['name'] = 'modules.'.$p_data['panel_filename'];360 358 $_panel['panel_type'] = $p_data['panel_type']; 361 359 switch($p_data['panel_type']) { 362 360 case "file": 363 $_panel['template'] = 'modules.'.$p_data['panel_filename'].".tpl"; 364 $_panel['panel_code'] = PATH_MODULES.$p_data['panel_filename']."/".$p_data['panel_filename'].".php"; 361 // check for module directory for backward compatibility 362 if (@is_dir(PATH_MODULES.$p_data['panel_filename'])) { 363 $_panel['name'] = 'modules.'.$p_data['panel_filename']; 364 $_panel['template'] = 'modules.'.$p_data['panel_filename'].".tpl"; 365 $_panel['panel_code'] = PATH_MODULES.$p_data['panel_filename']."/".$p_data['panel_filename'].".php"; 366 } else { 367 $_panel['template'] = 'modules.'.substr(basename($p_data['panel_filename']),0,-4).".tpl"; 368 $_panel['name'] = 'modules.'.substr(basename($p_data['panel_filename']),0,-4); 369 $_panel['panel_code'] = PATH_MODULES.$p_data['panel_filename']; 370 } 365 371 break; 366 372 case "dynamic":
Note: See TracChangeset
for help on using the changeset viewer.
