diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2013-11-18 07:02:19 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2013-11-18 07:02:19 +0400 |
commit | 9060f0180cb935efd1925942d3a8ce1cf309459a (patch) | |
tree | b474d8758f3b45063e4bd430f5daa028b369c879 /plugins/CoreUpdater/Controller.php | |
parent | 4658d92891093982d979e7ec8343ee4ccc510a38 (diff) |
getting rid of the fetch parameter
Diffstat (limited to 'plugins/CoreUpdater/Controller.php')
-rw-r--r-- | plugins/CoreUpdater/Controller.php | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/plugins/CoreUpdater/Controller.php b/plugins/CoreUpdater/Controller.php index d9065cb78e..b5eb986ead 100644 --- a/plugins/CoreUpdater/Controller.php +++ b/plugins/CoreUpdater/Controller.php @@ -67,7 +67,7 @@ class Controller extends \Piwik\Plugin\Controller $view->piwik_latest_version_url = self::getLatestZipUrl($newVersion); $view->can_auto_update = Filechecks::canAutoUpdate(); $view->makeWritableCommands = Filechecks::getAutoUpdateMakeWritableMessage(); - echo $view->render(); + return $view->render(); } public function oneClickUpdate() @@ -105,7 +105,7 @@ class Controller extends \Piwik\Plugin\Controller $view = new OneClickDone(Piwik::getCurrentUserTokenAuth()); $view->coreError = $errorMessage; $view->feedbackMessages = $messages; - echo $view->render(); + return $view->render(); } public function oneClickResults() @@ -116,7 +116,7 @@ class Controller extends \Piwik\Plugin\Controller $view = new View('@CoreUpdater/oneClickResults'); $view->coreError = Common::getRequestVar('error', '', 'string', $_POST); $view->feedbackMessages = safe_unserialize(Common::unsanitizeInputValue(Common::getRequestVar('messages', '', 'string', $_POST))); - echo $view->render(); + return $view->render(); } protected function redirectToDashboardWhenNoError($updater) @@ -271,7 +271,8 @@ class Controller extends \Piwik\Plugin\Controller if (!empty($language)) { LanguagesManager::setLanguageForSession($language); } - $this->runUpdaterAndExit(); + + return $this->runUpdaterAndExit(); } protected function runUpdaterAndExit() @@ -292,12 +293,15 @@ class Controller extends \Piwik\Plugin\Controller if (Common::isPhpCliMode()) { $this->doWelcomeUpdates($viewWelcome, $componentsWithUpdateFile); - echo $viewWelcome->render(); + $output = $viewWelcome->render(); if (!$this->coreError && Piwik::getModule() == 'CoreUpdater') { $this->doExecuteUpdates($viewDone, $updater, $componentsWithUpdateFile); - echo $viewDone->render(); + $output .= $viewDone->render(); } + + return $output; + } else { if (Common::getRequestVar('updateCorePlugins', 0, 'integer') == 1) { $this->warningMessages = array(); @@ -305,12 +309,12 @@ class Controller extends \Piwik\Plugin\Controller $this->redirectToDashboardWhenNoError($updater); - echo $viewDone->render(); + return $viewDone->render(); } else { $viewWelcome->queries = $updater->getSqlQueriesToExecute(); $viewWelcome->isMajor = $updater->hasMajorDbUpdate(); $this->doWelcomeUpdates($viewWelcome, $componentsWithUpdateFile); - echo $viewWelcome->render(); + return $viewWelcome->render(); } } exit; |