ENHANCEMENT FilesystemSyncTask: If folderID GET parameter is available, only synchronise that folder ID - useful for only synchronising a specific folder and it's children (from r82841)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@89815 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-10-21 04:37:02 +00:00
parent 760b7eb67c
commit 399f9d4e31

View File

@ -1,6 +1,6 @@
<?php <?php
class FilesystemSyncTask extends BuildTask { class FilesystemSyncTask extends BuildTask {
protected $title = "Sync Files & Images assets"; protected $title = "Sync Files & Images assets";
protected $description = "The Files & Images system in SilverStripe maintains its own database protected $description = "The Files & Images system in SilverStripe maintains its own database
@ -9,6 +9,13 @@ 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) {
echo Filesystem::sync(); if(isset($_GET['folderID'])) {
$folderID = $_GET['folderID'];
} else {
$folderID = null;
}
echo Filesystem::sync($folderID);
} }
} }