From 727f930e3172a8e6265ab0bbf8910dbd53eae533 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sun, 15 Nov 2009 23:44:15 +0000 Subject: [PATCH] BUGFIX: Made use of new BasicAuth::protect_entire_site() consistent. (from r91658) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@91660 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- email/Email.php | 2 +- security/BasicAuth.php | 4 ++-- tests/api/RestfulServiceTest.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/email/Email.php b/email/Email.php index 8def34821..062dc43ab 100755 --- a/email/Email.php +++ b/email/Email.php @@ -629,7 +629,7 @@ class Email_Template extends Email { class Email_BounceHandler extends Controller { function init() { - BasicAuth::disable(); + BasicAuth::protect_entire_site(false); parent::init(); } diff --git a/security/BasicAuth.php b/security/BasicAuth.php index 00a190a58..649eb380f 100755 --- a/security/BasicAuth.php +++ b/security/BasicAuth.php @@ -90,7 +90,7 @@ class BasicAuth extends Object { * @deprecated Use BasicAuth::protect_entire_site() instead. */ static function enable() { - user_error("BasicAuth::enable() is deprated. Use BasicAuth::protect_entire_site() instead.", E_USER_NOTICE); + user_error("BasicAuth::enable() is deprecated. Use BasicAuth::protect_entire_site() instead.", E_USER_NOTICE); return self::protect_entire_site(); } @@ -98,7 +98,7 @@ class BasicAuth extends Object { * @deprecated Use BasicAuth::protect_entire_site(false) instead. */ static function disable() { - user_error("BasicAuth::disable() is deprated. Use BasicAuth::protect_entire_site(false) instead.", E_USER_NOTICE); + user_error("BasicAuth::disable() is deprecated. Use BasicAuth::protect_entire_site(false) instead.", E_USER_NOTICE); return self::protect_entire_site(false); } diff --git a/tests/api/RestfulServiceTest.php b/tests/api/RestfulServiceTest.php index ddf8d7ea9..2eb18bb9f 100644 --- a/tests/api/RestfulServiceTest.php +++ b/tests/api/RestfulServiceTest.php @@ -65,7 +65,7 @@ class RestfulServiceTest extends SapphireTest { class RestfulServiceTest_Controller extends Controller { public function index() { ContentNegotiator::disable(); - BasicAuth::disable(); + BasicAuth::protect_entire_site(false); $request_count = count($_REQUEST); $get_count = count($_GET); $post_count = count($_POST); @@ -98,7 +98,7 @@ XML; public function invalid() { ContentNegotiator::disable(); - BasicAuth::disable(); + BasicAuth::protect_entire_site(false); $out = <<