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(
|
||||
'Security//$Action/$ID/$OtherID' => 'Security',
|
||||
//'Security/$Action/$ID' => 'Security',
|
||||
'db/$Action' => 'DatabaseAdmin',
|
||||
'$Controller' => array(
|
||||
),
|
||||
'images/$Action/$Class/$ID/$Field' => 'Image_Uploader',
|
||||
'db//$Action' => 'DatabaseAdmin',
|
||||
'$Controller//$Action/$ID/$OtherID' => '*',
|
||||
'images//$Action/$Class/$ID/$Field' => 'Image_Uploader',
|
||||
'' => 'RootURLController',
|
||||
'sitemap.xml' => 'GoogleSitemap',
|
||||
'api/v1' => 'RestfulServer',
|
||||
@ -92,21 +91,6 @@ Security::set_password_encryption_algorithm('sha1', true);
|
||||
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->writeHeader();
|
||||
$renderer->writeInfo("Sapphire Development Tools", Director::absoluteBaseURL());
|
||||
$base = Director::baseURL();
|
||||
echo <<<HTML
|
||||
<div class="options">
|
||||
<ul>
|
||||
<li><a href="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="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}dev/tests">/dev/tests: See a list of unit tests 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="{$base}dev/viewcode">/dev/viewcode: Read source code in a literate programming style</a></li>
|
||||
<li><a href="{$base}db/build?flush=1">/db/build?flush=1: Rebuild the database</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
HTML;
|
||||
@ -34,20 +35,20 @@ HTML;
|
||||
}
|
||||
|
||||
function tests($request) {
|
||||
$controller = new TestRunner();
|
||||
return $controller->handleRequest($request);
|
||||
return new TestRunner();
|
||||
}
|
||||
|
||||
function tasks() {
|
||||
$controller = new TaskRunner();
|
||||
return $controller->handleRequest($request);
|
||||
return new TaskRunner();
|
||||
}
|
||||
|
||||
function errors() {
|
||||
Director::redirect("Debug_");
|
||||
}
|
||||
|
||||
function viewcode($request) {
|
||||
$controller = new CodeViewer();
|
||||
return $controller->handleRequest($request);
|
||||
return new CodeViewer();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user