mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
Merge pull request #45 from Ben-Speakman/patch-1
Fix RsyncMultiHostPublisher config loading error
This commit is contained in:
commit
937a3b5606
@ -65,11 +65,13 @@ class RsyncMultiHostPublisher extends FilesystemPublisher {
|
||||
if(isset($_GET['norsync']) && $_GET['norsync']) return;
|
||||
|
||||
$extraArg = "";
|
||||
if($this->config()->excluded_folders) foreach($this->config()->excluded_folders as $folder) {
|
||||
$excludedFolders = Config::inst()->get('RsyncMultiHostPublisher', 'excluded_folders');
|
||||
if($excludedFolders) foreach($excludedFolders as $folder) {
|
||||
$extraArg .= " --exclude " . escapeshellarg($folder);
|
||||
}
|
||||
|
||||
foreach((array)$this->config()->targets as $target) {
|
||||
$targets = Config::inst()->get('RsyncMultiHostPublisher', 'targets');
|
||||
foreach((array)$targets as $target) {
|
||||
// Transfer non-PHP content from everything to the target; that will ensure that we have all the JS/CSS/etc
|
||||
$rsyncOutput = `cd $base; rsync -av -e ssh --exclude /.htaccess --exclude /web.config --exclude '*.php' --exclude '*.svn' --exclude '*.git' --exclude '*~' $extraArg --delete . $target`;
|
||||
// Then transfer "safe" PHP from the cache/ directory
|
||||
|
Loading…
Reference in New Issue
Block a user