mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ENHANCEMENT #2853 - Added dev/build as a the new name for db/build; prettied it up
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63022 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
1be18b792c
commit
92946e4ae7
@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* Base class for URL access to development tools. Currently supports the
|
||||
* TestRunner and TaskRunner.
|
||||
* ; and TaskRunner.
|
||||
*
|
||||
* @todo documentation for how to add new unit tests and tasks
|
||||
* @package sapphire
|
||||
@ -24,10 +24,10 @@ class DevelopmentAdmin extends Controller {
|
||||
echo <<<HTML
|
||||
<div class="options">
|
||||
<ul>
|
||||
<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>
|
||||
<li style="margin-bottom: 1em"><a href="{$base}dev/build"><b>/dev/build:</b> Build/rebuild this environment (formerly db/build). Call this whenever you have updated your project sources</a></li>
|
||||
<li><a href="{$base}dev/tests"><b>/dev/tests:</b> See a list of unit tests to run</a></li>
|
||||
<li><a href="{$base}dev/tasks"><b>/dev/tasks:</b> See a list of build tasks to run</a></li>
|
||||
<li><a href="{$base}dev/viewcode"><b>/dev/viewcode:</b> Read source code in a literate programming style</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
HTML;
|
||||
@ -42,6 +42,19 @@ HTML;
|
||||
return new TaskRunner();
|
||||
}
|
||||
|
||||
function build() {
|
||||
$renderer = new DebugView();
|
||||
$renderer->writeHeader();
|
||||
$renderer->writeInfo("Environment <i>re</i>Builder (formerly db/build)", Director::absoluteBaseURL());
|
||||
echo "<div style=\"margin: 0 2em\">";
|
||||
|
||||
$da = new DatabaseAdmin();
|
||||
$da->build();
|
||||
|
||||
echo "</div>";
|
||||
$renderer->writeFooter();
|
||||
}
|
||||
|
||||
function errors() {
|
||||
Director::redirect("Debug_");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user