BUG call log() function on instance of UserFormsUpgradeService, to remove run time error that says 'log' function doesn't exists on UserFormsUpgradeTask class

This commit is contained in:
Normann Lou 2016-01-07 16:00:57 +13:00
parent 564755e4d3
commit 5460a9ef0f
2 changed files with 5 additions and 6 deletions

View File

@ -189,7 +189,7 @@ class UserFormsUpgradeService {
return $rule;
}
protected function log($message) {
public function log($message) {
if($this->getQuiet()) {
return;
}

View File

@ -12,11 +12,10 @@ class UserFormsUpgradeTask extends BuildTask {
protected $description = "Upgrade tool for sites upgrading to userforms 3.0";
public function run($request) {
$this->log("Upgrading userforms module");
Injector::inst()
->create('UserFormsUpgradeService')
->setQuiet(false)
$service = Injector::inst()->create('UserFormsUpgradeService');
$service->log("Upgrading userforms module");
$service->setQuiet(false)
->run();
$this->log("Done");
$service->log("Done");
}
}