aboutsummaryrefslogtreecommitdiffstats
path: root/upgrade.php
diff options
context:
space:
mode:
authorpatdenice <patdenice@piwigo.org>2008-10-21 23:46:13 +0000
committerpatdenice <patdenice@piwigo.org>2008-10-21 23:46:13 +0000
commit33322d4bd0f5e957a866926ff891c662ca825475 (patch)
tree538ab30a415a6897bd157ec2652348987b387c70 /upgrade.php
parent463c101a284671eed62108fb90b08398fdd6a93d (diff)
- Move upgrade.tpl to admin template.
- Deactivate all active plugins during upgrade.php. - Update Editarea for LocalFiles Editor to version 0.7.2.3 (bonEcho compatibility) git-svn-id: http://piwigo.org/svn/trunk@2787 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'upgrade.php')
-rw-r--r--upgrade.php20
1 files changed, 19 insertions, 1 deletions
diff --git a/upgrade.php b/upgrade.php
index 67640635f..aa5fc06cb 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -151,7 +151,7 @@ function print_time($message)
// | template initialization |
// +-----------------------------------------------------------------------+
-$template = new Template(PHPWG_ROOT_PATH.'template/yoga');
+$template = new Template(PHPWG_ROOT_PATH.'admin/template/goto');
$template->set_filenames(array('upgrade'=>'upgrade.tpl'));
$template->assign('RELEASE', PHPWG_VERSION);
@@ -234,6 +234,24 @@ else
$conf['die_on_sql_error'] = false;
include($upgrade_file);
+ // Plugins deactivation
+ if (in_array(PREFIX_TABLE.'plugins', $tables))
+ {
+ $query = '
+UPDATE '.PREFIX_TABLE.'plugins SET state="inactive" WHERE state="active"
+;';
+ mysql_query($query);
+
+ if (mysql_affected_rows() > 0)
+ {
+ array_push(
+ $page['infos'],
+ 'As a precaution, all activated plugins have been deactivated.
+You must check for plugins upgrade before reactiving them.'
+ );
+ }
+ }
+
// Create empty local files to avoid log errors
create_empty_local_files();