aboutsummaryrefslogtreecommitdiffstats
path: root/install/upgrade_2.3.0.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2012-07-02 22:28:50 +0000
committerplegall <plg@piwigo.org>2012-07-02 22:28:50 +0000
commit52fa0fed5e4a63c63464d4f630db97a0a2e024a1 (patch)
treea83144a89225289da4a9fd2512d73b46aaf7c36e /install/upgrade_2.3.0.php
parent39d54098e77c2cfeb0ac75f73aa73da3f1ee1bcb (diff)
merge r16312 from branch 2.4 to trunk
bug 2677 fixed: smarter check of the database version and manage partial upgrade. git-svn-id: http://piwigo.org/svn/trunk@16313 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'install/upgrade_2.3.0.php')
-rw-r--r--install/upgrade_2.3.0.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/install/upgrade_2.3.0.php b/install/upgrade_2.3.0.php
index c1aa07df7..0dc5c139c 100644
--- a/install/upgrade_2.3.0.php
+++ b/install/upgrade_2.3.0.php
@@ -52,7 +52,7 @@ $to_apply = array_diff($existing, $applied);
$inserts = array();
foreach ($to_apply as $upgrade_id)
{
- if ($upgrade_id >= 98)
+ if ($upgrade_id >= 112) // TODO change on each release
{
break;
}
@@ -83,11 +83,18 @@ if (!empty($inserts))
ob_start();
echo '<pre>';
-for ($upgrade_id = 112; $upgrade_id <= 127; $upgrade_id++)
+for ($upgrade_id = 112; $upgrade_id <= 127; $upgrade_id++) // TODO change on each release
{
if (!file_exists(UPGRADES_PATH.'/'.$upgrade_id.'-database.php'))
{
- break;
+ continue;
+ }
+
+ // maybe the upgrade task has already been applied in a previous and
+ // incomplete upgrade
+ if (in_array($upgrade_id, $applied))
+ {
+ continue;
}
unset($upgrade_description);