aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_upgrade.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 /admin/include/functions_upgrade.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 'admin/include/functions_upgrade.php')
-rw-r--r--admin/include/functions_upgrade.php38
1 files changed, 34 insertions, 4 deletions
diff --git a/admin/include/functions_upgrade.php b/admin/include/functions_upgrade.php
index 644e5ffd7..91110e4ff 100644
--- a/admin/include/functions_upgrade.php
+++ b/admin/include/functions_upgrade.php
@@ -76,8 +76,6 @@ function deactivate_non_standard_plugins()
global $page;
$standard_plugins = array(
- 'add_index',
- 'admin_advices',
'admin_multi_view',
'c13y_upgrade',
'event_tracer',
@@ -221,8 +219,11 @@ function upgrade_db_connect()
try
{
- $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'],
- $conf['db_password'], $conf['db_base']);
+ $pwg_db_link = pwg_db_connect($conf['db_host'], $conf['db_user'], $conf['db_password'], $conf['db_base']);
+ if ($pwg_db_link)
+ {
+ pwg_db_check_version();
+ }
}
catch (Exception $e)
{
@@ -230,4 +231,33 @@ function upgrade_db_connect()
}
}
+/**
+ * Get languages defined in the language directory
+ */
+function get_fs_languages($target_charset = null)
+{
+ if ( empty($target_charset) )
+ {
+ $target_charset = get_pwg_charset();
+ }
+ $target_charset = strtolower($target_charset);
+
+ $dir = opendir(PHPWG_ROOT_PATH.'language');
+
+ while ($file = readdir($dir))
+ {
+ $path = PHPWG_ROOT_PATH.'language/'.$file;
+ if (!is_link($path) and is_dir($path) and file_exists($path.'/iso.txt'))
+ {
+ list($language_name) = @file($path.'/iso.txt');
+
+ $languages[$file] = convert_charset($language_name, $target_charset);
+ }
+ }
+ closedir($dir);
+ @asort($languages);
+
+ return $languages;
+}
+
?> \ No newline at end of file