Changeset 5446 for trunk/admin/include/themes.class.php
- Timestamp:
- 03/29/10 15:30:02 (3 years ago)
- Files:
-
- 1 modified
-
trunk/admin/include/themes.class.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/include/themes.class.php
r5382 r5446 71 71 } 72 72 73 $file_to_include = PHPWG_THEMES_PATH.'/'.$theme_id.'/admin/maintain.inc.php'; 74 73 75 $errors = array(); 74 76 … … 101 103 break; 102 104 } 103 104 $query = " 105 106 if (file_exists($file_to_include)) 107 { 108 include($file_to_include); 109 if (function_exists('theme_activate')) 110 { 111 theme_activate($theme_id, $this->fs_themes[$theme_id]['version'], $errors); 112 } 113 } 114 115 if (empty($errors)) 116 { 117 $query = " 105 118 INSERT INTO ".THEMES_TABLE." 106 119 SET id = '".$theme_id."' … … 108 121 , name = '".$this->fs_themes[$theme_id]['name']."' 109 122 ;"; 110 pwg_query($query); 123 pwg_query($query); 124 } 111 125 break; 112 126 … … 151 165 $this->set_default_theme($new_theme); 152 166 } 153 167 168 if (file_exists($file_to_include)) 169 { 170 include($file_to_include); 171 if (function_exists('theme_deactivate')) 172 { 173 theme_deactivate($theme_id); 174 } 175 } 176 154 177 $query = " 155 178 DELETE … … 375 398 ; 376 399 } 377 400 401 $admin_file = $path.'/admin/admin.inc.php'; 402 if (file_exists($admin_file)) 403 { 404 $theme['admin_uri'] = get_root_url().'admin.php?page=theme&theme='.$file; 405 } 406 378 407 // IMPORTANT SECURITY ! 379 408 $theme = array_map('htmlspecialchars', $theme);
![(please configure the [header_logo] section in trac.ini)](http://piwigo.org/screenshots/piwigo_logo_on_white.png)