diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-07-23 11:52:15 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-07-23 11:52:15 +0400 |
commit | 5104d94f3b2250f766b9c520e2da8da9b4cab2e9 (patch) | |
tree | 5f30daf7bc14373fb1bbd0504ce11a771dafc02f /plugins/SegmentEditor | |
parent | ae4b1f4e38077b174e4df5b7d4513d63fe026a24 (diff) |
Refs #4059 Work in progress: Conversion to use Namespaces of dozen more classes
Removed many Piwik_ functions, in Piwik 2 it is best practise to use the methods calls instead
Todo: finish converting core/ classes + convert plugins/ classes to use \Piwik\Plugin namespace + fix build + Merge master
Diffstat (limited to 'plugins/SegmentEditor')
-rw-r--r-- | plugins/SegmentEditor/Controller.php | 6 | ||||
-rw-r--r-- | plugins/SegmentEditor/SegmentEditor.php | 5 |
2 files changed, 7 insertions, 4 deletions
diff --git a/plugins/SegmentEditor/Controller.php b/plugins/SegmentEditor/Controller.php index bafab7ac46..4083369ece 100644 --- a/plugins/SegmentEditor/Controller.php +++ b/plugins/SegmentEditor/Controller.php @@ -10,16 +10,18 @@ */ use Piwik\Piwik; use Piwik\Common; +use Piwik\Controller; +use Piwik\View; /** * @package Piwik_SegmentEditor */ -class Piwik_SegmentEditor_Controller extends Piwik_Controller +class Piwik_SegmentEditor_Controller extends Controller { public function getSelector() { - $view = new Piwik_View('@SegmentEditor/getSelector'); + $view = new View('@SegmentEditor/getSelector'); $idSite = Common::getRequestVar('idSite'); $this->setGeneralVariablesView($view); $segments = Piwik_API_API::getInstance()->getSegmentsMetadata($idSite); diff --git a/plugins/SegmentEditor/SegmentEditor.php b/plugins/SegmentEditor/SegmentEditor.php index a4f54d01e7..0d539b078f 100644 --- a/plugins/SegmentEditor/SegmentEditor.php +++ b/plugins/SegmentEditor/SegmentEditor.php @@ -9,6 +9,7 @@ * @package Piwik_SegmentEditor */ use Piwik\Common; +use Piwik\Version; use Piwik\Plugin; /** @@ -25,7 +26,7 @@ class Piwik_SegmentEditor extends Plugin 'description' => 'Create and reuse custom visitor Segments with the Segment Editor.', 'author' => 'Piwik', 'author_homepage' => 'http://piwik.org/', - 'version' => Piwik_Version::VERSION, + 'version' => Version::VERSION, ); } @@ -84,7 +85,7 @@ class Piwik_SegmentEditor extends Plugin ) DEFAULT CHARSET=utf8'; try { foreach ($queries as $query) { - Piwik_Exec($query); + Db::exec($query); } } catch (Exception $e) { if (!Zend_Registry::get('db')->isErrNo($e, '1050')) { |