BUGFIX If running a BuildTask via AJAX, e.g. Filesystem::sync() is run from AssetAdmin, don't show the message "Running [task] ..."

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@95169 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-12-14 10:11:52 +00:00 committed by Sam Minnee
parent f53a30f69c
commit b359180355

View File

@ -51,7 +51,7 @@ class TaskRunner extends Controller {
if (class_exists($taskName) && is_subclass_of($taskName, 'BuildTask')) { if (class_exists($taskName) && is_subclass_of($taskName, 'BuildTask')) {
$title = singleton($taskName)->getTitle(); $title = singleton($taskName)->getTitle();
if(Director::is_cli()) echo "Running task '$title'...\n\n"; if(Director::is_cli()) echo "Running task '$title'...\n\n";
else echo "<h1>Running task '$title'...</h1>\n"; elseif(!Director::is_ajax()) echo "<h1>Running task '$title'...</h1>\n";
$task = new $taskName(); $task = new $taskName();
if ($task->isEnabled()) $task->run($request); if ($task->isEnabled()) $task->run($request);