aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflop25 <flop25@piwigo.org>2012-04-17 14:09:05 +0000
committerflop25 <flop25@piwigo.org>2012-04-17 14:09:05 +0000
commit89a1ee2696cfdc56adfcd15c799dab2d2f7c8764 (patch)
treef847e492811615cc3cee3aafb96e5a21dbd9c1a1
parentf03ce8dcfa688e7204d124c0f864d70c504a82df (diff)
feature:2482
during upgrade, deactivate template-extensions : in practice put an empty array for the config param. extents_for_templates git-svn-id: http://piwigo.org/svn/trunk@14206 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/include/functions_upgrade.php9
-rw-r--r--upgrade.php1
2 files changed, 10 insertions, 0 deletions
diff --git a/admin/include/functions_upgrade.php b/admin/include/functions_upgrade.php
index 07861ff94..cc593d5f3 100644
--- a/admin/include/functions_upgrade.php
+++ b/admin/include/functions_upgrade.php
@@ -171,6 +171,15 @@ UPDATE '.PREFIX_TABLE.'user_infos
}
}
+// Deactivate all templates
+function deactivate_templates()
+{
+ $query = '
+ UPDATE '.PREFIX_TABLE.'config
+ SET value = \''. array() .'\'
+ WHERE param = \'extents_for_templates\';';
+}
+
// Check access rights
function check_upgrade_access_rights()
{
diff --git a/upgrade.php b/upgrade.php
index dfb3c4c36..b5de61d52 100644
--- a/upgrade.php
+++ b/upgrade.php
@@ -338,6 +338,7 @@ if ((isset($_POST['submit']) or isset($_GET['now']))
}
deactivate_non_standard_themes();
+ deactivate_templates();
$page['upgrade_end'] = get_moment();