diff options
author | d-skora <d.skora@clearcode.cc> | 2014-10-06 20:05:42 +0400 |
---|---|---|
committer | d-skora <d.skora@clearcode.cc> | 2014-10-15 14:44:37 +0400 |
commit | e22ac8b2f0580ea76231acf930a2d1a56e1cad3b (patch) | |
tree | 9a058b655adac0ae938f0a65e20f35ac1f6606d9 /plugins/DBStats | |
parent | fa99aef41e32849921f90d3b4d3ab0b5c0019004 (diff) |
refactoring of code, fixes for hiding classes
Diffstat (limited to 'plugins/DBStats')
-rw-r--r-- | plugins/DBStats/API.php | 5 | ||||
-rw-r--r-- | plugins/DBStats/DBStats.php | 13 |
2 files changed, 4 insertions, 14 deletions
diff --git a/plugins/DBStats/API.php b/plugins/DBStats/API.php index f6443b12da..b0531fe606 100644 --- a/plugins/DBStats/API.php +++ b/plugins/DBStats/API.php @@ -13,14 +13,14 @@ use Piwik\DataTable; use Piwik\Piwik; /** - * @hide ExceptForSuperUser + * * @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() */ class API extends \Piwik\Plugin\API @@ -42,6 +42,7 @@ class API extends \Piwik\Plugin\API * Gets some general information about this Piwik installation, including the count of * websites tracked, the count of users and the total space used by the database. * + * @hide ExceptForSuperUser * @return array Contains the website count, user count and total space used by the database. */ public function getGeneralInformation() diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php index 45269630b5..1f5f9d7609 100644 --- a/plugins/DBStats/DBStats.php +++ b/plugins/DBStats/DBStats.php @@ -23,8 +23,7 @@ class DBStats extends \Piwik\Plugin { return array( 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', - "TestingEnvironment.addHooks" => 'setupTestEnvironment', - 'API.DocumentationGenerator.hideExceptForSuperUser' => 'checkIfNotSuperUser' + "TestingEnvironment.addHooks" => 'setupTestEnvironment' ); } @@ -40,14 +39,4 @@ class DBStats extends \Piwik\Plugin $dao = new Mocks\MockDataAccess(); }); } - - public function checkIfNotSuperUser(&$response) - { - try { - Piwik::checkUserHasSuperUserAccess(); - $response = false; - } catch (\Exception $e) { - $response = true; - } - } } |