aboutsummaryrefslogtreecommitdiffstats
path: root/install/db
diff options
context:
space:
mode:
Diffstat (limited to 'install/db')
-rw-r--r--install/db/65-database.php2
-rw-r--r--install/db/86-database.php36
2 files changed, 4 insertions, 34 deletions
diff --git a/install/db/65-database.php b/install/db/65-database.php
index e934d14fc..ceb99756f 100644
--- a/install/db/65-database.php
+++ b/install/db/65-database.php
@@ -165,7 +165,7 @@ SELECT language FROM '.USER_INFOS_TABLE.'
$all_tables = array();
$query = 'SHOW TABLES LIKE "'.$prefixeTable.'%"';
$result = pwg_query($query);
- while ( $row=pwg_db_fetch_assoc($result) )
+ while ( $row=pwg_db_fetch_row($result) )
{
array_push($all_tables, $row[0]);
}
diff --git a/install/db/86-database.php b/install/db/86-database.php
index 3a736e3e2..a13465f8e 100644
--- a/install/db/86-database.php
+++ b/install/db/86-database.php
@@ -26,40 +26,10 @@ if (!defined('PHPWG_ROOT_PATH'))
die('Hacking attempt!');
}
-$upgrade_description = 'Automatically activate core themes and used themes.';
+$upgrade_description = 'Automatically activate core themes.';
-$themes_core = array('Sylvia', 'dark', 'clear');
-
-$query = '
-SELECT
- DISTINCT(theme)
- FROM '.PREFIX_TABLE.'user_infos
-;';
-$themes_used = array_from_query($query, 'theme');
-
-$query = '
-SELECT
- id
- FROM '.PREFIX_TABLE.'themes
-;';
-$themes_active = array_from_query($query, 'id');
-
-
-$themes_to_activate = array_diff(
- array_unique(array_merge($themes_used, $themes_core)),
- $themes_active
- );
-
-// echo '<pre>'; print_r($themes_to_activate); echo '</pre>'; exit();
-
-foreach ($themes_to_activate as $theme)
-{
- $query = '
-INSERT INTO '.PREFIX_TABLE.'themes
- (id) VALUES(\''.$theme.'\'
-;';
- pwg_query($query);
-}
+include_once(PHPWG_ROOT_PATH . 'admin/include/functions_install.inc.php');
+activate_core_themes();
echo
"\n"