diff options
author | sgiehl <stefan@piwik.org> | 2015-01-14 23:56:06 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-01-14 23:56:06 +0300 |
commit | a778ac88c864bdaaa205fbfccdbc409b5d1de443 (patch) | |
tree | 06eb269323d28b5db0915456bc8fd3621756d6df | |
parent | f4fc940f2c37c1ab8178e50b15b5479e2aef5261 (diff) |
removed several occurences of UserSettings plugin
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | core/API/Proxy.php | 2 | ||||
-rw-r--r-- | core/API/Request.php | 8 | ||||
-rw-r--r-- | core/Archive.php | 2 | ||||
-rw-r--r-- | core/Piwik.php | 2 | ||||
-rw-r--r-- | core/Plugin/ComponentFactory.php | 4 | ||||
-rw-r--r-- | core/Plugin/Manager.php | 6 | ||||
-rw-r--r-- | core/Url.php | 2 | ||||
-rw-r--r-- | core/ViewDataTable/Config.php | 6 | ||||
-rw-r--r-- | core/ViewDataTable/Factory.php | 2 | ||||
-rw-r--r-- | misc/others/api_internal_call.php | 2 | ||||
-rw-r--r-- | plugins/CoreHome/javascripts/dataTable.js | 4 | ||||
-rw-r--r-- | plugins/ScheduledReports/tests/Integration/ApiTest.php | 4 | ||||
-rw-r--r-- | plugins/TestRunner/TravisYml/TravisYmlView.php | 2 | ||||
-rw-r--r-- | plugins/Widgetize/Controller.php | 4 | ||||
-rwxr-xr-x | tests/PHPUnit/Framework/TestCase/SystemTestCase.php | 2 | ||||
-rwxr-xr-x | tests/PHPUnit/System/BlobReportLimitingTest.php | 2 | ||||
-rw-r--r-- | tests/PHPUnit/System/PivotByQueryParamTest.php | 2 |
18 files changed, 30 insertions, 28 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e25f611c38..fbf72a76b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ This is a changelog for Piwik platform developers. All changes for our HTTP API' * `Piwik\Metrics\Formatter::getCurrencyList()`: use `CurrencyDataProvider::getCurrencyList()` instead * The `Piwik\Translate` class has been deprecated in favor of `Piwik\Translation\Translator`. * The `core:plugin` console has been deprecated in favor of the new `plugin:list`, `plugin:activate` and `plugin:deactivate` commands +* The API method `UserSettings.getLanguage` is deprecated and will be removed from May 1st 2015. Use `UserLanguage.getLanguage` instead +* The API method `UserSettings.getLanguageCode` is deprecated and will be removed from May 1st 2015. Use `UserLanguage.getLanguageCode` instead ## Piwik 2.10.0 diff --git a/core/API/Proxy.php b/core/API/Proxy.php index f442949a3c..0345693b62 100644 --- a/core/API/Proxy.php +++ b/core/API/Proxy.php @@ -415,7 +415,7 @@ class Proxy extends Singleton } /** - * Includes the class API by looking up plugins/UserSettings/API.php + * Includes the class API by looking up plugins/xxx/API.php * * @param string $fileName api class name eg. "API" * @throws Exception diff --git a/core/API/Request.php b/core/API/Request.php index 2d97ba6f41..631000194b 100644 --- a/core/API/Request.php +++ b/core/API/Request.php @@ -46,7 +46,7 @@ use Piwik\Log; * * **Basic Usage** * - * $request = new Request('method=UserSettings.getLanguage&idSite=1&date=yesterday&period=week' + * $request = new Request('method=UserLanguage.getLanguage&idSite=1&date=yesterday&period=week' * . '&format=xml&filter_limit=5&filter_offset=0') * $result = $request->process(); * echo $result; @@ -54,7 +54,7 @@ use Piwik\Log; * **Getting a unrendered DataTable** * * // use the convenience method 'processRequest' - * $dataTable = Request::processRequest('UserSettings.getLanguage', array( + * $dataTable = Request::processRequest('UserLanguage.getLanguage', array( * 'idSite' => 1, * 'date' => 'yesterday', * 'period' => 'week', @@ -78,7 +78,7 @@ class Request * forwarded to request array before it is returned. * * @param string|array $request The base request string or array, eg, - * `'module=UserSettings&action=getLanguage'`. + * `'module=UserLanguage&action=getLanguage'`. * @param array $defaultRequest Default query parameters. If a query parameter is absent in `$request`, it will be loaded * from this. Defaults to `$_GET + $_POST`. * @return array @@ -125,7 +125,7 @@ class Request * Constructor. * * @param string|array $request Query string that defines the API call (must at least contain a **method** parameter), - * eg, `'method=UserSettings.getLanguage&idSite=1&date=yesterday&period=week&format=xml'` + * eg, `'method=UserLanguage.getLanguage&idSite=1&date=yesterday&period=week&format=xml'` * If a request is not provided, then we use the values in the `$_GET` and `$_POST` * superglobals. * @param array $defaultRequest Default query parameters. If a query parameter is absent in `$request`, it will be loaded diff --git a/core/Archive.php b/core/Archive.php index ae62f5edfb..3a41bf9d7d 100644 --- a/core/Archive.php +++ b/core/Archive.php @@ -828,7 +828,7 @@ class Archive /** * Returns the name of the plugin that archives a given report. * - * @param string $report Archive data name, eg, `'nb_visits'`, `'UserSettings_...'`, etc. + * @param string $report Archive data name, eg, `'nb_visits'`, `'DevicesDetection_...'`, etc. * @return string Plugin name. * @throws \Exception If a plugin cannot be found or if the plugin for the report isn't * activated. diff --git a/core/Piwik.php b/core/Piwik.php index 7eb70c8ec8..5b8c466ac2 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -503,7 +503,7 @@ class Piwik } /** - * Returns the current module read from the URL (eg. 'API', 'UserSettings', etc.) + * Returns the current module read from the URL (eg. 'API', 'DevicesDetection', etc.) * * @return string */ diff --git a/core/Plugin/ComponentFactory.php b/core/Plugin/ComponentFactory.php index 68415e9397..751f1157d4 100644 --- a/core/Plugin/ComponentFactory.php +++ b/core/Plugin/ComponentFactory.php @@ -24,7 +24,7 @@ class ComponentFactory * associated subdirectory. * * @param string $pluginName The name of the plugin the component is expected to belong to, - * eg, `'UserSettings'`. + * eg, `'DevicesDetection'`. * @param string $componentClassSimpleName The component's class name w/o namespace, eg, * `"GetKeywords"`. * @param string $componentTypeClass The fully qualified class name of the component type, eg, @@ -70,7 +70,7 @@ class ComponentFactory * @param string $componentTypeClass The fully qualified class name of the component type, eg, * `"Piwik\Plugin\Report"`. * @param string $pluginName|false The name of the plugin the component is expected to belong to, - * eg, `'UserSettings'`. + * eg, `'DevicesDetection'`. * @param callback $predicate * @return mixed The component that satisfies $predicate or null if not found. */ diff --git a/core/Plugin/Manager.php b/core/Plugin/Manager.php index 3d793bf0c1..fd7b02837f 100644 --- a/core/Plugin/Manager.php +++ b/core/Plugin/Manager.php @@ -711,7 +711,7 @@ class Manager extends Singleton * * array( * 'UserCountry' => Plugin $pluginObject, - * 'UserSettings' => Plugin $pluginObject, + * 'UserLanguage' => Plugin $pluginObject, * ); * * @return Plugin[] @@ -745,7 +745,7 @@ class Manager extends Singleton * * array( * 'UserCountry' => Plugin $pluginObject, - * 'UserSettings' => Plugin $pluginObject, + * 'UserLanguage' => Plugin $pluginObject, * ); * * @return Plugin[] @@ -768,7 +768,7 @@ class Manager extends Singleton * * array( * 'UserCountry' - * 'UserSettings' + * 'UserLanguage' * ); * * @return string[] diff --git a/core/Url.php b/core/Url.php index daf6c73c95..1374ce1065 100644 --- a/core/Url.php +++ b/core/Url.php @@ -28,7 +28,7 @@ use Piwik\Session; * public function myControllerAction() * { * $url = Url::getCurrentQueryStringWithParametersModified(array( - * 'module' => 'UserSettings', + * 'module' => 'DevicesDetection', * 'action' => 'index' * )); * Url::redirectToUrl($url); diff --git a/core/ViewDataTable/Config.php b/core/ViewDataTable/Config.php index 1706e4b15f..220a253518 100644 --- a/core/ViewDataTable/Config.php +++ b/core/ViewDataTable/Config.php @@ -586,7 +586,7 @@ class Config * references the one that is currently being displayed, it will not be added to the related * report list. * - * @param string $relatedReport The plugin and method of the report, eg, `'UserSettings.getBrowser'`. + * @param string $relatedReport The plugin and method of the report, eg, `'DevicesDetection.getBrowsers'`. * @param string $title The report's display name, eg, `'Browsers'`. * @param array $queryParams Any extra query parameters to set in releated report's URL, eg, * `array('idGoal' => 'ecommerceOrder')`. @@ -620,8 +620,8 @@ class Config * titles, eg, * ``` * array( - * 'UserSettings.getBrowser' => 'Browsers', - * 'UserSettings.getConfiguration' => 'Configurations' + * 'DevicesDetection.getBrowsers' => 'Browsers', + * 'Resolution.getConfiguration' => 'Configurations' * ) * ``` */ diff --git a/core/ViewDataTable/Factory.php b/core/ViewDataTable/Factory.php index 01a301cb19..a8dca0c59e 100644 --- a/core/ViewDataTable/Factory.php +++ b/core/ViewDataTable/Factory.php @@ -80,7 +80,7 @@ class Factory * If nothing is configured for the report and `null` is supplied for this * argument, **table** is used. * @param bool|false|string $apiAction The API method for the report that will be displayed, eg, - * `'UserSettings.getBrowser'`. + * `'DevicesDetection.getBrowsers'`. * @param bool|false|string $controllerAction The controller name and action dedicated to displaying the report. This * action is used when reloading reports or changing the report visualization. * Defaulted to `$apiAction` if `false` is supplied. diff --git a/misc/others/api_internal_call.php b/misc/others/api_internal_call.php index f099b962ee..4cc0052911 100644 --- a/misc/others/api_internal_call.php +++ b/misc/others/api_internal_call.php @@ -18,7 +18,7 @@ FrontController::getInstance()->init(); // This inits the API Request with the specified parameters $request = new Request(' module=API - &method=UserSettings.getResolution + &method=Resolution.getResolution &idSite=7 &date=yesterday &period=week diff --git a/plugins/CoreHome/javascripts/dataTable.js b/plugins/CoreHome/javascripts/dataTable.js index 5b37493a60..c339697a5f 100644 --- a/plugins/CoreHome/javascripts/dataTable.js +++ b/plugins/CoreHome/javascripts/dataTable.js @@ -22,7 +22,7 @@ var exports = require('piwik/UI'), * method, and this class instance is stored using the jQuery $.data function * with the 'uiControlObject' key. * - * To find a datatable element by report (ie, 'UserSettings.getBrowser'), + * To find a datatable element by report (ie, 'DevicesDetection.getBrowsers'), * use piwik.DataTable.getDataTableByReport. * * To get the dataTable JS instance (an instance of this class) for a @@ -67,7 +67,7 @@ DataTable.registerFooterIconHandler = function (id, handler) { /** * Returns the first datatable div displaying a specific report. * - * @param {string} report The report, eg, UserSettings.getLanguage + * @param {string} report The report, eg, UserLanguage.getLanguage * @return {Element} The datatable div displaying the report, or undefined if * it cannot be found. */ diff --git a/plugins/ScheduledReports/tests/Integration/ApiTest.php b/plugins/ScheduledReports/tests/Integration/ApiTest.php index 50610684d6..d4eb24c45c 100644 --- a/plugins/ScheduledReports/tests/Integration/ApiTest.php +++ b/plugins/ScheduledReports/tests/Integration/ApiTest.php @@ -406,8 +406,8 @@ class ApiTest extends IntegrationTestCase public function getGetReportSubjectAndReportTitleTestCases() { return array( - array('<Piwik.org>', '<Piwik.org>', '<Piwik.org>', array('UserSettings_getBrowserType')), - array('Piwik.org', 'Piwik.org', 'Piwik.org', array('MultiSites_getAll', 'UserSettings_getBrowserType')), + array('<Piwik.org>', '<Piwik.org>', '<Piwik.org>', array('DevicesDetection_getBrowserEngines')), + array('Piwik.org', 'Piwik.org', 'Piwik.org', array('MultiSites_getAll', 'DevicesDetection_getBrowserEngines')), array('General_MultiSitesSummary', 'General_MultiSitesSummary', 'Piwik.org', array('MultiSites_getAll')), ); } diff --git a/plugins/TestRunner/TravisYml/TravisYmlView.php b/plugins/TestRunner/TravisYml/TravisYmlView.php index 71faf4408b..e923b29784 100644 --- a/plugins/TestRunner/TravisYml/TravisYmlView.php +++ b/plugins/TestRunner/TravisYml/TravisYmlView.php @@ -76,7 +76,7 @@ class TravisYmlView extends View /** * Sets the name of plugin the generated .travis.yml file is for. * - * @param string $pluginName ie, ExamplePlugin, UserSettings, etc. + * @param string $pluginName ie, ExamplePlugin, UserLanguage, etc. */ public function setPlugin($pluginName) { diff --git a/plugins/Widgetize/Controller.php b/plugins/Widgetize/Controller.php index 5b1d31b586..5dd61a66c7 100644 --- a/plugins/Widgetize/Controller.php +++ b/plugins/Widgetize/Controller.php @@ -30,7 +30,7 @@ class Controller extends \Piwik\Plugin\Controller public function testJsInclude1() { $view = new View('@Widgetize/testJsInclude1'); - $view->url1 = '?module=Widgetize&action=js&moduleToWidgetize=UserSettings&actionToWidgetize=getBrowser&idSite=1&period=day&date=yesterday'; + $view->url1 = '?module=Widgetize&action=js&moduleToWidgetize=DevicesDetection&actionToWidgetize=getBrowsers&idSite=1&period=day&date=yesterday'; $view->url2 = '?module=Widgetize&action=js&moduleToWidgetize=API&actionToWidgetize=index&method=ExamplePlugin.getGoldenRatio&format=original'; return $view->render(); } @@ -38,7 +38,7 @@ class Controller extends \Piwik\Plugin\Controller public function testJsInclude2() { $view = new View('@Widgetize/testJsInclude2'); - $view->url1 = '?module=Widgetize&action=js&moduleToWidgetize=UserSettings&actionToWidgetize=getBrowser&idSite=1&period=day&date=yesterday'; + $view->url1 = '?module=Widgetize&action=js&moduleToWidgetize=DevicesDetection&actionToWidgetize=getBrowsers&idSite=1&period=day&date=yesterday'; $view->url2 = '?module=Widgetize&action=js&moduleToWidgetize=UserCountry&actionToWidgetize=getCountry&idSite=1&period=day&date=yesterday&viewDataTable=cloud&show_footer=0'; $view->url3 = '?module=Widgetize&action=js&moduleToWidgetize=Referrers&actionToWidgetize=getKeywords&idSite=1&period=day&date=yesterday&viewDataTable=table&show_footer=0'; return $view->render(); diff --git a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php index d0932ec0cf..5826ab04ba 100755 --- a/tests/PHPUnit/Framework/TestCase/SystemTestCase.php +++ b/tests/PHPUnit/Framework/TestCase/SystemTestCase.php @@ -399,7 +399,7 @@ abstract class SystemTestCase extends PHPUnit_Framework_TestCase * Assert that the response of an API method call is the same as the contents in an * expected file. * - * @param string $api ie, `"UserSettings.getBrowser"` + * @param string $api ie, `"DevicesDetection.getBrowsers"` * @param array $queryParams Query parameters to send to the API. */ public function assertApiResponseEqualsExpected($apiMethod, $queryParams) diff --git a/tests/PHPUnit/System/BlobReportLimitingTest.php b/tests/PHPUnit/System/BlobReportLimitingTest.php index b539e111b8..f40305d1ad 100755 --- a/tests/PHPUnit/System/BlobReportLimitingTest.php +++ b/tests/PHPUnit/System/BlobReportLimitingTest.php @@ -37,7 +37,7 @@ class BlobReportLimitingTest extends SystemTestCase 'CustomVariables.getCustomVariables', 'Referrers.getReferrerType', 'Referrers.getKeywords', 'Referrers.getSearchEngines', 'Referrers.getWebsites', 'Referrers.getAll', /* TODO 'Referrers.getCampaigns', */ - 'UserSettings.getResolution', 'UserSettings.getConfiguration', 'DevicesDetection.getOsVersions', + 'Resolution.getResolution', 'Resolution.getConfiguration', 'DevicesDetection.getOsVersions', 'DevicesDetection.getBrowserVersions', 'UserCountry.getRegion', 'UserCountry.getCity', ); diff --git a/tests/PHPUnit/System/PivotByQueryParamTest.php b/tests/PHPUnit/System/PivotByQueryParamTest.php index e07ab83280..099f82fcf6 100644 --- a/tests/PHPUnit/System/PivotByQueryParamTest.php +++ b/tests/PHPUnit/System/PivotByQueryParamTest.php @@ -125,7 +125,7 @@ class PivotByQueryParamTest extends SystemTestCase $this->markTestSkipped("Not working right now."); - $this->assertApiResponseEqualsExpected("UserSettings.getBrowser", array( // should have logo metadata in output + $this->assertApiResponseEqualsExpected("DevicesDetection.getBrowsers", array( // should have logo metadata in output 'idSite' => self::$fixture->idSite, 'date' => Date::factory(self::$fixture->dateTime)->toString(), 'period' => 'week', |