From 765be0dc8f92a6d4bb3e678a0c23f2d4b95e0e18 Mon Sep 17 00:00:00 2001 From: mattab Date: Tue, 30 Jul 2013 23:13:56 +0200 Subject: Refs #3741 Resuming PHP Namespaces conversion of Piwik core, mostly finished core/ conversion --- core/Updater.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'core/Updater.php') diff --git a/core/Updater.php b/core/Updater.php index a0000eeb55..1da4f30a44 100644 --- a/core/Updater.php +++ b/core/Updater.php @@ -8,6 +8,8 @@ * @category Piwik * @package Piwik */ +namespace Piwik; + use Piwik\Common; use Piwik\Version; @@ -147,7 +149,7 @@ class Updater * Update the named component * * @param string $componentName 'core', or plugin name - * @throws Exception|Piwik_Updater_UpdateErrorException + * @throws Exception|Updater_UpdateErrorException * @return array of warning strings if applicable */ public function update($componentName) @@ -163,7 +165,7 @@ class Updater } $this->recordComponentSuccessfullyUpdated($componentName, $fileVersion); - } catch (Piwik_Updater_UpdateErrorException $e) { + } catch (Updater_UpdateErrorException $e) { throw $e; } catch (Exception $e) { $warningMessages[] = $e->getMessage(); @@ -278,7 +280,7 @@ class Updater * * @param string $file Update script filename * @param array $sqlarray An array of SQL queries to be executed - * @throws Piwik_Updater_UpdateErrorException + * @throws Updater_UpdateErrorException */ static function updateDatabase($file, $sqlarray) { @@ -290,7 +292,7 @@ class Updater || !Zend_Registry::get('db')->isErrNo($e, $ignoreError) ) { $message = $file . ":\nError trying to execute the query '" . $update . "'.\nThe error was: " . $e->getMessage(); - throw new Piwik_Updater_UpdateErrorException($message); + throw new Updater_UpdateErrorException($message); } } } @@ -303,6 +305,6 @@ class Updater * @package Piwik * @subpackage Updater */ -class Piwik_Updater_UpdateErrorException extends Exception +class Updater_UpdateErrorException extends \Exception { } -- cgit v1.2.3