diff options
| author | Nathan Kinkade <nkinkade@nkinka.de> | 2011-01-31 20:49:25 +0000 |
|---|---|---|
| committer | Nathan Kinkade <nkinkade@nkinka.de> | 2011-01-31 20:49:25 +0000 |
| commit | de6f3fce9110b777d61dec97f2a3a61d887a5ccd (patch) | |
| tree | 1a184dc0d6bbfd644164d85d3df1bc9926455da7 /modules/gallery/helpers/gallery.php | |
| parent | 2898fe3b82ce10d045dd2c274a3290bacf209a00 (diff) | |
| parent | d2c77fd0590501f7b6b51d9f4cc033ed9485b082 (diff) | |
Did a git pull, but had to manually merge a conflict.
Diffstat (limited to 'modules/gallery/helpers/gallery.php')
| -rw-r--r-- | modules/gallery/helpers/gallery.php | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php index 282289b5..1fafdef7 100644 --- a/modules/gallery/helpers/gallery.php +++ b/modules/gallery/helpers/gallery.php @@ -1,7 +1,7 @@ <?php defined("SYSPATH") or die("No direct script access."); /** * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2010 Bharat Mediratta + * Copyright (C) 2000-2011 Bharat Mediratta * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,10 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class gallery_Core { - const VERSION = "3.0+ (git)"; + const VERSION = "3.0+"; + const CODE_NAME = ""; + const RELEASE_CHANNEL = "git"; + const RELEASE_BRANCH = "master"; /** * If Gallery is in maintenance mode, then force all non-admins to get routed to a "This site is @@ -184,4 +187,25 @@ class gallery_Core { } putenv("PATH=" . implode(":", $path_env)); } + + /** + * Return a string describing this version of Gallery and the type of release. + */ + static function version_string() { + if (gallery::RELEASE_CHANNEL == "git") { + return sprintf( + "%s (branch %s build %s)", gallery::VERSION, gallery::RELEASE_BRANCH, + gallery::build_number()); + } else { + return sprintf("%s (%s)", gallery::VERSION, gallery::CODE_NAME); + } + } + + /** + * Return the contents of the .build_number file, which should be a single integer. + */ + static function build_number() { + $result = parse_ini_file(DOCROOT . ".build_number"); + return $result["build_number"]; + } }
\ No newline at end of file |
