mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 06:05:56 +00:00
BUGFIX #5023 AssetAdmin::sync() is now used to sync tasks, as it works when the user only has access to the AssetAdmin controller instead of going to dev/tasks/FilesystemSyncTask which can only be run by administrators or if the site is in dev mode
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@100335 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
681eff9eda
commit
b810f0ecbc
@ -35,6 +35,7 @@ class AssetAdmin extends LeftAndMain {
|
||||
'removefile',
|
||||
'save',
|
||||
'savefile',
|
||||
'sync',
|
||||
'uploadiframe',
|
||||
'UploadForm',
|
||||
'deleteUnusedThumbnails' => 'ADMIN'
|
||||
@ -481,6 +482,10 @@ HTML;
|
||||
JS;
|
||||
}
|
||||
|
||||
public function sync() {
|
||||
echo Filesystem::sync();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the entire site tree as a nested UL.
|
||||
* @return string HTML for site tree
|
||||
|
@ -342,7 +342,7 @@ FilesystemSyncClass.prototype = {
|
||||
|
||||
onclick : function() {
|
||||
statusMessage('Looking for new files');
|
||||
new Ajax.Request('dev/tasks/FilesystemSyncTask', {
|
||||
new Ajax.Request('admin/assets/sync', {
|
||||
onSuccess: function(t) {
|
||||
statusMessage(t.responseText, "good");
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user