aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2006-02-06 21:52:16 +0000
committerplegall <plg@piwigo.org>2006-02-06 21:52:16 +0000
commit3d0c5236e1848cefbf672df7243ff34b855f7000 (patch)
treed0edd78acc26eb79fb1329a4653fe97c7e2fb73d /install
parent701350ff0519dcf64d43ea63d122574c1dba10e4 (diff)
improvement: upgrades id retrieving in include/common.inc.php and
upgrade_feed.php are now made by dedicated function get_available_upgrade_ids. bug fixed: after an installation, you had to play all available upgrades, which was wrong. install.php inserts informations related to all available upgrades at installation time. Thus avoiding automatic upgrades. git-svn-id: http://piwigo.org/svn/trunk@1027 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--install.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/install.php b/install.php
index e2c2f5eca..68b98547d 100644
--- a/install.php
+++ b/install.php
@@ -338,6 +338,20 @@ INSERT INTO '.USER_INFOS_TABLE.'
(2, \'guest\', \''.$language.'\')
;';
mysql_query($query);
+
+ // Available upgrades must be ignored after a fresh installation. To
+ // make PWG avoid upgrading, we must tell it upgrades have already been
+ // made.
+ foreach (get_available_upgrade_ids() as $upgrade_id)
+ {
+ $query = '
+INSERT INTO '.UPGRADE_TABLE.'
+ (id, applied, description)
+ VALUES
+ ('.$upgrade_id.', NOW(), \'upgrade included in installation\')
+';
+ mysql_query($query);
+ }
}
}