From d5b37fab3db2e3d2dae07e1f7b524044f55a26d0 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 13 Aug 2008 07:54:34 +0000 Subject: [PATCH] ENHANCEMENT Added default /admin/cms route to cms/_config.php to clear default namespace for other controllers BUGFIX Fixed CMSMainTest to use /admin/crm as a standard URL rather than /admin (which could be overloaded by other admins for application-like interfaces without CMS components) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@60635 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- _config.php | 1 + tests/CMSMainTest.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/_config.php b/_config.php index 8e26bc4b..8a8e595a 100644 --- a/_config.php +++ b/_config.php @@ -16,6 +16,7 @@ Director::addRules(50, array( 'admin/ReportField//$Action/$ID/$Type/$OtherID' => 'ReportField_Controller', 'admin/bulkload//$Action/$ID/$OtherID' => 'BulkLoaderAdmin', 'admin//ImageEditor/$Action' => 'ImageEditor', + 'admin/cms//$Action/$ID/$OtherID' => 'CMSMain', 'admin//$Action/$ID/$OtherID' => 'CMSMain', 'unsubscribe//$Email/$MailingList' => 'Unsubscribe_Controller', 'PageComment//$Action/$ID' => 'PageComment_Controller', diff --git a/tests/CMSMainTest.php b/tests/CMSMainTest.php index 4a848070..ec4ab4da 100644 --- a/tests/CMSMainTest.php +++ b/tests/CMSMainTest.php @@ -11,10 +11,10 @@ class CMSMainTest extends SapphireTest { 'loggedInAs' => $this->idFromFixture('Member', 'admin') )); - $response = Director::test("admin/publishall", array('confirm' => 1), $session); + $response = Director::test("admin/cms/publishall", array('confirm' => 1), $session); $this->assertContains('Done: Published 4 pages', $response->getBody()); - $response = Director::test("admin/publishitems", array('csvIDs' => '1,2', 'ajax' => 1), $session); + $response = Director::test("admin/cms/publishitems", array('csvIDs' => '1,2', 'ajax' => 1), $session); $this->assertContains('setNodeTitle(1, \'Page 1\');', $response->getBody()); $this->assertContains('setNodeTitle(2, \'Page 2\');', $response->getBody());