Merge pull request #423 from normann/issue/issue-351

issue-351, run-time error 'log' function doesn't exist on UserFormsUpgradeTask class
This commit is contained in:
Damian Mooyman 2016-01-08 12:56:55 +13:00
commit 227763e164
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");
} }
} }