From 5a27ce7e8f3f90b20ba6aee7f83740776a82b578 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 15 Nov 2009 19:10:56 -0800 Subject: Save/restore $_SERVER before/after tests to avoid contamination. Fix albums/photos tests to make sure we're really getting the HTTP_REFERER back. --- modules/comment/tests/Comment_Helper_Test.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'modules/comment') diff --git a/modules/comment/tests/Comment_Helper_Test.php b/modules/comment/tests/Comment_Helper_Test.php index 9a8c83f1..82b7ebd2 100644 --- a/modules/comment/tests/Comment_Helper_Test.php +++ b/modules/comment/tests/Comment_Helper_Test.php @@ -24,6 +24,7 @@ class Comment_Helper_Test extends Unit_Test_Case { public function setup() { $this->_ip_address = Input::instance()->ip_address; $this->_user_agent = Kohana::$user_agent; + $this->_save = $_SERVER; $_SERVER["HTTP_ACCEPT"] = "HTTP_ACCEPT"; $_SERVER["HTTP_ACCEPT_CHARSET"] = "HTTP_ACCEPT_CHARSET"; @@ -42,6 +43,7 @@ class Comment_Helper_Test extends Unit_Test_Case { public function teardown() { Input::instance()->ip_address = $this->_ip_address; Kohana::$user_agent = $this->_user_agent; + $_SERVER = $this->_save; } public function create_comment_for_guest_test() { -- cgit v1.2.3 From e0f4e6500de0b5f0e9de973eadcd879c45da8e18 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 15 Nov 2009 19:34:44 -0800 Subject: Use text::alternate() instead of hand-rolled even/odd code. --- modules/comment/views/admin_block_recent_comments.html.php | 4 ++-- modules/comment/views/admin_comments.html.php | 4 ++-- modules/gallery/views/admin_advanced_settings.html.php | 4 +--- modules/gallery/views/admin_identity.html.php | 4 +--- modules/gallery/views/admin_maintenance.html.php | 12 +++--------- modules/gallery/views/admin_modules.html.php | 4 +--- 6 files changed, 10 insertions(+), 22 deletions(-) (limited to 'modules/comment') diff --git a/modules/comment/views/admin_block_recent_comments.html.php b/modules/comment/views/admin_block_recent_comments.html.php index 7941e02d..d9776def 100644 --- a/modules/comment/views/admin_block_recent_comments.html.php +++ b/modules/comment/views/admin_block_recent_comments.html.php @@ -1,7 +1,7 @@