ENHANCEMENT Return the results of the FilesystemSyncTask to the status message in the CMS instead of a generic success message (from r82618)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@89813 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-10-21 04:34:41 +00:00
parent 2436d7869a
commit b2fe474fde
2 changed files with 3 additions and 9 deletions

View File

@ -333,15 +333,9 @@ FilesystemSyncClass.prototype = {
onclick : function() {
statusMessage('Looking for new files');
var options = {
method: 'get',
new Ajax.Request('dev/tasks/FilesystemSyncTask', {
onSuccess: function(t) {
eval(t.responseText);
}
};
new Ajax.Request('dev/tasks/FilesystemSyncTask',{
onSuccess: function(t) {
statusMessage("I have finished looking for files", "good");
statusMessage(t.responseText, "good");
},
onFailure: function(t) {
errorMessage("There was an error looking for new files");

View File

@ -9,6 +9,6 @@ class FilesystemSyncTask extends BuildTask {
SilverStripe, for example, if an author uploads files via FTP.";
function run($request) {
Filesystem::sync();
echo Filesystem::sync();
}
}