mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
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:
parent
2436d7869a
commit
b2fe474fde
@ -333,15 +333,9 @@ FilesystemSyncClass.prototype = {
|
|||||||
|
|
||||||
onclick : function() {
|
onclick : function() {
|
||||||
statusMessage('Looking for new files');
|
statusMessage('Looking for new files');
|
||||||
var options = {
|
new Ajax.Request('dev/tasks/FilesystemSyncTask', {
|
||||||
method: 'get',
|
|
||||||
onSuccess: function(t) {
|
onSuccess: function(t) {
|
||||||
eval(t.responseText);
|
statusMessage(t.responseText, "good");
|
||||||
}
|
|
||||||
};
|
|
||||||
new Ajax.Request('dev/tasks/FilesystemSyncTask',{
|
|
||||||
onSuccess: function(t) {
|
|
||||||
statusMessage("I have finished looking for files", "good");
|
|
||||||
},
|
},
|
||||||
onFailure: function(t) {
|
onFailure: function(t) {
|
||||||
errorMessage("There was an error looking for new files");
|
errorMessage("There was an error looking for new files");
|
||||||
|
@ -9,6 +9,6 @@ class FilesystemSyncTask extends BuildTask {
|
|||||||
SilverStripe, for example, if an author uploads files via FTP.";
|
SilverStripe, for example, if an author uploads files via FTP.";
|
||||||
|
|
||||||
function run($request) {
|
function run($request) {
|
||||||
Filesystem::sync();
|
echo Filesystem::sync();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user