Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-03-17 06:18:24 +0300
committerdiosmosis <benaka@piwik.pro>2015-03-17 06:18:24 +0300
commit82a5a9fdce43b2db6313893ff13d70e90b1a7a41 (patch)
tree719e46f2f91d7344fb507110998d7fe7fe5453ab /plugins
parent25d1af263cc08a7fa1ac1ee6f12cd6cc57802a38 (diff)
parentf76ec2495b19c8b33b8f74f6e3e7e8d9be45324a (diff)
Merge branch 'master' into 7276_update_command_progress
Conflicts: CHANGELOG.md
Diffstat (limited to 'plugins')
-rw-r--r--plugins/DBStats/API.php13
-rw-r--r--plugins/Dashboard/API.php4
-rw-r--r--plugins/Insights/API.php6
-rw-r--r--plugins/UsersManager/API.php6
4 files changed, 9 insertions, 20 deletions
diff --git a/plugins/DBStats/API.php b/plugins/DBStats/API.php
index 30def6cf79..47417dbc35 100644
--- a/plugins/DBStats/API.php
+++ b/plugins/DBStats/API.php
@@ -13,12 +13,6 @@ use Piwik\DataTable;
use Piwik\Piwik;
/**
- *
- * @see plugins/DBStats/MySQLMetadataProvider.php
- */
-require_once PIWIK_INCLUDE_PATH . '/plugins/DBStats/MySQLMetadataProvider.php';
-
-/**
* DBStats API is used to request the overall status of the Mysql tables in use by Piwik.
* @hideExceptForSuperUser
* @method static \Piwik\Plugins\DBStats\API getInstance()
@@ -30,12 +24,9 @@ class API extends \Piwik\Plugin\API
*/
private $metadataProvider;
- /**
- * Constructor.
- */
- protected function __construct()
+ public function __construct(MySQLMetadataProvider $metadataProvider)
{
- $this->metadataProvider = new MySQLMetadataProvider();
+ $this->metadataProvider = $metadataProvider;
}
/**
diff --git a/plugins/Dashboard/API.php b/plugins/Dashboard/API.php
index d8994c229e..f4637e862a 100644
--- a/plugins/Dashboard/API.php
+++ b/plugins/Dashboard/API.php
@@ -19,9 +19,9 @@ class API extends \Piwik\Plugin\API
{
private $dashboard = null;
- protected function __construct()
+ public function __construct(Dashboard $dashboard)
{
- $this->dashboard = new Dashboard();
+ $this->dashboard = $dashboard;
}
/**
diff --git a/plugins/Insights/API.php b/plugins/Insights/API.php
index 20cb649649..4b3228ffc2 100644
--- a/plugins/Insights/API.php
+++ b/plugins/Insights/API.php
@@ -39,11 +39,9 @@ class API extends \Piwik\Plugin\API
*/
private $model;
- protected function __construct()
+ public function __construct(Model $model)
{
- parent::__construct();
-
- $this->model = new Model();
+ $this->model = $model;
}
private function getOverviewReports()
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php
index b1c7c227e3..ccb4dac126 100644
--- a/plugins/UsersManager/API.php
+++ b/plugins/UsersManager/API.php
@@ -45,9 +45,9 @@ class API extends \Piwik\Plugin\API
private static $instance = null;
- protected function __construct()
+ public function __construct(Model $model)
{
- $this->model = new Model();
+ $this->model = $model;
}
/**
@@ -71,7 +71,7 @@ class API extends \Piwik\Plugin\API
self::$instance = $instance;
} catch (Exception $e) {
- self::$instance = new self;
+ self::$instance = StaticContainer::get('Piwik\Plugins\UsersManager\API');
StaticContainer::getContainer()->set('UsersManager_API', self::$instance);
}