aboutsummaryrefslogtreecommitdiffstats
path: root/upgrade_feed.php
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 /upgrade_feed.php
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--upgrade_feed.php15
1 files changed, 1 insertions, 14 deletions
diff --git a/upgrade_feed.php b/upgrade_feed.php
index c26390a0d..ca9f9d0c3 100644
--- a/upgrade_feed.php
+++ b/upgrade_feed.php
@@ -56,20 +56,7 @@ SELECT id
$applied = array_from_query($query, 'id');
// retrieve existing upgrades
-$existing = array();
-
-if ($contents = opendir(UPGRADES_PATH))
-{
- while (($node = readdir($contents)) !== false)
- {
- if (is_file(UPGRADES_PATH.'/'.$node)
- and preg_match('/^(.*?)-database\.php$/', $node, $match))
- {
- array_push($existing, $match[1]);
- }
- }
-}
-natcasesort($existing);
+$existing = get_available_upgrade_ids();
// which upgrades need to be applied?
$to_apply = array_diff($existing, $applied);