Removing other uses of Routing.admin as it has been removed from Router.

This commit is contained in:
Mark Story 2010-04-20 23:43:51 -04:00
parent 2fb4d7a98a
commit 120fdd9045
5 changed files with 6 additions and 22 deletions

View file

@ -440,7 +440,7 @@ class ViewTask extends BakeTask {
$this->out("\tWill read the given controller for methods"); $this->out("\tWill read the given controller for methods");
$this->out("\tand bake corresponding views."); $this->out("\tand bake corresponding views.");
$this->out("\tUsing the -admin flag will only bake views for actions"); $this->out("\tUsing the -admin flag will only bake views for actions");
$this->out("\tthat begin with Routing.admin."); $this->out("\tthat begin with Routing.prefixes.");
$this->out("\tIf var scaffold is found it will bake the CRUD actions"); $this->out("\tIf var scaffold is found it will bake the CRUD actions");
$this->out("\t(index,view,add,edit)"); $this->out("\t(index,view,add,edit)");
$this->out(); $this->out();

View file

@ -69,19 +69,6 @@
*/ */
//Configure::write('App.baseUrl', env('SCRIPT_NAME')); //Configure::write('App.baseUrl', env('SCRIPT_NAME'));
/**
* Uncomment the define below to use CakePHP admin routes.
*
* The value of the define determines the name of the route
* and its associated controller actions:
*
* 'admin' -> admin_index() and /admin/controller/index
* 'superuser' -> superuser_index() and /superuser/controller/index
*
* [Note Routing.admin is deprecated in 1.3. Use Routing.prefixes instead]
*/
//Configure::write('Routing.admin', 'admin');
/** /**
* Uncomment the define below to use CakePHP prefix routes. * Uncomment the define below to use CakePHP prefix routes.
* *

View file

@ -168,12 +168,10 @@ class Router {
} }
/** /**
* Sets the Routing prefixes. Includes compatibilty for existing Routing.admin * Sets the Routing prefixes.
* configurations.
* *
* @return void * @return void
* @access private * @access private
* @todo Remove support for Routing.admin in future versions.
*/ */
function __setPrefixes() { function __setPrefixes() {
$routing = Configure::read('Routing'); $routing = Configure::read('Routing');

View file

@ -1467,8 +1467,8 @@ class AuthTest extends CakeTestCase {
* @return void * @return void
*/ */
function testLoginActionRedirect() { function testLoginActionRedirect() {
$admin = Configure::read('Routing.admin'); $admin = Configure::read('Routing.prefixes');
Configure::write('Routing.admin', 'admin'); Configure::write('Routing.prefixes', array('admin'));
Router::reload(); Router::reload();
$url = '/admin/auth_test/login'; $url = '/admin/auth_test/login';
@ -1494,7 +1494,7 @@ class AuthTest extends CakeTestCase {
$this->assertNull($this->Controller->testUrl); $this->assertNull($this->Controller->testUrl);
Configure::write('Routing.admin', $admin); Configure::write('Routing.prefixes', $admin);
} }
/** /**

View file

@ -571,7 +571,6 @@ class RouterTest extends CakeTestCase {
$expected = '/page/my-page'; $expected = '/page/my-page';
$this->assertEqual($result, $expected); $this->assertEqual($result, $expected);
Configure::write('Routing.admin', 'admin');
Router::reload(); Router::reload();
Router::setRequestInfo(array( Router::setRequestInfo(array(
@ -980,7 +979,7 @@ class RouterTest extends CakeTestCase {
} }
/** /**
* Test that Routing.prefixes and Routing.admin are used when a Router instance is created * Test that Routing.prefixes are used when a Router instance is created
* or reset * or reset
* *
* @return void * @return void