mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-20 19:39:16 -04:00
Add BUILD_NUMBER to the security check in .htaccess
Change BUILD_NUMBER to be .ini format and add a big "do not edit" comment.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user