aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions.inc.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/functions.inc.php29
1 files changed, 28 insertions, 1 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php
index cf865d6c8..d49317d22 100644
--- a/include/functions.inc.php
+++ b/include/functions.inc.php
@@ -488,7 +488,7 @@ function pwg_debug( $string )
*/
function redirect( $url )
{
- global $user, $template, $lang_info, $conf, $lang, $t2, $page;
+ global $user, $template, $lang_info, $conf, $lang, $t2, $page, $debug;
// $refresh, $url_link and $title are required for creating an automated
// refresh page in header.tpl
@@ -972,4 +972,31 @@ SELECT '.$conf['user_fields']['email'].'
return $email;
}
+
+/**
+ * which upgrades are available ?
+ *
+ * @return array
+ */
+function get_available_upgrade_ids()
+{
+ $upgrades_path = PHPWG_ROOT_PATH.'install/db';
+
+ $available_upgrade_ids = 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($available_upgrade_ids, $match[1]);
+ }
+ }
+ }
+ natcasesort($available_upgrade_ids);
+
+ return $available_upgrade_ids;
+}
?>