Changeset 5982 for trunk/install/db/86-database.php
- Timestamp:
- Apr 28, 2010, 4:28:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/install/db/86-database.php
r5452 r5982 27 27 } 28 28 29 $upgrade_description = 'Automatically activate core themes and used themes.';29 $upgrade_description = 'Automatically activate core themes.'; 30 30 31 $themes_core = array('Sylvia', 'dark', 'clear'); 32 33 $query = ' 34 SELECT 35 DISTINCT(theme) 36 FROM '.PREFIX_TABLE.'user_infos 37 ;'; 38 $themes_used = array_from_query($query, 'theme'); 39 40 $query = ' 41 SELECT 42 id 43 FROM '.PREFIX_TABLE.'themes 44 ;'; 45 $themes_active = array_from_query($query, 'id'); 46 47 48 $themes_to_activate = array_diff( 49 array_unique(array_merge($themes_used, $themes_core)), 50 $themes_active 51 ); 52 53 // echo '<pre>'; print_r($themes_to_activate); echo '</pre>'; exit(); 54 55 foreach ($themes_to_activate as $theme) 56 { 57 $query = ' 58 INSERT INTO '.PREFIX_TABLE.'themes 59 (id) VALUES(\''.$theme.'\' 60 ;'; 61 pwg_query($query); 62 } 31 include_once(PHPWG_ROOT_PATH . 'admin/include/functions_install.inc.php'); 32 activate_core_themes(); 63 33 64 34 echo
Note: See TracChangeset
for help on using the changeset viewer.