From e4a43c99e421c830e569eaae6294286ed51e0ad8 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 11 Jan 2011 21:41:20 -0800 Subject: Mirror .htaccess PHP settings into php.ini for hosts that have per-dir php.ini support configured, but don't use .htaccess. Fixes #1603. --- .htaccess | 5 +++++ 1 file changed, 5 insertions(+) (limited to '.htaccess') diff --git a/.htaccess b/.htaccess index 1e3a558d..5a329520 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,8 @@ +# Set some reasonable defaults for PHP. Most of these cannot be set +# inside the script itself. For hosts that don't have .htaccess +# support but do support per-dir php.ini files, these settings are +# mirrored in php.ini +# php_flag short_open_tag On php_flag magic_quotes_gpc Off -- cgit v1.2.3 From 29be21bb0deaf70558b1aa02a115e67daefea0bd Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 17 Jan 2011 17:27:16 -0800 Subject: Add BUILD_NUMBER to the security check in .htaccess Change BUILD_NUMBER to be .ini format and add a big "do not edit" comment. --- .htaccess | 2 +- BUILD_NUMBER | 7 ++++++- modules/gallery/helpers/gallery.php | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to '.htaccess') 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". # -# +# # Order deny,allow # Deny from all # 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 -- cgit v1.2.3 From c46d5f3da9dafb55045d9535ec5f9e09b9926c1a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 17 Jan 2011 17:35:57 -0800 Subject: Rename BUILD_NUMBER->.build_number --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.htaccess') diff --git a/.htaccess b/.htaccess index 771a8df0..d255efaa 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". # -# +# # Order deny,allow # Deny from all # -- cgit v1.2.3