aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/upgrade.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-09-29 18:16:03 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-09-29 18:16:03 -0700
commitbfdb9bb8a87a29038ba1ae25355684ae19678fdd (patch)
treea074e2d6bfa19c17b284c3950b4555cf584eabe2 /engine/lib/upgrade.php
parent7be23080f34a8f92ca1f8d49c3aa0e6ce3472f4c (diff)
parenta458ae4e0f8e5b19884860fead6e5f901b95eca4 (diff)
downloadelgg-bfdb9bb8a87a29038ba1ae25355684ae19678fdd.tar.gz
elgg-bfdb9bb8a87a29038ba1ae25355684ae19678fdd.tar.bz2
Merge branch 'master' of github.com:brettp/Elgg
Diffstat (limited to 'engine/lib/upgrade.php')
-rw-r--r--engine/lib/upgrade.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/engine/lib/upgrade.php b/engine/lib/upgrade.php
index dc3911062..dc1213187 100644
--- a/engine/lib/upgrade.php
+++ b/engine/lib/upgrade.php
@@ -160,7 +160,7 @@ function elgg_get_upgrade_files($upgrade_path = null) {
}
/**
- * Get the current version information
+ * Get the current Elgg version information
*
* @param bool $humanreadable Whether to return a human readable version (default: false)
*
@@ -169,13 +169,18 @@ function elgg_get_upgrade_files($upgrade_path = null) {
function get_version($humanreadable = false) {
global $CONFIG;
+ static $version, $release;
+
if (isset($CONFIG->path)) {
- if (include($CONFIG->path . "version.php")) {
- return (!$humanreadable) ? $version : $release;
+ if (!isset($version) || !isset($release)) {
+ if (!include($CONFIG->path . "version.php")) {
+ return false;
+ }
}
+ return (!$humanreadable) ? $version : $release;
}
- return FALSE;
+ return false;
}
/**