diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-28 19:17:36 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-28 19:17:36 +0000 |
commit | 7ddd9521b3f3a397da3b0a6b56238d31414eb4be (patch) | |
tree | 6eb6a9a51db5fa0f5d3cc2ec6de29b9e258b12a1 /engine/lib/version.php | |
parent | bd3484417d170e62bc94e9db81d4ad37e8ddee6a (diff) | |
download | elgg-7ddd9521b3f3a397da3b0a6b56238d31414eb4be.tar.gz elgg-7ddd9521b3f3a397da3b0a6b56238d31414eb4be.tar.bz2 |
Standardized code in all of core, not including language files, tests, or core mods.
git-svn-id: http://code.elgg.org/elgg/trunk@7124 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/version.php')
-rw-r--r-- | engine/lib/version.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/engine/lib/version.php b/engine/lib/version.php index db3eb907e..c11707417 100644 --- a/engine/lib/version.php +++ b/engine/lib/version.php @@ -3,15 +3,17 @@ * Elgg version library. * Contains code for handling versioning and upgrades. * - * @package Elgg - * @subpackage Core + * @package Elgg.Core + * @subpackage Version */ /** * Run any php upgrade scripts which are required * - * @param int $version Version upgrading from. - * @param bool $quiet Suppress errors. Don't use this. + * @param int $version Version upgrading from. + * @param bool $quiet Suppress errors. Don't use this. + * + * @return bool */ function upgrade_code($version, $quiet = FALSE) { global $CONFIG; @@ -42,7 +44,7 @@ function upgrade_code($version, $quiet = FALSE) { asort($upgrades); if (sizeof($upgrades) > 0) { - foreach($upgrades as $upgrade) { + foreach ($upgrades as $upgrade) { // hide all errors. if ($quiet) { // hide include errors as well as any exceptions that might happen @@ -68,7 +70,8 @@ function upgrade_code($version, $quiet = FALSE) { /** * Get the current version information * - * @param true|false $humanreadable Whether to return a human readable version (default: false) + * @param bool $humanreadable Whether to return a human readable version (default: false) + * * @return string|false Depending on success */ function get_version($humanreadable = false) { @@ -98,13 +101,15 @@ function version_upgrade_check() { } /** - * Upgrades Elgg + * Upgrades Elgg Database and code + * + * @return bool * */ function version_upgrade() { // It's possible large upgrades could exceed the max execution time. set_time_limit(0); - + $dbversion = (int) datalist_get('version'); // No version number? Oh snap...this is an upgrade from a clean installation < 1.7. |