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; return $rule;
} }
protected function log($message) { public function log($message) {
if($this->getQuiet()) { if($this->getQuiet()) {
return; return;
} }

View File

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