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.4@91659 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-11-15 23:44:02 +00:00
parent ac239d6a0b
commit 45bbebe19f
5 changed files with 6 additions and 10 deletions

View File

@ -54,10 +54,6 @@ if(defined('SS_ENVIRONMENT_FILE')) {
}
}
if(defined('SS_USE_BASIC_AUTH') && SS_USE_BASIC_AUTH) {
BasicAuth::enable();
}
if(defined('SS_ENVIRONMENT_TYPE')) {
Director::set_environment_type(SS_ENVIRONMENT_TYPE);
}

View File

@ -634,7 +634,7 @@ class Email_Template extends Email {
class Email_BounceHandler extends Controller {
function init() {
BasicAuth::disable();
BasicAuth::protect_entire_site(false);
parent::init();
}

View File

@ -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);
}

View File

@ -39,7 +39,7 @@ class WebserverRoutingTest extends SapphireTest {
*/
class WebserverRoutingTest_Controller extends Controller {
function index() {
BasicAuth::disable();
BasicAuth::protect_entire_site(false);
return "ok";
}

View File

@ -95,7 +95,7 @@ class RestfulServiceTest extends SapphireTest {
class RestfulServiceTest_Controller extends Controller {
public function index() {
ContentNegotiator::disable();
BasicAuth::disable();
BasicAuth::protect_entire_site(false);
$request = '';
foreach ($this->request->requestVars() as $key=>$value) {
@ -126,7 +126,7 @@ XML;
public function invalid() {
ContentNegotiator::disable();
BasicAuth::disable();
BasicAuth::protect_entire_site(false);
$out = <<<XML
<?xml version="1.0"?>
<test>