mirror of
https://github.com/silverstripe/doc.silverstripe.org
synced 2024-10-22 17:05:50 +02:00
7ecbf49ac9
git-svn-id: http://svn.silverstripe.com/projects/ss2doc/branches/v2@117896 467b73ca-7a2a-4603-9d3b-597d59a354a9
25 lines
655 B
PHP
25 lines
655 B
PHP
<?php
|
|
/**
|
|
* @package cms
|
|
* @subpackage assets
|
|
*/
|
|
class FilesystemSyncTask extends BuildTask {
|
|
|
|
protected $title = "Sync Files & Images assets";
|
|
|
|
protected $description = "The Files & Images system in SilverStripe maintains its own database
|
|
of the contents of the assets/ folder. This action will update that database, and
|
|
should be called whenever files are added to the assets/ folder from outside
|
|
SilverStripe, for example, if an author uploads files via FTP.";
|
|
|
|
function run($request) {
|
|
if(isset($_GET['folderID'])) {
|
|
$folderID = $_GET['folderID'];
|
|
} else {
|
|
$folderID = null;
|
|
}
|
|
|
|
echo Filesystem::sync($folderID);
|
|
}
|
|
|
|
} |