summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.htaccess2
-rw-r--r--BUILD_NUMBER7
-rw-r--r--modules/gallery/helpers/gallery.php4
3 files changed, 9 insertions, 4 deletions
diff --git a/.htaccess b/.htaccess
index 5a329520..771a8df0 100644
--- a/.htaccess
+++ b/.htaccess
@@ -29,7 +29,7 @@
# in your Apache2 config file before you uncomment this block or
# you'll get an "Internal Server Error".
#
-# <FilesMatch "(\.(class|fla|gitignore|inc|ini|sql|txt)|(README|LICENSE))$">
+# <FilesMatch "(\.(class|fla|gitignore|inc|ini|sql|txt)|(README|LICENSE|BUILD_NUMBER))$">
# Order deny,allow
# Deny from all
# </FilesMatch>
diff --git a/BUILD_NUMBER b/BUILD_NUMBER
index 0691f67b..d32d51e9 100644
--- a/BUILD_NUMBER
+++ b/BUILD_NUMBER
@@ -1 +1,6 @@
-52
+; This file keeps track of the build number for the "master"
+; branch of gallery3. It's kept up to date by an automated
+; process. You don't need to edit it. In fact..
+;
+; DO NOT EDIT THIS FILE BY HAND!
+build_number=52
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index 31b342db..7a60f56a 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -205,7 +205,7 @@ class gallery_Core {
* Return the contents of the BUILD_NUMBER file, which should be a single integer.
*/
static function build_number() {
- $lines = file(DOCROOT . "BUILD_NUMBER", FILE_IGNORE_NEW_LINES);
- return $lines[0];
+ $result = parse_ini_file(DOCROOT . "BUILD_NUMBER");
+ return $result["build_number"];
}
} \ No newline at end of file