mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed URL handling for /dev after merge from branches/roa to trunk
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@60362 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1759038d58
commit
cc496ad4f7
22
_config.php
22
_config.php
@ -21,10 +21,9 @@
|
|||||||
Director::addRules(10, array(
|
Director::addRules(10, array(
|
||||||
'Security//$Action/$ID/$OtherID' => 'Security',
|
'Security//$Action/$ID/$OtherID' => 'Security',
|
||||||
//'Security/$Action/$ID' => 'Security',
|
//'Security/$Action/$ID' => 'Security',
|
||||||
'db/$Action' => 'DatabaseAdmin',
|
'db//$Action' => 'DatabaseAdmin',
|
||||||
'$Controller' => array(
|
'$Controller//$Action/$ID/$OtherID' => '*',
|
||||||
),
|
'images//$Action/$Class/$ID/$Field' => 'Image_Uploader',
|
||||||
'images/$Action/$Class/$ID/$Field' => 'Image_Uploader',
|
|
||||||
'' => 'RootURLController',
|
'' => 'RootURLController',
|
||||||
'sitemap.xml' => 'GoogleSitemap',
|
'sitemap.xml' => 'GoogleSitemap',
|
||||||
'api/v1' => 'RestfulServer',
|
'api/v1' => 'RestfulServer',
|
||||||
@ -92,21 +91,6 @@ Security::set_password_encryption_algorithm('sha1', true);
|
|||||||
define('EMAIL_BOUNCEHANDLER_KEY', '1aaaf8fb60ea253dbf6efa71baaacbb3');
|
define('EMAIL_BOUNCEHANDLER_KEY', '1aaaf8fb60ea253dbf6efa71baaacbb3');
|
||||||
|
|
||||||
|
|
||||||
// Default director
|
|
||||||
Director::addRules(10, array(
|
|
||||||
'Security/$Action/$ID' => 'Security',
|
|
||||||
'db/$Action' => 'DatabaseAdmin',
|
|
||||||
'$Controller/$Action/$ID/$OtherID' => '*',
|
|
||||||
'images/$Action/$Class/$ID/$Field' => 'Image_Uploader',
|
|
||||||
'' => 'RootURLController',
|
|
||||||
'sitemap.xml' => 'GoogleSitemap',
|
|
||||||
'api/v1/$ClassName/$ID/$Relation' => 'RestfulServer',
|
|
||||||
'dev/$Action/$NestedAction' => 'DevelopmentAdmin'
|
|
||||||
));
|
|
||||||
|
|
||||||
Director::addRules(1, array(
|
|
||||||
'$URLSegment/$Action/$ID/$OtherID' => 'ModelAsController',
|
|
||||||
));
|
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
@ -20,13 +20,14 @@ class DevelopmentAdmin extends Controller {
|
|||||||
$renderer = new DebugView();
|
$renderer = new DebugView();
|
||||||
$renderer->writeHeader();
|
$renderer->writeHeader();
|
||||||
$renderer->writeInfo("Sapphire Development Tools", Director::absoluteBaseURL());
|
$renderer->writeInfo("Sapphire Development Tools", Director::absoluteBaseURL());
|
||||||
|
$base = Director::baseURL();
|
||||||
echo <<<HTML
|
echo <<<HTML
|
||||||
<div class="options">
|
<div class="options">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="tests">/dev/tests: See a list of unit tests to run</a></li>
|
<li><a href="{$base}dev/tests">/dev/tests: See a list of unit tests to run</a></li>
|
||||||
<li><a href="tasks">/dev/tasks: See a list of build tasks to run</a></li>
|
<li><a href="{$base}dev/tasks">/dev/tasks: See a list of build tasks to run</a></li>
|
||||||
<li><a href="viewcode">/dev/viewcode: Read source code in a literate programming style</a></li>
|
<li><a href="{$base}dev/viewcode">/dev/viewcode: Read source code in a literate programming style</a></li>
|
||||||
<li><a href="../db/build?flush=1">/db/build?flush=1: Rebuild the database</a></li>
|
<li><a href="{$base}db/build?flush=1">/db/build?flush=1: Rebuild the database</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
HTML;
|
HTML;
|
||||||
@ -34,20 +35,20 @@ HTML;
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tests($request) {
|
function tests($request) {
|
||||||
$controller = new TestRunner();
|
return new TestRunner();
|
||||||
return $controller->handleRequest($request);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function tasks() {
|
function tasks() {
|
||||||
$controller = new TaskRunner();
|
return new TaskRunner();
|
||||||
return $controller->handleRequest($request);
|
}
|
||||||
|
|
||||||
|
function errors() {
|
||||||
|
Director::redirect("Debug_");
|
||||||
}
|
}
|
||||||
|
|
||||||
function viewcode($request) {
|
function viewcode($request) {
|
||||||
$controller = new CodeViewer();
|
return new CodeViewer();
|
||||||
return $controller->handleRequest($request);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user