Skip to content

Commit

Permalink
Removing other uses of Routing.admin as it has been removed from Router.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 21, 2010
1 parent 2fb4d7a commit 120fdd9
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 22 deletions.
2 changes: 1 addition & 1 deletion cake/console/libs/tasks/view.php
Expand Up @@ -440,7 +440,7 @@ public function help() {
$this->out("\tWill read the given controller for methods");
$this->out("\tand bake corresponding views.");
$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("\t(index,view,add,edit)");
$this->out();
Expand Down
13 changes: 0 additions & 13 deletions cake/console/templates/skel/config/core.php
Expand Up @@ -69,19 +69,6 @@
*/
//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.
*
Expand Down
4 changes: 1 addition & 3 deletions cake/libs/router.php
Expand Up @@ -168,12 +168,10 @@ function __construct() {
}

/**
* Sets the Routing prefixes. Includes compatibilty for existing Routing.admin
* configurations.
* Sets the Routing prefixes.
*
* @return void
* @access private
* @todo Remove support for Routing.admin in future versions.
*/
function __setPrefixes() {
$routing = Configure::read('Routing');
Expand Down
6 changes: 3 additions & 3 deletions cake/tests/cases/libs/controller/components/auth.test.php
Expand Up @@ -1467,8 +1467,8 @@ function testAjaxLogin() {
* @return void
*/
function testLoginActionRedirect() {
$admin = Configure::read('Routing.admin');
Configure::write('Routing.admin', 'admin');
$admin = Configure::read('Routing.prefixes');
Configure::write('Routing.prefixes', array('admin'));
Router::reload();

$url = '/admin/auth_test/login';
Expand All @@ -1494,7 +1494,7 @@ function testLoginActionRedirect() {

$this->assertNull($this->Controller->testUrl);

Configure::write('Routing.admin', $admin);
Configure::write('Routing.prefixes', $admin);
}

/**
Expand Down
3 changes: 1 addition & 2 deletions cake/tests/cases/libs/router.test.php
Expand Up @@ -571,7 +571,6 @@ function testUrlGenerationWithAdminPrefix() {
$expected = '/page/my-page';
$this->assertEqual($result, $expected);

Configure::write('Routing.admin', 'admin');
Router::reload();

Router::setRequestInfo(array(
Expand Down Expand Up @@ -980,7 +979,7 @@ function testRouteSymmetry() {
}

/**
* 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
*
* @return void
Expand Down

0 comments on commit 120fdd9

Please sign in to comment.