mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fixed URL in the list of tasks.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@69052 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
9b85835604
commit
9f56a774de
@ -19,11 +19,12 @@ class TaskRunner extends Controller {
|
||||
$renderer->writeHeader();
|
||||
$renderer->writeInfo("Sapphire Development Tools: Tasks", Director::absoluteBaseURL());
|
||||
$base = Director::baseURL();
|
||||
|
||||
if(strpos($base,-1) != '/') $base .= '/';
|
||||
|
||||
echo "<ul>";
|
||||
foreach($tasks as $task) {
|
||||
echo "<li>";
|
||||
echo "<a href=\"" . $task['class'] . "\">" . $task['title'] . "</a><br />";
|
||||
echo "<a href=\"{$base}dev/tasks/" . $task['class'] . "\">" . $task['title'] . "</a><br />";
|
||||
echo "<span class=\"description\">" . $task['description'] . "</span>";
|
||||
echo "</li>\n";
|
||||
}
|
||||
@ -48,6 +49,7 @@ class TaskRunner extends Controller {
|
||||
|
||||
$task = new $taskName();
|
||||
if ($task->isEnabled()) $task->run($request);
|
||||
else echo "<p>{$title} is disabled</p>";
|
||||
} else {
|
||||
echo "Build task '$taskName' not found.";
|
||||
if(class_exists($taskName)) echo " It isn't a subclass of BuildTask.";
|
||||
|
Loading…
Reference in New Issue
Block a user