aboutsummaryrefslogtreecommitdiffstats
path: root/install/db/86-database.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-04-28 14:28:05 +0000
committerplegall <plg@piwigo.org>2010-04-28 14:28:05 +0000
commit73db66afa58cb14c6ced4163c10f4603a3399428 (patch)
treee5546bda92f92c4de6c1f104a66efebd3f462df3 /install/db/86-database.php
parentaaa31653eee276541f693a42159c1ea40421dbfd (diff)
feature 1630: upgrade to Piwigo 2.1 :-)
bug 1604: only activate core themes not all themes. git-svn-id: http://piwigo.org/svn/trunk@5982 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'install/db/86-database.php')
-rw-r--r--install/db/86-database.php36
1 files changed, 3 insertions, 33 deletions
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"