mirror of
https://github.com/silverstripe/silverstripe-staticpublisher
synced 2024-10-22 14:05:54 +02:00
Pass quiet mode through to publisher
This commit is contained in:
parent
c8d1b4b2e4
commit
6d84b1e049
@ -7,7 +7,11 @@ class RebuildStaticCacheTask extends BuildTask {
|
||||
private static $quiet = false;
|
||||
|
||||
public function run($request) {
|
||||
Config::inst()->update('StaticPublisher', 'echo_progress', true);
|
||||
if(Config::inst()->get('RebuildStaticCacheTask', 'quiet')) {
|
||||
Config::inst()->update('StaticPublisher', 'echo_progress', false);
|
||||
} else {
|
||||
Config::inst()->update('StaticPublisher', 'echo_progress', true);
|
||||
}
|
||||
|
||||
$page = singleton('Page');
|
||||
|
||||
@ -28,7 +32,7 @@ class RebuildStaticCacheTask extends BuildTask {
|
||||
$this->rebuildCache($urls, true);
|
||||
}
|
||||
|
||||
public function log($message) {
|
||||
public function log($message = null) {
|
||||
$quiet = Config::inst()->get('RebuildStaticCacheTask', 'quiet');
|
||||
|
||||
if($quiet) {
|
||||
@ -101,7 +105,9 @@ class RebuildStaticCacheTask extends BuildTask {
|
||||
if($removeAll && !isset($_GET['urls']) && $start == 0 && file_exists("../cache")) {
|
||||
$this->log("Removing stale cache files... \n");
|
||||
|
||||
flush();
|
||||
if(!$quiet) {
|
||||
flush();
|
||||
}
|
||||
|
||||
if (Config::inst()->get('FilesystemPublisher', 'domain_based_caching')) {
|
||||
// Glob each dir, then glob each one of those
|
||||
|
Loading…
Reference in New Issue
Block a user