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:
-rw-r--r--core/API/DocumentationGenerator.php1
-rw-r--r--core/API/Request.php1
-rw-r--r--core/API/ResponseBuilder.php1
-rw-r--r--core/Archive.php1
-rw-r--r--core/ArchiveProcessor.php1
-rw-r--r--core/ArchiveProcessor/Period.php1
-rw-r--r--core/ArchiveProcessor/Rules.php1
-rw-r--r--core/AssetManager.php1
-rw-r--r--core/CacheFile.php1
-rw-r--r--core/Controller.php1
-rw-r--r--core/Controller/Admin.php1
-rw-r--r--core/DataAccess/ArchiveSelector.php1
-rw-r--r--core/DataAccess/ArchiveTableCreator.php2
-rw-r--r--core/DataAccess/ArchiveWriter.php1
-rw-r--r--core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php1
-rw-r--r--core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php1
-rw-r--r--core/DataTable/Filter/ReplaceColumnNames.php1
-rw-r--r--core/DataTable/Renderer.php1
-rw-r--r--core/DataTable/Renderer/Csv.php1
-rw-r--r--core/DataTable/Renderer/Json.php1
-rw-r--r--core/DataTable/Renderer/Php.php1
-rw-r--r--core/DataTable/Renderer/Xml.php1
-rw-r--r--core/Db/Schema/Myisam.php1
-rw-r--r--core/ExceptionHandler.php1
-rw-r--r--core/FrontController.php3
-rw-r--r--core/Http.php1
-rw-r--r--core/Log/Message.php1
-rw-r--r--core/Mail.php1
-rw-r--r--core/Menu/Admin.php1
-rw-r--r--core/Metrics.php1
-rw-r--r--core/Period.php1
-rw-r--r--core/Piwik.php101
-rw-r--r--core/PluginsManager.php1
-rw-r--r--core/ReportRenderer.php1
-rw-r--r--core/ReportRenderer/Html.php1
-rw-r--r--core/Segment.php1
-rw-r--r--core/Session.php1
-rw-r--r--core/Timer.php1
-rw-r--r--core/Tracker.php1
-rw-r--r--core/Tracker/Cache.php1
-rw-r--r--core/Twig.php1
-rw-r--r--core/Updates/0.2.10.php1
-rw-r--r--core/Updates/0.2.27.php1
-rw-r--r--core/Updates/0.2.33.php1
-rw-r--r--core/Updates/0.2.34.php1
-rw-r--r--core/Updates/0.5.5.php1
-rw-r--r--core/Updates/0.6.2.php1
-rw-r--r--core/Updates/0.9.1.php1
-rw-r--r--core/Updates/1.1.php1
-rw-r--r--core/Url.php1
-rw-r--r--core/View.php1
-rw-r--r--core/ViewDataTable.php1
-rw-r--r--core/ViewDataTable/GenerateGraphData.php1
-rw-r--r--core/ViewDataTable/GenerateGraphData/ChartEvolution.php1
-rw-r--r--core/ViewDataTable/GenerateGraphHTML.php1
-rw-r--r--core/ViewDataTable/HtmlTable.php1
-rw-r--r--core/ViewDataTable/HtmlTable/Goals.php1
-rw-r--r--core/Visualization/Chart.php1
-rw-r--r--js/index.php1
-rw-r--r--misc/cron/archive.php1
-rwxr-xr-xmisc/others/geoipUpdateRows.php1
-rw-r--r--misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php2
-rw-r--r--misc/others/test_generateLotsVisitsWebsites.php1
-rw-r--r--piwik.php2
-rw-r--r--plugins/API/API.php2
-rw-r--r--plugins/API/ProcessedReport.php2
-rw-r--r--plugins/API/RowEvolution.php1
-rw-r--r--plugins/Actions/API.php1
-rw-r--r--plugins/Actions/Actions.php1
-rwxr-xr-xplugins/Annotations/API.php1
-rwxr-xr-xplugins/Annotations/AnnotationList.php1
-rw-r--r--plugins/CoreAdminHome/API.php2
-rw-r--r--plugins/CoreAdminHome/Controller.php1
-rw-r--r--plugins/CoreAdminHome/CoreAdminHome.php1
-rw-r--r--plugins/CoreHome/Controller.php1
-rw-r--r--plugins/CorePluginsAdmin/Controller.php2
-rw-r--r--plugins/CorePluginsAdmin/CorePluginsAdmin.php1
-rw-r--r--plugins/CoreUpdater/Controller.php1
-rw-r--r--plugins/CoreUpdater/CoreUpdater.php1
-rw-r--r--plugins/DBStats/API.php1
-rw-r--r--plugins/DBStats/Controller.php1
-rw-r--r--plugins/DBStats/DBStats.php1
-rwxr-xr-xplugins/DBStats/MySQLMetadataProvider.php2
-rw-r--r--plugins/Dashboard/API.php1
-rw-r--r--plugins/Dashboard/Controller.php1
-rw-r--r--plugins/Dashboard/Dashboard.php1
-rw-r--r--plugins/DevicesDetection/API.php1
-rw-r--r--plugins/DevicesDetection/Controller.php1
-rw-r--r--plugins/ExampleAPI/API.php1
-rw-r--r--plugins/ExamplePlugin/Controller.php1
-rw-r--r--plugins/Feedback/Controller.php1
-rw-r--r--plugins/Goals/API.php1
-rw-r--r--plugins/Goals/Controller.php1
-rw-r--r--plugins/Goals/Goals.php1
-rw-r--r--plugins/ImageGraph/API.php1
-rw-r--r--plugins/ImageGraph/Controller.php2
-rw-r--r--plugins/Installation/Controller.php2
-rw-r--r--plugins/Installation/FormDatabaseSetup.php1
-rw-r--r--plugins/Installation/FormGeneralSetup.php1
-rw-r--r--plugins/Installation/Installation.php1
-rw-r--r--plugins/LanguagesManager/API.php1
-rw-r--r--plugins/LanguagesManager/Controller.php1
-rw-r--r--plugins/LanguagesManager/LanguagesManager.php1
-rw-r--r--plugins/Live/API.php1
-rw-r--r--plugins/Live/Controller.php2
-rw-r--r--plugins/Live/Visitor.php1
-rw-r--r--plugins/Login/Controller.php2
-rw-r--r--plugins/Login/Login.php1
-rw-r--r--plugins/MobileMessaging/API.php1
-rw-r--r--plugins/MobileMessaging/Controller.php2
-rw-r--r--plugins/MobileMessaging/MobileMessaging.php1
-rwxr-xr-xplugins/MultiSites/API.php1
-rw-r--r--plugins/MultiSites/Controller.php2
-rw-r--r--plugins/Overlay/API.php1
-rw-r--r--plugins/Overlay/Controller.php2
-rw-r--r--plugins/PDFReports/API.php1
-rw-r--r--plugins/PDFReports/Controller.php1
-rw-r--r--plugins/PDFReports/PDFReports.php2
-rw-r--r--plugins/PrivacyManager/Controller.php1
-rwxr-xr-xplugins/PrivacyManager/LogDataPurger.php1
-rw-r--r--plugins/PrivacyManager/PrivacyManager.php1
-rwxr-xr-xplugins/PrivacyManager/ReportsPurger.php1
-rw-r--r--plugins/Provider/API.php1
-rw-r--r--plugins/Proxy/Controller.php1
-rw-r--r--plugins/Referers/API.php1
-rw-r--r--plugins/Referers/Controller.php1
-rw-r--r--plugins/Referers/Referers.php1
-rw-r--r--plugins/SEO/API.php1
-rw-r--r--plugins/SEO/RankChecker.php1
-rw-r--r--plugins/SecurityInfo/Controller.php1
-rw-r--r--plugins/SecurityInfo/SecurityInfo.php1
-rw-r--r--plugins/SegmentEditor/API.php1
-rw-r--r--plugins/SegmentEditor/Controller.php1
-rw-r--r--plugins/SitesManager/API.php1
-rw-r--r--plugins/SitesManager/Controller.php1
-rw-r--r--plugins/SitesManager/SitesManager.php1
-rw-r--r--plugins/Transitions/API.php1
-rw-r--r--plugins/UserCountry/API.php1
-rw-r--r--plugins/UserCountry/Controller.php1
-rwxr-xr-xplugins/UserCountry/GeoIPAutoUpdater.php1
-rwxr-xr-xplugins/UserCountry/LocationProvider/GeoIp/Php.php1
-rw-r--r--plugins/UserCountry/UserCountry.php1
-rw-r--r--plugins/UserCountryMap/Controller.php2
-rw-r--r--plugins/UserSettings/API.php1
-rw-r--r--plugins/UserSettings/functions.php1
-rw-r--r--plugins/UsersManager/API.php1
-rw-r--r--plugins/UsersManager/Controller.php2
-rw-r--r--plugins/UsersManager/UsersManager.php1
-rw-r--r--plugins/VisitFrequency/API.php1
-rw-r--r--plugins/VisitFrequency/Controller.php1
-rw-r--r--plugins/VisitTime/API.php1
-rw-r--r--plugins/VisitorGenerator/Controller.php1
-rw-r--r--plugins/VisitorGenerator/VisitorGenerator.php1
-rw-r--r--plugins/VisitorInterest/API.php1
-rw-r--r--plugins/VisitsSummary/API.php1
-rw-r--r--plugins/VisitsSummary/Controller.php1
-rwxr-xr-xtests/PHPUnit/Benchmarks/Fixtures/SqlDump.php1
-rw-r--r--tests/PHPUnit/Core/ArchiveProcessingTest.php1
-rw-r--r--tests/PHPUnit/Core/DateTest.php2
-rw-r--r--tests/PHPUnit/Core/PiwikTest.php2
-rw-r--r--tests/PHPUnit/Core/ReleaseCheckListTest.php2
-rw-r--r--tests/PHPUnit/Core/ServeStaticFileTest.php2
-rw-r--r--tests/PHPUnit/DatabaseTestCase.php1
-rw-r--r--tests/PHPUnit/Integration/ArchiveCronTest.php1
-rwxr-xr-xtests/PHPUnit/Integration/EcommerceOrderWithItemsTest.php1
-rwxr-xr-xtests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php1
-rwxr-xr-xtests/PHPUnit/IntegrationTestCase.php1
-rw-r--r--tests/PHPUnit/Plugins/LoginTest.php1
-rwxr-xr-xtests/PHPUnit/Plugins/PrivacyManagerTest.php1
-rw-r--r--tests/PHPUnit/Plugins/SegmentEditorTest.php2
-rw-r--r--tests/PHPUnit/Plugins/UserCountryTest.php2
-rw-r--r--tests/PHPUnit/UI/UIIntegrationTest.php1
-rw-r--r--tests/resources/staticFileServer.php2
173 files changed, 251 insertions, 49 deletions
diff --git a/core/API/DocumentationGenerator.php b/core/API/DocumentationGenerator.php
index bc3dcf8b01..f4a8cd387f 100644
--- a/core/API/DocumentationGenerator.php
+++ b/core/API/DocumentationGenerator.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik
diff --git a/core/API/Request.php b/core/API/Request.php
index ac066be7c2..56d12ecba7 100644
--- a/core/API/Request.php
+++ b/core/API/Request.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* An API request is the object used to make a call to the API and get the result.
diff --git a/core/API/ResponseBuilder.php b/core/API/ResponseBuilder.php
index d38a722b1e..bdac6a6488 100644
--- a/core/API/ResponseBuilder.php
+++ b/core/API/ResponseBuilder.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik
diff --git a/core/Archive.php b/core/Archive.php
index 272d1e5322..9afd5870f1 100644
--- a/core/Archive.php
+++ b/core/Archive.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* The archive object is used to query specific data for a day or a period of statistics for a given website.
diff --git a/core/ArchiveProcessor.php b/core/ArchiveProcessor.php
index 21f18e99de..bb42ca1b58 100644
--- a/core/ArchiveProcessor.php
+++ b/core/ArchiveProcessor.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* The ArchiveProcessor class is used by the Archive object to make sure the given Archive is processed and available in the DB.
diff --git a/core/ArchiveProcessor/Period.php b/core/ArchiveProcessor/Period.php
index e16cf8956d..8a25b5d385 100644
--- a/core/ArchiveProcessor/Period.php
+++ b/core/ArchiveProcessor/Period.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* This class provides generic methods to archive data for a period (week / month / year).
diff --git a/core/ArchiveProcessor/Rules.php b/core/ArchiveProcessor/Rules.php
index 708ca72b9d..0d27b89059 100644
--- a/core/ArchiveProcessor/Rules.php
+++ b/core/ArchiveProcessor/Rules.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* This class contains Archiving rules/logic which are used in several places
diff --git a/core/AssetManager.php b/core/AssetManager.php
index 6f305bab08..87dee1a8d2 100644
--- a/core/AssetManager.php
+++ b/core/AssetManager.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* @see libs/jsmin/jsmin.php
diff --git a/core/CacheFile.php b/core/CacheFile.php
index 03bd0abedc..faa2b59405 100644
--- a/core/CacheFile.php
+++ b/core/CacheFile.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Code originally inspired from OpenX
diff --git a/core/Controller.php b/core/Controller.php
index 14dc7e5628..b2e4dfa295 100644
--- a/core/Controller.php
+++ b/core/Controller.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Parent class of all plugins Controllers (located in /plugins/PluginName/Controller.php
diff --git a/core/Controller/Admin.php b/core/Controller/Admin.php
index 16b633a0e9..91341107f5 100644
--- a/core/Controller/Admin.php
+++ b/core/Controller/Admin.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Parent class of all plugins Controllers with admin functions
diff --git a/core/DataAccess/ArchiveSelector.php b/core/DataAccess/ArchiveSelector.php
index b61a3a3330..299b292a49 100644
--- a/core/DataAccess/ArchiveSelector.php
+++ b/core/DataAccess/ArchiveSelector.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Data Access object used to query archives
diff --git a/core/DataAccess/ArchiveTableCreator.php b/core/DataAccess/ArchiveTableCreator.php
index 84d0cea3b2..d7c3446654 100644
--- a/core/DataAccess/ArchiveTableCreator.php
+++ b/core/DataAccess/ArchiveTableCreator.php
@@ -1,4 +1,6 @@
<?php
+use Piwik\Core\Piwik;
+
/**
* Piwik - Open source web analytics
*
diff --git a/core/DataAccess/ArchiveWriter.php b/core/DataAccess/ArchiveWriter.php
index 61c421b34f..167e3bcc92 100644
--- a/core/DataAccess/ArchiveWriter.php
+++ b/core/DataAccess/ArchiveWriter.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* This class is used to create a new Archive.
diff --git a/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php b/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php
index 167eea9a96..b2fd046254 100644
--- a/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php
+++ b/core/DataTable/Filter/AddColumnsProcessedMetricsGoal.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik
diff --git a/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php b/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php
index 99284508e4..191f9146b3 100644
--- a/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php
+++ b/core/DataTable/Filter/ColumnCallbackAddColumnPercentage.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Add a new column to the table which is a percentage based on the value resulting
diff --git a/core/DataTable/Filter/ReplaceColumnNames.php b/core/DataTable/Filter/ReplaceColumnNames.php
index d955ca4de1..85fb633194 100644
--- a/core/DataTable/Filter/ReplaceColumnNames.php
+++ b/core/DataTable/Filter/ReplaceColumnNames.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* This filter replaces column names using a mapping table that maps from the old name to the new name.
diff --git a/core/DataTable/Renderer.php b/core/DataTable/Renderer.php
index 12527f585b..74f4785e90 100644
--- a/core/DataTable/Renderer.php
+++ b/core/DataTable/Renderer.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* A DataTable Renderer can produce an output given a DataTable object.
diff --git a/core/DataTable/Renderer/Csv.php b/core/DataTable/Renderer/Csv.php
index 1e61e62aef..ba8a248849 100644
--- a/core/DataTable/Renderer/Csv.php
+++ b/core/DataTable/Renderer/Csv.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* CSV export
diff --git a/core/DataTable/Renderer/Json.php b/core/DataTable/Renderer/Json.php
index 286299acd6..bc973ea93a 100644
--- a/core/DataTable/Renderer/Json.php
+++ b/core/DataTable/Renderer/Json.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* JSON export.
diff --git a/core/DataTable/Renderer/Php.php b/core/DataTable/Renderer/Php.php
index cd2e7659fb..1dc7ee501b 100644
--- a/core/DataTable/Renderer/Php.php
+++ b/core/DataTable/Renderer/Php.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Returns the equivalent PHP array for a given DataTable.
diff --git a/core/DataTable/Renderer/Xml.php b/core/DataTable/Renderer/Xml.php
index e04392bb02..adbe5e7206 100644
--- a/core/DataTable/Renderer/Xml.php
+++ b/core/DataTable/Renderer/Xml.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* XML export of a given DataTable.
diff --git a/core/Db/Schema/Myisam.php b/core/Db/Schema/Myisam.php
index b65e50d9f6..248823e2d6 100644
--- a/core/Db/Schema/Myisam.php
+++ b/core/Db/Schema/Myisam.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* MySQL schema
diff --git a/core/ExceptionHandler.php b/core/ExceptionHandler.php
index b3dd6692fe..105caf9058 100644
--- a/core/ExceptionHandler.php
+++ b/core/ExceptionHandler.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Exception handler used to display nicely exceptions in Piwik
diff --git a/core/FrontController.php b/core/FrontController.php
index 3898033767..fb0df9b928 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* @see core/PluginsManager.php
@@ -273,7 +274,7 @@ class Piwik_FrontController
Piwik_PluginsManager::getInstance()->installLoadedPlugins();
// ensure the current Piwik URL is known for later use
- if (method_exists('Piwik', 'getPiwikUrl')) {
+ if (method_exists('Piwik\Core\Piwik', 'getPiwikUrl')) {
$host = Piwik::getPiwikUrl();
}
diff --git a/core/Http.php b/core/Http.php
index 5aa2712a9b..00cc73618a 100644
--- a/core/Http.php
+++ b/core/Http.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Server-side http client to retrieve content from remote servers, and optionally save to a local file.
diff --git a/core/Log/Message.php b/core/Log/Message.php
index 5e8c428e64..f8ca15ba4c 100644
--- a/core/Log/Message.php
+++ b/core/Log/Message.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Class used to log a standard message event.
diff --git a/core/Mail.php b/core/Mail.php
index cadb830061..b907f4c63d 100644
--- a/core/Mail.php
+++ b/core/Mail.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Class for sending mails, for more information see:
diff --git a/core/Menu/Admin.php b/core/Menu/Admin.php
index f85259811e..0ee8965a24 100644
--- a/core/Menu/Admin.php
+++ b/core/Menu/Admin.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik_Menu
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik_Menu
diff --git a/core/Metrics.php b/core/Metrics.php
index bd480c1578..4ba6759582 100644
--- a/core/Metrics.php
+++ b/core/Metrics.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* This class holds the various mappings we use to internally store and manipulate metrics.
diff --git a/core/Period.php b/core/Period.php
index 20a5f9c84f..a086711e1f 100644
--- a/core/Period.php
+++ b/core/Period.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Creating a new Piwik_Period subclass:
diff --git a/core/Piwik.php b/core/Piwik.php
index 413b9e3daa..d33725d09f 100644
--- a/core/Piwik.php
+++ b/core/Piwik.php
@@ -8,7 +8,34 @@
* @category Piwik
* @package Piwik
*/
+namespace Piwik\Core;
+use Exception;
+use false;
+use Manifest;
use Piwik\Core\Config;
+use Piwik_Access;
+use Piwik_Access_NoAccessException;
+use Piwik_AssetManager;
+use Piwik_Common;
+use Piwik_Db_Adapter;
+use Piwik_Db_Schema;
+use Piwik_Log_APICall;
+use Piwik_Log_Error;
+use Piwik_Log_Exception;
+use Piwik_Log_Formatter_ScreenFormatter;
+use Piwik_Log_Message;
+use Piwik_Plugin;
+use Piwik_PluginsManager;
+use Piwik_Session;
+use Piwik_Site;
+use Piwik_Tracker;
+use Piwik_Tracker_Cache;
+use Piwik_Tracker_Db;
+use Piwik_Tracker_GoalManager;
+use Piwik_Url;
+use Piwik_UsersManager_API;
+use Piwik_View;
+use Zend_Registry;
/**
* @see core/Translate.php
@@ -30,16 +57,16 @@ class Piwik
* @var array
*/
public static $idPeriods = array(
- 'day' => 1,
- 'week' => 2,
+ 'day' => 1,
+ 'week' => 2,
'month' => 3,
- 'year' => 4,
+ 'year' => 4,
'range' => 5,
);
-
+
/**
* @see getKnownSegmentsToArchive
- *
+ *
* @var array
*/
public static $cachedKnownSegmentsToArchive = null;
@@ -80,7 +107,7 @@ class Piwik
public static function isSegmentationEnabled()
{
return !Piwik::isUserIsAnonymous()
- || Config::getInstance()->General['anonymous_user_enable_use_segments_API'];
+ || Config::getInstance()->General['anonymous_user_enable_use_segments_API'];
}
/**
@@ -308,10 +335,10 @@ class Piwik
$message = "Please check that the web server has enough permission to write to these files/directories:<br />";
if (Piwik_Common::isWindows()) {
- $message .= "On Windows, check that the folder is not read only and is writable.
+ $message .= "On Windows, check that the folder is not read only and is writable.
You can try to execute:<br />";
} else {
- $message .= "For example, on a Linux server if your Apache httpd user
+ $message .= "For example, on a Linux server if your Apache httpd user
is www-data, you can try to execute:<br />"
. "<code>chown -R www-data:www-data " . $path . "</code><br />";
}
@@ -413,7 +440,7 @@ class Piwik
}
// The error message mentions chmod 777 in case users can't chown
- $directoryMessage = "<p><b>Piwik couldn't write to some directories</b>.</p>
+ $directoryMessage = "<p><b>Piwik couldn't write to some directories</b>.</p>
<p>Try to Execute the following commands on your server, to allow Write access on these directories:</p>"
. "<blockquote>$directoryList</blockquote>"
. "<p>If this doesn't work, you can try to create the directories with your FTP software, and set the CHMOD to 0755 (or 0777 if 0755 is not enough). To do so with your FTP software, right click on the directories then click permissions.</p>"
@@ -531,11 +558,11 @@ class Piwik
$denyDirectPhp = "<Files ~ \"\\.(php|php4|php5|inc|tpl|in|twig)$\">\n" . $deny . "</Files>\n";
$directoriesToProtect = array(
- '/js' => $allowAny,
- '/libs' => $denyDirectPhp . $allowStaticAssets,
- '/vendor' => $denyDirectPhp . $allowStaticAssets,
+ '/js' => $allowAny,
+ '/libs' => $denyDirectPhp . $allowStaticAssets,
+ '/vendor' => $denyDirectPhp . $allowStaticAssets,
'/plugins' => $denyDirectPhp . $allowStaticAssets,
- '/misc/user' => $denyDirectPhp . $allowStaticAssets,
+ '/misc/user' => $denyDirectPhp . $allowStaticAssets,
);
foreach ($directoriesToProtect as $directoryToProtect => $content) {
Piwik_Common::createHtAccess(PIWIK_INCLUDE_PATH . $directoryToProtect, $overwrite = true, $content);
@@ -683,10 +710,10 @@ class Piwik
$autoAppendFile = ini_get('auto_append_file');
return !empty($zlibOutputCompression) ||
- !empty($outputHandler) ||
- !empty($obHandlers) ||
- !empty($autoPrependFile) ||
- !empty($autoAppendFile);
+ !empty($outputHandler) ||
+ !empty($obHandlers) ||
+ !empty($autoPrependFile) ||
+ !empty($autoAppendFile);
}
/**
@@ -977,8 +1004,8 @@ class Piwik
if (is_null(self::$shouldLog)) {
self::$shouldLog = self::shouldLoggerLog();
// It is possible that the logger is not setup:
- // - Tracker request, and debug disabled,
- // - and some scheduled tasks call code that tries and log something
+ // - Tracker request, and debug disabled,
+ // - and some scheduled tasks call code that tries and log something
try {
Zend_Registry::get('logger_message');
} catch (Exception $e) {
@@ -998,7 +1025,7 @@ class Piwik
{
try {
$shouldLog = (Piwik_Common::isPhpCliMode()
- || Config::getInstance()->log['log_only_when_cli'] == 0)
+ || Config::getInstance()->log['log_only_when_cli'] == 0)
&&
(Config::getInstance()->log['log_only_when_debug_parameter'] == 0
|| isset($_REQUEST['debug']));
@@ -1126,8 +1153,8 @@ class Piwik
} else {
$existing = array('count' => 0, 'sumTimeMs' => 0);
}
- $new = array('count' => $existing['count'] + 1,
- 'sumTimeMs' => $existing['count'] + $query->getElapsedSecs() * 1000);
+ $new = array('count' => $existing['count'] + 1,
+ 'sumTimeMs' => $existing['count'] + $query->getElapsedSecs() * 1000);
$infoIndexedByQuery[$query->getQuery()] = $new;
}
@@ -1851,10 +1878,10 @@ class Piwik
*/
static public function getArrayFromApiParameter($columns)
{
- if(empty($columns)) {
+ if (empty($columns)) {
return array();
}
- if(is_array($columns)) {
+ if (is_array($columns)) {
return $columns;
}
$array = explode(',', $columns);
@@ -1873,9 +1900,9 @@ class Piwik
static public function redirectToModule($newModule, $newAction = '', $parameters = array())
{
$newUrl = 'index.php' . Piwik_Url::getCurrentQueryStringWithParametersModified(
- array('module' => $newModule, 'action' => $newAction)
+ array('module' => $newModule, 'action' => $newAction)
+ $parameters
- );
+ );
Piwik_Url::redirectToUrl($newUrl);
}
@@ -1952,10 +1979,10 @@ class Piwik
$configAPI = Config::getInstance()->log;
$aLoggers = array(
- 'logger_api_call' => new Piwik_Log_APICall,
+ 'logger_api_call' => new Piwik_Log_APICall,
'logger_exception' => new Piwik_Log_Exception,
- 'logger_error' => new Piwik_Log_Error,
- 'logger_message' => new Piwik_Log_Message,
+ 'logger_error' => new Piwik_Log_Error,
+ 'logger_message' => new Piwik_Log_Message,
);
foreach ($configAPI as $loggerType => $aRecordTo) {
@@ -2192,9 +2219,9 @@ class Piwik
* Batch insert into table from CSV (or other delimited) file.
*
* @param string $tableName Name of table
- * @param array $fields Field names
+ * @param array $fields Field names
* @param string $filePath Path name of a file.
- * @param array $fileSpec File specifications (delimiter, line terminator, etc)
+ * @param array $fileSpec File specifications (delimiter, line terminator, etc)
*
* @throws Exception
* @return bool True if successful; false otherwise
@@ -2300,12 +2327,12 @@ class Piwik
// throw new Exception('');
$fileSpec = array(
- 'delim' => "\t",
- 'quote' => '"', // chr(34)
- 'escape' => '\\\\', // chr(92)
+ 'delim' => "\t",
+ 'quote' => '"', // chr(34)
+ 'escape' => '\\\\', // chr(92)
'escapespecial_cb' => create_function('$str', 'return str_replace(array(chr(92), chr(34)), array(chr(92).chr(92), chr(92).chr(34)), $str);'),
- 'eol' => "\r\n",
- 'null' => 'NULL',
+ 'eol' => "\r\n",
+ 'null' => 'NULL',
);
// hack for charset mismatch
@@ -2500,7 +2527,7 @@ class Piwik
/**
* Returns the option name of the option that stores the time the archive.php
* script was last run.
- *
+ *
* @param string $period
* @param string $idSite
* @return string
diff --git a/core/PluginsManager.php b/core/PluginsManager.php
index eaff33e2c7..b256d65c0b 100644
--- a/core/PluginsManager.php
+++ b/core/PluginsManager.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* @see core/Menu/Abstract.php
diff --git a/core/ReportRenderer.php b/core/ReportRenderer.php
index 1fd251dcb2..da27590652 100644
--- a/core/ReportRenderer.php
+++ b/core/ReportRenderer.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* A Report Renderer produces user friendly renderings of any given Piwik report.
diff --git a/core/ReportRenderer/Html.php b/core/ReportRenderer/Html.php
index 7eecc497aa..0edf422dab 100644
--- a/core/ReportRenderer/Html.php
+++ b/core/ReportRenderer/Html.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik_ReportRenderer
*/
+use Piwik\Core\Piwik;
/**
diff --git a/core/Segment.php b/core/Segment.php
index 485e27f0f2..dd3654b767 100644
--- a/core/Segment.php
+++ b/core/Segment.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/core/Session.php b/core/Session.php
index a534a4aa50..f08df94c60 100644
--- a/core/Session.php
+++ b/core/Session.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Session initialization.
diff --git a/core/Timer.php b/core/Timer.php
index e747c6d3bd..43edaa78ec 100644
--- a/core/Timer.php
+++ b/core/Timer.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/core/Tracker.php b/core/Tracker.php
index 3de00cdd32..fd8bb92bf5 100644
--- a/core/Tracker.php
+++ b/core/Tracker.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Class used by the logging script piwik.php called by the javascript tag.
diff --git a/core/Tracker/Cache.php b/core/Tracker/Cache.php
index 5fd14f936f..eb0b90cd86 100644
--- a/core/Tracker/Cache.php
+++ b/core/Tracker/Cache.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Simple cache mechanism used in Tracker to avoid requesting settings from mysql on every request
diff --git a/core/Twig.php b/core/Twig.php
index a3f69dbc7e..023653959b 100644
--- a/core/Twig.php
+++ b/core/Twig.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
diff --git a/core/Updates/0.2.10.php b/core/Updates/0.2.10.php
index aece273630..2f2f289c9a 100644
--- a/core/Updates/0.2.10.php
+++ b/core/Updates/0.2.10.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Updates
*/
+use Piwik\Core\Piwik;
/**
* @package Updates
diff --git a/core/Updates/0.2.27.php b/core/Updates/0.2.27.php
index 052033e9bf..8aac68fe3a 100644
--- a/core/Updates/0.2.27.php
+++ b/core/Updates/0.2.27.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Updates
*/
+use Piwik\Core\Piwik;
/**
* @package Updates
diff --git a/core/Updates/0.2.33.php b/core/Updates/0.2.33.php
index 0ad0b04b1b..cdf7551092 100644
--- a/core/Updates/0.2.33.php
+++ b/core/Updates/0.2.33.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Updates
*/
+use Piwik\Core\Piwik;
/**
* @package Updates
diff --git a/core/Updates/0.2.34.php b/core/Updates/0.2.34.php
index cf52c90ff6..4af164a129 100644
--- a/core/Updates/0.2.34.php
+++ b/core/Updates/0.2.34.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Updates
*/
+use Piwik\Core\Piwik;
/**
* @package Updates
diff --git a/core/Updates/0.5.5.php b/core/Updates/0.5.5.php
index a2db73c613..923f14cd2f 100644
--- a/core/Updates/0.5.5.php
+++ b/core/Updates/0.5.5.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Updates
*/
+use Piwik\Core\Piwik;
/**
* @package Updates
diff --git a/core/Updates/0.6.2.php b/core/Updates/0.6.2.php
index 0273fe82c2..d00ed5c91c 100644
--- a/core/Updates/0.6.2.php
+++ b/core/Updates/0.6.2.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Updates
*/
+use Piwik\Core\Piwik;
/**
* @package Updates
diff --git a/core/Updates/0.9.1.php b/core/Updates/0.9.1.php
index 24e6c27c60..04658a23c5 100644
--- a/core/Updates/0.9.1.php
+++ b/core/Updates/0.9.1.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Updates
*/
+use Piwik\Core\Piwik;
/**
* @package Updates
diff --git a/core/Updates/1.1.php b/core/Updates/1.1.php
index eb740fd49b..cae7b1f407 100644
--- a/core/Updates/1.1.php
+++ b/core/Updates/1.1.php
@@ -9,6 +9,7 @@
* @package Updates
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* @package Updates
diff --git a/core/Url.php b/core/Url.php
index 7ae6b3f50b..b4eacdff83 100644
--- a/core/Url.php
+++ b/core/Url.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Class to retrieve absolute URL or URI components of the current URL,
diff --git a/core/View.php b/core/View.php
index 682a0c01dd..ea4a43b8b3 100644
--- a/core/View.php
+++ b/core/View.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Transition for pre-Piwik 0.4.4
diff --git a/core/ViewDataTable.php b/core/ViewDataTable.php
index 30116ad872..46eabeecc7 100644
--- a/core/ViewDataTable.php
+++ b/core/ViewDataTable.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* This class is used to load (from the API) and customize the output of a given DataTable.
diff --git a/core/ViewDataTable/GenerateGraphData.php b/core/ViewDataTable/GenerateGraphData.php
index 4a6dcb2bfc..eab6293b63 100644
--- a/core/ViewDataTable/GenerateGraphData.php
+++ b/core/ViewDataTable/GenerateGraphData.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Reads data from the API and prepares data to give to the renderer Piwik_Visualization_Chart.
diff --git a/core/ViewDataTable/GenerateGraphData/ChartEvolution.php b/core/ViewDataTable/GenerateGraphData/ChartEvolution.php
index 4249d7cca8..9237a5e427 100644
--- a/core/ViewDataTable/GenerateGraphData/ChartEvolution.php
+++ b/core/ViewDataTable/GenerateGraphData/ChartEvolution.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Piwik_ViewDataTable_GenerateGraphData for the Evolution graph (eg. Last 30 days visits) using Piwik_Visualization_Chart_Evolution
diff --git a/core/ViewDataTable/GenerateGraphHTML.php b/core/ViewDataTable/GenerateGraphHTML.php
index 201416c644..f7b580eb3d 100644
--- a/core/ViewDataTable/GenerateGraphHTML.php
+++ b/core/ViewDataTable/GenerateGraphHTML.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* This class generates the HTML code to embed graphs in the page.
diff --git a/core/ViewDataTable/HtmlTable.php b/core/ViewDataTable/HtmlTable.php
index 5b47f7b5bc..08df07ffab 100644
--- a/core/ViewDataTable/HtmlTable.php
+++ b/core/ViewDataTable/HtmlTable.php
@@ -9,6 +9,7 @@
* @package Piwik
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Outputs an AJAX Table for a given DataTable.
diff --git a/core/ViewDataTable/HtmlTable/Goals.php b/core/ViewDataTable/HtmlTable/Goals.php
index b116217d8d..21740d0905 100644
--- a/core/ViewDataTable/HtmlTable/Goals.php
+++ b/core/ViewDataTable/HtmlTable/Goals.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik
diff --git a/core/Visualization/Chart.php b/core/Visualization/Chart.php
index 74d4bf1b52..4cf3de47db 100644
--- a/core/Visualization/Chart.php
+++ b/core/Visualization/Chart.php
@@ -8,6 +8,7 @@
* @category Piwik
* @package Piwik
*/
+use Piwik\Core\Piwik;
/**
* Generates the data in the Open Flash Chart format, from the given data.
diff --git a/js/index.php b/js/index.php
index de634c439b..c0a3a00d0d 100644
--- a/js/index.php
+++ b/js/index.php
@@ -5,6 +5,7 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+use Piwik\Core\Piwik;
/**
* Tracker proxy
diff --git a/misc/cron/archive.php b/misc/cron/archive.php
index 20b5c908c4..2fbf894783 100644
--- a/misc/cron/archive.php
+++ b/misc/cron/archive.php
@@ -1,5 +1,6 @@
<?php
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
$USAGE = "
Usage:
diff --git a/misc/others/geoipUpdateRows.php b/misc/others/geoipUpdateRows.php
index 9d5a6454c2..747cf4d62e 100755
--- a/misc/others/geoipUpdateRows.php
+++ b/misc/others/geoipUpdateRows.php
@@ -1,5 +1,6 @@
<?php
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
ini_set("memory_limit", "512M");
error_reporting(E_ALL | E_NOTICE);
diff --git a/misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php b/misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php
index 4f51391b96..ac2539eca7 100644
--- a/misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php
+++ b/misc/others/test_cookies_GenerateHundredsWebsitesAndVisits.php
@@ -1,6 +1,8 @@
<?php
// Script that creates 100 websites, then outputs a IMG that records a pageview in each website
// Used initially to test how to handle cookies for this use case (see http://dev.piwik.org/trac/ticket/409)
+use Piwik\Core\Piwik;
+
exit;
define('PIWIK_INCLUDE_PATH', '../..');
diff --git a/misc/others/test_generateLotsVisitsWebsites.php b/misc/others/test_generateLotsVisitsWebsites.php
index 30ca703d68..9a07768388 100644
--- a/misc/others/test_generateLotsVisitsWebsites.php
+++ b/misc/others/test_generateLotsVisitsWebsites.php
@@ -1,5 +1,6 @@
<?php
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
define('PIWIK_INCLUDE_PATH', realpath(dirname(__FILE__) . "/../.."));
define('PIWIK_ENABLE_DISPATCH', false);
diff --git a/piwik.php b/piwik.php
index 0429c7792d..3a8ded1202 100644
--- a/piwik.php
+++ b/piwik.php
@@ -7,6 +7,8 @@
*
* @package Piwik
*/
+use Piwik\Core\Piwik;
+
$GLOBALS['PIWIK_TRACKER_DEBUG'] = false;
$GLOBALS['PIWIK_TRACKER_DEBUG_FORCE_SCHEDULED_TASKS'] = false;
define('PIWIK_ENABLE_TRACKING', true);
diff --git a/plugins/API/API.php b/plugins/API/API.php
index c8b784fd39..203d8295ff 100644
--- a/plugins/API/API.php
+++ b/plugins/API/API.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_API
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* @package Piwik_API
diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php
index a2a550b056..3657ffab25 100644
--- a/plugins/API/ProcessedReport.php
+++ b/plugins/API/ProcessedReport.php
@@ -1,4 +1,6 @@
<?php
+use Piwik\Core\Piwik;
+
/**
* Piwik - Open source web analytics
*
diff --git a/plugins/API/RowEvolution.php b/plugins/API/RowEvolution.php
index 99e62a21b8..cc762d11de 100644
--- a/plugins/API/RowEvolution.php
+++ b/plugins/API/RowEvolution.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_API
*/
+use Piwik\Core\Piwik;
/**
* This class generates a Row evolution dataset, from input request
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php
index 6d0b2898b5..5a4ad1e181 100644
--- a/plugins/Actions/API.php
+++ b/plugins/Actions/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Actions
*/
+use Piwik\Core\Piwik;
/**
* The Actions API lets you request reports for all your Visitor Actions: Page URLs, Page titles (Piwik Events),
diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php
index e7a107adaf..0ad2593184 100644
--- a/plugins/Actions/Actions.php
+++ b/plugins/Actions/Actions.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Actions
*/
+use Piwik\Core\Piwik;
/**
* Actions plugin
diff --git a/plugins/Annotations/API.php b/plugins/Annotations/API.php
index 3439946d2b..a8b0508e0b 100755
--- a/plugins/Annotations/API.php
+++ b/plugins/Annotations/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Annotations
*/
+use Piwik\Core\Piwik;
/**
* @see plugins/Annotations/AnnotationList.php
diff --git a/plugins/Annotations/AnnotationList.php b/plugins/Annotations/AnnotationList.php
index feae875002..7201b180bb 100755
--- a/plugins/Annotations/AnnotationList.php
+++ b/plugins/Annotations/AnnotationList.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Annotations
*/
+use Piwik\Core\Piwik;
/**
* This class can be used to query & modify annotations for multiple sites
diff --git a/plugins/CoreAdminHome/API.php b/plugins/CoreAdminHome/API.php
index 917b2f4e14..08108363e4 100644
--- a/plugins/CoreAdminHome/API.php
+++ b/plugins/CoreAdminHome/API.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_CoreAdminHome
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* @package Piwik_CoreAdminHome
diff --git a/plugins/CoreAdminHome/Controller.php b/plugins/CoreAdminHome/Controller.php
index 11035cb3ad..af0ef50a86 100644
--- a/plugins/CoreAdminHome/Controller.php
+++ b/plugins/CoreAdminHome/Controller.php
@@ -9,6 +9,7 @@
* @package Piwik_CoreAdminHome
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/CoreAdminHome/CoreAdminHome.php b/plugins/CoreAdminHome/CoreAdminHome.php
index e238e255ba..41bf84048a 100644
--- a/plugins/CoreAdminHome/CoreAdminHome.php
+++ b/plugins/CoreAdminHome/CoreAdminHome.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_CoreAdminHome
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/CoreHome/Controller.php b/plugins/CoreHome/Controller.php
index 4268411fb5..ee30059e45 100644
--- a/plugins/CoreHome/Controller.php
+++ b/plugins/CoreHome/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_CoreHome
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/CorePluginsAdmin/Controller.php b/plugins/CorePluginsAdmin/Controller.php
index a0b741c7ac..0bfb838a87 100644
--- a/plugins/CorePluginsAdmin/Controller.php
+++ b/plugins/CorePluginsAdmin/Controller.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_CorePluginsAdmin
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/CorePluginsAdmin/CorePluginsAdmin.php b/plugins/CorePluginsAdmin/CorePluginsAdmin.php
index 732f26f5b2..5cf7824d3d 100644
--- a/plugins/CorePluginsAdmin/CorePluginsAdmin.php
+++ b/plugins/CorePluginsAdmin/CorePluginsAdmin.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_CorePluginsAdmin
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/CoreUpdater/Controller.php b/plugins/CoreUpdater/Controller.php
index 59d9c846fb..dcf109113d 100644
--- a/plugins/CoreUpdater/Controller.php
+++ b/plugins/CoreUpdater/Controller.php
@@ -9,6 +9,7 @@
* @package Piwik_CoreUpdater
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/CoreUpdater/CoreUpdater.php b/plugins/CoreUpdater/CoreUpdater.php
index 56ca7dd396..e3aab1affb 100644
--- a/plugins/CoreUpdater/CoreUpdater.php
+++ b/plugins/CoreUpdater/CoreUpdater.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_CoreUpdater
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/DBStats/API.php b/plugins/DBStats/API.php
index 35c64c6703..81f0368749 100644
--- a/plugins/DBStats/API.php
+++ b/plugins/DBStats/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_DBStats
*/
+use Piwik\Core\Piwik;
/**
* @see plugins/DBStats/MySQLMetadataProvider.php
diff --git a/plugins/DBStats/Controller.php b/plugins/DBStats/Controller.php
index a4e8d08bac..e6c93ef5e0 100644
--- a/plugins/DBStats/Controller.php
+++ b/plugins/DBStats/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_DBStats
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php
index 69a24f4021..03e4409af4 100644
--- a/plugins/DBStats/DBStats.php
+++ b/plugins/DBStats/DBStats.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_DBStats
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/DBStats/MySQLMetadataProvider.php b/plugins/DBStats/MySQLMetadataProvider.php
index e114bf3eeb..80bc9be7c4 100755
--- a/plugins/DBStats/MySQLMetadataProvider.php
+++ b/plugins/DBStats/MySQLMetadataProvider.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_DBStats
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Utility class that provides general information about databases, including the size of
diff --git a/plugins/Dashboard/API.php b/plugins/Dashboard/API.php
index 59ae8b9ae1..dea5f45526 100644
--- a/plugins/Dashboard/API.php
+++ b/plugins/Dashboard/API.php
@@ -7,6 +7,7 @@
* @category Piwik_Plugins
* @package Piwik_Dashboard
*/
+use Piwik\Core\Piwik;
/**
diff --git a/plugins/Dashboard/Controller.php b/plugins/Dashboard/Controller.php
index ec63d82e4a..10b64bc164 100644
--- a/plugins/Dashboard/Controller.php
+++ b/plugins/Dashboard/Controller.php
@@ -7,6 +7,7 @@
* @category Piwik_Plugins
* @package Piwik_Dashboard
*/
+use Piwik\Core\Piwik;
/**
* Dashboard Controller
diff --git a/plugins/Dashboard/Dashboard.php b/plugins/Dashboard/Dashboard.php
index d8909fbf01..25d33fd5f6 100644
--- a/plugins/Dashboard/Dashboard.php
+++ b/plugins/Dashboard/Dashboard.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Dashboard
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik_Dashboard
diff --git a/plugins/DevicesDetection/API.php b/plugins/DevicesDetection/API.php
index 6f638e7f72..9548a53764 100644
--- a/plugins/DevicesDetection/API.php
+++ b/plugins/DevicesDetection/API.php
@@ -9,6 +9,7 @@
* @category Piwik_Plugins
* @package Piwik_DevicesDetection
*/
+use Piwik\Core\Piwik;
/**
* The DevicesDetection API lets you access reports on your visitors devices, brands, models, Operating system, Browsers.
diff --git a/plugins/DevicesDetection/Controller.php b/plugins/DevicesDetection/Controller.php
index 56ee810556..a76ede7038 100644
--- a/plugins/DevicesDetection/Controller.php
+++ b/plugins/DevicesDetection/Controller.php
@@ -1,4 +1,5 @@
<?php
+use Piwik\Core\Piwik;
/**
* Piwik - Open source web analytics
diff --git a/plugins/ExampleAPI/API.php b/plugins/ExampleAPI/API.php
index bdf133cbb4..185aa2174d 100644
--- a/plugins/ExampleAPI/API.php
+++ b/plugins/ExampleAPI/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_ExampleAPI
*/
+use Piwik\Core\Piwik;
/**
* The ExampleAPI is useful to developers building a custom Piwik plugin.
diff --git a/plugins/ExamplePlugin/Controller.php b/plugins/ExamplePlugin/Controller.php
index ca0f03edca..c44edb73bf 100644
--- a/plugins/ExamplePlugin/Controller.php
+++ b/plugins/ExamplePlugin/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_ExamplePlugin
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/Feedback/Controller.php b/plugins/Feedback/Controller.php
index e2b457a22d..6d28c054f9 100644
--- a/plugins/Feedback/Controller.php
+++ b/plugins/Feedback/Controller.php
@@ -9,6 +9,7 @@
* @package Piwik_Feedback
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php
index 418f44fc88..308d6dc9e8 100644
--- a/plugins/Goals/API.php
+++ b/plugins/Goals/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Goals
*/
+use Piwik\Core\Piwik;
/**
* Goals API lets you Manage existing goals, via "updateGoal" and "deleteGoal", create new Goals via "addGoal",
diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php
index a95fea8120..8e89a78cd1 100644
--- a/plugins/Goals/Controller.php
+++ b/plugins/Goals/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Goals
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php
index 88f42bc8d7..c491dabe22 100644
--- a/plugins/Goals/Goals.php
+++ b/plugins/Goals/Goals.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Goals
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/ImageGraph/API.php b/plugins/ImageGraph/API.php
index ddc31e56b3..92cc1767f5 100644
--- a/plugins/ImageGraph/API.php
+++ b/plugins/ImageGraph/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_ImageGraph
*/
+use Piwik\Core\Piwik;
/**
* The ImageGraph.get API call lets you generate beautiful static PNG Graphs for any existing Piwik report.
diff --git a/plugins/ImageGraph/Controller.php b/plugins/ImageGraph/Controller.php
index e2e89c0c96..0e7839f127 100644
--- a/plugins/ImageGraph/Controller.php
+++ b/plugins/ImageGraph/Controller.php
@@ -1,4 +1,6 @@
<?php
+use Piwik\Core\Piwik;
+
/**
* Piwik - Open source web analytics
*
diff --git a/plugins/Installation/Controller.php b/plugins/Installation/Controller.php
index e0ada880c7..65d4c0c52f 100644
--- a/plugins/Installation/Controller.php
+++ b/plugins/Installation/Controller.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Installation
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Installation controller
diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php
index 05462d5f8e..642753f760 100644
--- a/plugins/Installation/FormDatabaseSetup.php
+++ b/plugins/Installation/FormDatabaseSetup.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Installation
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/Installation/FormGeneralSetup.php b/plugins/Installation/FormGeneralSetup.php
index 345b027298..61267e390a 100644
--- a/plugins/Installation/FormGeneralSetup.php
+++ b/plugins/Installation/FormGeneralSetup.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Installation
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/Installation/Installation.php b/plugins/Installation/Installation.php
index 5849dc94c2..8e3c63fc08 100644
--- a/plugins/Installation/Installation.php
+++ b/plugins/Installation/Installation.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Installation
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/LanguagesManager/API.php b/plugins/LanguagesManager/API.php
index 658deb886c..3f481e95f3 100644
--- a/plugins/LanguagesManager/API.php
+++ b/plugins/LanguagesManager/API.php
@@ -9,6 +9,7 @@
* @package Piwik_LanguagesManager
*
*/
+use Piwik\Core\Piwik;
/**
* The LanguagesManager API lets you access existing Piwik translations, and change Users languages preferences.
diff --git a/plugins/LanguagesManager/Controller.php b/plugins/LanguagesManager/Controller.php
index 3162d209ef..0538f4d540 100644
--- a/plugins/LanguagesManager/Controller.php
+++ b/plugins/LanguagesManager/Controller.php
@@ -9,6 +9,7 @@
* @package Piwik_LanguagesManager
*
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik_LanguagesManager
diff --git a/plugins/LanguagesManager/LanguagesManager.php b/plugins/LanguagesManager/LanguagesManager.php
index 6ff458d4a7..0100a78965 100644
--- a/plugins/LanguagesManager/LanguagesManager.php
+++ b/plugins/LanguagesManager/LanguagesManager.php
@@ -10,6 +10,7 @@
*
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/Live/API.php b/plugins/Live/API.php
index 23cbea6ce9..78034dd50a 100644
--- a/plugins/Live/API.php
+++ b/plugins/Live/API.php
@@ -9,6 +9,7 @@
* @package Piwik_Live
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* @see plugins/Referers/functions.php
diff --git a/plugins/Live/Controller.php b/plugins/Live/Controller.php
index 7ecf378809..bd42e046ee 100644
--- a/plugins/Live/Controller.php
+++ b/plugins/Live/Controller.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Live
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* @package Piwik_Live
diff --git a/plugins/Live/Visitor.php b/plugins/Live/Visitor.php
index aaf6904845..786d6491ab 100644
--- a/plugins/Live/Visitor.php
+++ b/plugins/Live/Visitor.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Live
*/
+use Piwik\Core\Piwik;
/**
* @see plugins/Referers/functions.php
diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php
index d5d988d648..e255aba40b 100644
--- a/plugins/Login/Controller.php
+++ b/plugins/Login/Controller.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Login
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Login controller
diff --git a/plugins/Login/Login.php b/plugins/Login/Login.php
index accc865eeb..59f9d63f8f 100644
--- a/plugins/Login/Login.php
+++ b/plugins/Login/Login.php
@@ -9,6 +9,7 @@
* @package Piwik_Login
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/MobileMessaging/API.php b/plugins/MobileMessaging/API.php
index 10d30f1aca..ce4adeef49 100644
--- a/plugins/MobileMessaging/API.php
+++ b/plugins/MobileMessaging/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_MobileMessaging
*/
+use Piwik\Core\Piwik;
/**
* The MobileMessaging API lets you manage and access all the MobileMessaging plugin features including :
diff --git a/plugins/MobileMessaging/Controller.php b/plugins/MobileMessaging/Controller.php
index 2438245e82..0796892c61 100644
--- a/plugins/MobileMessaging/Controller.php
+++ b/plugins/MobileMessaging/Controller.php
@@ -9,6 +9,8 @@
* @package Piwik_MobileMessaging
*/
+use Piwik\Core\Piwik;
+
require_once PIWIK_INCLUDE_PATH . '/plugins/UserCountry/functions.php';
/**
diff --git a/plugins/MobileMessaging/MobileMessaging.php b/plugins/MobileMessaging/MobileMessaging.php
index 4d755f39de..62debf52e6 100644
--- a/plugins/MobileMessaging/MobileMessaging.php
+++ b/plugins/MobileMessaging/MobileMessaging.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_MobileMessaging
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php
index 02a825fd25..8ed333e3f5 100755
--- a/plugins/MultiSites/API.php
+++ b/plugins/MultiSites/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_MultiSites
*/
+use Piwik\Core\Piwik;
/**
* The MultiSites API lets you request the key metrics (visits, page views, revenue) for all Websites in Piwik.
diff --git a/plugins/MultiSites/Controller.php b/plugins/MultiSites/Controller.php
index ec31a095f9..0a86c09ed7 100644
--- a/plugins/MultiSites/Controller.php
+++ b/plugins/MultiSites/Controller.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_MultiSites
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/Overlay/API.php b/plugins/Overlay/API.php
index 9ba98a900d..812a792e14 100644
--- a/plugins/Overlay/API.php
+++ b/plugins/Overlay/API.php
@@ -1,5 +1,6 @@
<?php
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Piwik - Open source web analytics
diff --git a/plugins/Overlay/Controller.php b/plugins/Overlay/Controller.php
index 7ed58eaba4..8fccad0a3a 100644
--- a/plugins/Overlay/Controller.php
+++ b/plugins/Overlay/Controller.php
@@ -1,4 +1,6 @@
<?php
+use Piwik\Core\Piwik;
+
/**
* Piwik - Open source web analytics
*
diff --git a/plugins/PDFReports/API.php b/plugins/PDFReports/API.php
index 20d5567120..5c33b44e6d 100644
--- a/plugins/PDFReports/API.php
+++ b/plugins/PDFReports/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_PDFReports
*/
+use Piwik\Core\Piwik;
/**
* The PDFReports API lets you manage Scheduled Email reports, as well as generate, download or email any existing report.
diff --git a/plugins/PDFReports/Controller.php b/plugins/PDFReports/Controller.php
index 51d140d727..9ec3dc91f5 100644
--- a/plugins/PDFReports/Controller.php
+++ b/plugins/PDFReports/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_PDFReports
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/PDFReports/PDFReports.php b/plugins/PDFReports/PDFReports.php
index 8b68d8c377..ca977f73a7 100644
--- a/plugins/PDFReports/PDFReports.php
+++ b/plugins/PDFReports/PDFReports.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_PDFReports
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/PrivacyManager/Controller.php b/plugins/PrivacyManager/Controller.php
index e9b62e1482..15508cb5db 100644
--- a/plugins/PrivacyManager/Controller.php
+++ b/plugins/PrivacyManager/Controller.php
@@ -9,6 +9,7 @@
* @package Piwik_PrivacyManager
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/PrivacyManager/LogDataPurger.php b/plugins/PrivacyManager/LogDataPurger.php
index 440f8f5e42..7a4f846a69 100755
--- a/plugins/PrivacyManager/LogDataPurger.php
+++ b/plugins/PrivacyManager/LogDataPurger.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_PrivacyManager
*/
+use Piwik\Core\Piwik;
/**
* Purges the log_visit, log_conversion and related tables of old visit data.
diff --git a/plugins/PrivacyManager/PrivacyManager.php b/plugins/PrivacyManager/PrivacyManager.php
index 5a2d6f2f93..1c9cab13b0 100644
--- a/plugins/PrivacyManager/PrivacyManager.php
+++ b/plugins/PrivacyManager/PrivacyManager.php
@@ -9,6 +9,7 @@
* @package Piwik_PrivacyManager
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* @see plugins/PrivacyManager/LogDataPurger.php
diff --git a/plugins/PrivacyManager/ReportsPurger.php b/plugins/PrivacyManager/ReportsPurger.php
index fc6d1287a8..49938dd33d 100755
--- a/plugins/PrivacyManager/ReportsPurger.php
+++ b/plugins/PrivacyManager/ReportsPurger.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_PrivacyManager
*/
+use Piwik\Core\Piwik;
/**
* Purges archived reports and metrics that are considered old.
diff --git a/plugins/Provider/API.php b/plugins/Provider/API.php
index 79e8fdaefb..687527d571 100644
--- a/plugins/Provider/API.php
+++ b/plugins/Provider/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Provider
*/
+use Piwik\Core\Piwik;
/**
* @see plugins/Provider/functions.php
diff --git a/plugins/Proxy/Controller.php b/plugins/Proxy/Controller.php
index 02f57a44cd..4a5ddc14dc 100644
--- a/plugins/Proxy/Controller.php
+++ b/plugins/Proxy/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Proxy
*/
+use Piwik\Core\Piwik;
/**
* Controller for proxy services
diff --git a/plugins/Referers/API.php b/plugins/Referers/API.php
index 801528c467..e4cf16596b 100644
--- a/plugins/Referers/API.php
+++ b/plugins/Referers/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Referers
*/
+use Piwik\Core\Piwik;
/**
* The Referrers API lets you access reports about Websites, Search engines, Keywords, Campaigns used to access your website.
diff --git a/plugins/Referers/Controller.php b/plugins/Referers/Controller.php
index 85864e13dd..267718a5fe 100644
--- a/plugins/Referers/Controller.php
+++ b/plugins/Referers/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Referers
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/Referers/Referers.php b/plugins/Referers/Referers.php
index 0c5fbdb989..e4feb4d186 100644
--- a/plugins/Referers/Referers.php
+++ b/plugins/Referers/Referers.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Referers
*/
+use Piwik\Core\Piwik;
/**
* @see plugins/Referers/functions.php
diff --git a/plugins/SEO/API.php b/plugins/SEO/API.php
index bc94a2663d..9e1d8c1713 100644
--- a/plugins/SEO/API.php
+++ b/plugins/SEO/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_SEO
*/
+use Piwik\Core\Piwik;
/**
* @see plugins/Referers/functions.php
diff --git a/plugins/SEO/RankChecker.php b/plugins/SEO/RankChecker.php
index 33c1956759..fabd770118 100644
--- a/plugins/SEO/RankChecker.php
+++ b/plugins/SEO/RankChecker.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_SEO
*/
+use Piwik\Core\Piwik;
/**
* The functions below are derived/adapted from GetRank.org's
diff --git a/plugins/SecurityInfo/Controller.php b/plugins/SecurityInfo/Controller.php
index d33c57288a..fd66acc99a 100644
--- a/plugins/SecurityInfo/Controller.php
+++ b/plugins/SecurityInfo/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_SecurityInfo
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik_SecurityInfo
diff --git a/plugins/SecurityInfo/SecurityInfo.php b/plugins/SecurityInfo/SecurityInfo.php
index 92aa1b1ad4..04537325cf 100644
--- a/plugins/SecurityInfo/SecurityInfo.php
+++ b/plugins/SecurityInfo/SecurityInfo.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_SecurityInfo
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/SegmentEditor/API.php b/plugins/SegmentEditor/API.php
index c361d01626..6b75833668 100644
--- a/plugins/SegmentEditor/API.php
+++ b/plugins/SegmentEditor/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_SegmentEditor
*/
+use Piwik\Core\Piwik;
/**
* The SegmentEditor API lets you add, update, delete custom Segments, and list saved segments.a
diff --git a/plugins/SegmentEditor/Controller.php b/plugins/SegmentEditor/Controller.php
index bbb6c6d9ea..f21c95bfff 100644
--- a/plugins/SegmentEditor/Controller.php
+++ b/plugins/SegmentEditor/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_SegmentEditor
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik_SegmentEditor
diff --git a/plugins/SitesManager/API.php b/plugins/SitesManager/API.php
index c69f468b36..cc537a43db 100644
--- a/plugins/SitesManager/API.php
+++ b/plugins/SitesManager/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_SitesManager
*/
+use Piwik\Core\Piwik;
/**
* The SitesManager API gives you full control on Websites in Piwik (create, update and delete), and many methods to retrieve websites based on various attributes.
diff --git a/plugins/SitesManager/Controller.php b/plugins/SitesManager/Controller.php
index 7374520cd5..adf875266f 100644
--- a/plugins/SitesManager/Controller.php
+++ b/plugins/SitesManager/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_SitesManager
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/SitesManager/SitesManager.php b/plugins/SitesManager/SitesManager.php
index c5744c4e0c..79fa7f7701 100644
--- a/plugins/SitesManager/SitesManager.php
+++ b/plugins/SitesManager/SitesManager.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_SitesManager
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/Transitions/API.php b/plugins/Transitions/API.php
index 32f05aeb2e..912d54e525 100644
--- a/plugins/Transitions/API.php
+++ b/plugins/Transitions/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_Transitions
*/
+use Piwik\Core\Piwik;
/**
* @package Piwik_Transitions
diff --git a/plugins/UserCountry/API.php b/plugins/UserCountry/API.php
index 3cab1401d8..b89b557448 100644
--- a/plugins/UserCountry/API.php
+++ b/plugins/UserCountry/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UserCountry
*/
+use Piwik\Core\Piwik;
/**
* @see plugins/UserCountry/functions.php
diff --git a/plugins/UserCountry/Controller.php b/plugins/UserCountry/Controller.php
index 311561a497..ccab166581 100644
--- a/plugins/UserCountry/Controller.php
+++ b/plugins/UserCountry/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UserCountry
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/UserCountry/GeoIPAutoUpdater.php b/plugins/UserCountry/GeoIPAutoUpdater.php
index 23e543acfd..d64b95c4f1 100755
--- a/plugins/UserCountry/GeoIPAutoUpdater.php
+++ b/plugins/UserCountry/GeoIPAutoUpdater.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UserCountry
*/
+use Piwik\Core\Piwik;
/**
* Used to automatically update installed GeoIP databases, and manages the updater's
diff --git a/plugins/UserCountry/LocationProvider/GeoIp/Php.php b/plugins/UserCountry/LocationProvider/GeoIp/Php.php
index 6508fbeba5..5e2e1f71e8 100755
--- a/plugins/UserCountry/LocationProvider/GeoIp/Php.php
+++ b/plugins/UserCountry/LocationProvider/GeoIp/Php.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UserCountry
*/
+use Piwik\Core\Piwik;
/**
* A LocationProvider that uses the PHP implementation of GeoIP.
diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php
index 62cab9ec4f..5e57e053de 100644
--- a/plugins/UserCountry/UserCountry.php
+++ b/plugins/UserCountry/UserCountry.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UserCountry
*/
+use Piwik\Core\Piwik;
/**
* @see plugins/UserCountry/GeoIPAutoUpdater.php
diff --git a/plugins/UserCountryMap/Controller.php b/plugins/UserCountryMap/Controller.php
index 002d3145c2..9345f37d73 100644
--- a/plugins/UserCountryMap/Controller.php
+++ b/plugins/UserCountryMap/Controller.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UserCountryMap
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/UserSettings/API.php b/plugins/UserSettings/API.php
index 1aa80230f9..23a538e7f1 100644
--- a/plugins/UserSettings/API.php
+++ b/plugins/UserSettings/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UserSettings
*/
+use Piwik\Core\Piwik;
/**
* @see plugins/UserSettings/functions.php
diff --git a/plugins/UserSettings/functions.php b/plugins/UserSettings/functions.php
index 3f2f5c3697..8adc92b245 100644
--- a/plugins/UserSettings/functions.php
+++ b/plugins/UserSettings/functions.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UserSettings
*/
+use Piwik\Core\Piwik;
/**
* @see libs/UserAgentParser/UserAgentParser.php
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php
index 32d47cf48d..1670b367df 100644
--- a/plugins/UsersManager/API.php
+++ b/plugins/UsersManager/API.php
@@ -9,6 +9,7 @@
* @package Piwik_UsersManager
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* The UsersManager API lets you Manage Users and their permissions to access specific websites.
diff --git a/plugins/UsersManager/Controller.php b/plugins/UsersManager/Controller.php
index 8f8c69f666..5ee315d2f2 100644
--- a/plugins/UsersManager/Controller.php
+++ b/plugins/UsersManager/Controller.php
@@ -8,7 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UsersManager
*/
-use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/UsersManager/UsersManager.php b/plugins/UsersManager/UsersManager.php
index ee33afd98e..82d02f36bf 100644
--- a/plugins/UsersManager/UsersManager.php
+++ b/plugins/UsersManager/UsersManager.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_UsersManager
*/
+use Piwik\Core\Piwik;
/**
* Manage Piwik users
diff --git a/plugins/VisitFrequency/API.php b/plugins/VisitFrequency/API.php
index 986489f8eb..5b7161b7be 100644
--- a/plugins/VisitFrequency/API.php
+++ b/plugins/VisitFrequency/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_VisitFrequency
*/
+use Piwik\Core\Piwik;
/**
* VisitFrequency API lets you access a list of metrics related to Returning Visitors.
diff --git a/plugins/VisitFrequency/Controller.php b/plugins/VisitFrequency/Controller.php
index 982756148e..527b8c0ac8 100644
--- a/plugins/VisitFrequency/Controller.php
+++ b/plugins/VisitFrequency/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_VisitFrequency
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/VisitTime/API.php b/plugins/VisitTime/API.php
index 895c62c698..f473ae6ab3 100644
--- a/plugins/VisitTime/API.php
+++ b/plugins/VisitTime/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_VisitTime
*/
+use Piwik\Core\Piwik;
/**
* VisitTime API lets you access reports by Hour (Server time), and by Hour Local Time of your visitors.
diff --git a/plugins/VisitorGenerator/Controller.php b/plugins/VisitorGenerator/Controller.php
index 5f5c0cb1f5..43f4669ea0 100644
--- a/plugins/VisitorGenerator/Controller.php
+++ b/plugins/VisitorGenerator/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_VisitorGenerator
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/VisitorGenerator/VisitorGenerator.php b/plugins/VisitorGenerator/VisitorGenerator.php
index 0b733c2cee..dc23e4f60d 100644
--- a/plugins/VisitorGenerator/VisitorGenerator.php
+++ b/plugins/VisitorGenerator/VisitorGenerator.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_VisitorGenerator
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/plugins/VisitorInterest/API.php b/plugins/VisitorInterest/API.php
index b8abd9cb8c..35e89c9896 100644
--- a/plugins/VisitorInterest/API.php
+++ b/plugins/VisitorInterest/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_VisitorInterest
*/
+use Piwik\Core\Piwik;
/**
* VisitorInterest API lets you access two Visitor Engagement reports: number of visits per number of pages,
diff --git a/plugins/VisitsSummary/API.php b/plugins/VisitsSummary/API.php
index 3205edaf61..a7c0ecda71 100644
--- a/plugins/VisitsSummary/API.php
+++ b/plugins/VisitsSummary/API.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_VisitsSummary
*/
+use Piwik\Core\Piwik;
/**
* VisitsSummary API lets you access the core web analytics metrics (visits, unique visitors,
diff --git a/plugins/VisitsSummary/Controller.php b/plugins/VisitsSummary/Controller.php
index da846c23ed..ec058e6aab 100644
--- a/plugins/VisitsSummary/Controller.php
+++ b/plugins/VisitsSummary/Controller.php
@@ -8,6 +8,7 @@
* @category Piwik_Plugins
* @package Piwik_VisitsSummary
*/
+use Piwik\Core\Piwik;
/**
*
diff --git a/tests/PHPUnit/Benchmarks/Fixtures/SqlDump.php b/tests/PHPUnit/Benchmarks/Fixtures/SqlDump.php
index f4c303430c..fb73285612 100755
--- a/tests/PHPUnit/Benchmarks/Fixtures/SqlDump.php
+++ b/tests/PHPUnit/Benchmarks/Fixtures/SqlDump.php
@@ -6,6 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Reusable fixture. Loads a ~1GB SQL dump into the DB.
diff --git a/tests/PHPUnit/Core/ArchiveProcessingTest.php b/tests/PHPUnit/Core/ArchiveProcessingTest.php
index fbe5fccecc..596c7973c4 100644
--- a/tests/PHPUnit/Core/ArchiveProcessingTest.php
+++ b/tests/PHPUnit/Core/ArchiveProcessingTest.php
@@ -1,5 +1,6 @@
<?php
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Piwik - Open source web analytics
diff --git a/tests/PHPUnit/Core/DateTest.php b/tests/PHPUnit/Core/DateTest.php
index 45d2e1af12..1b03141865 100644
--- a/tests/PHPUnit/Core/DateTest.php
+++ b/tests/PHPUnit/Core/DateTest.php
@@ -1,4 +1,6 @@
<?php
+use Piwik\Core\Piwik;
+
/**
* Piwik - Open source web analytics
*
diff --git a/tests/PHPUnit/Core/PiwikTest.php b/tests/PHPUnit/Core/PiwikTest.php
index 8294763058..5ed4a51f24 100644
--- a/tests/PHPUnit/Core/PiwikTest.php
+++ b/tests/PHPUnit/Core/PiwikTest.php
@@ -1,4 +1,6 @@
<?php
+use Piwik\Core\Piwik;
+
/**
* Piwik - Open source web analytics
*
diff --git a/tests/PHPUnit/Core/ReleaseCheckListTest.php b/tests/PHPUnit/Core/ReleaseCheckListTest.php
index 9542c663c7..04cb72a5a3 100644
--- a/tests/PHPUnit/Core/ReleaseCheckListTest.php
+++ b/tests/PHPUnit/Core/ReleaseCheckListTest.php
@@ -1,4 +1,6 @@
<?php
+use Piwik\Core\Piwik;
+
/**
* Piwik - Open source web analytics
*
diff --git a/tests/PHPUnit/Core/ServeStaticFileTest.php b/tests/PHPUnit/Core/ServeStaticFileTest.php
index 253526f3ca..764fd85e17 100644
--- a/tests/PHPUnit/Core/ServeStaticFileTest.php
+++ b/tests/PHPUnit/Core/ServeStaticFileTest.php
@@ -12,6 +12,8 @@
*/
// This is Piwik logo, the static file used in this test suit
+use Piwik\Core\Piwik;
+
define("TEST_FILE_LOCATION", realpath(dirname(__FILE__) . "/../../resources/lipsum.txt"));
define("TEST_FILE_CONTENT_TYPE", "text/plain");
diff --git a/tests/PHPUnit/DatabaseTestCase.php b/tests/PHPUnit/DatabaseTestCase.php
index f30c5b0fe3..e432767b5b 100644
--- a/tests/PHPUnit/DatabaseTestCase.php
+++ b/tests/PHPUnit/DatabaseTestCase.php
@@ -6,6 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
/**
* Tests extending DatabaseTestCase are much slower to run: the setUp will
diff --git a/tests/PHPUnit/Integration/ArchiveCronTest.php b/tests/PHPUnit/Integration/ArchiveCronTest.php
index 47c3beaac4..ad0bbe3aae 100644
--- a/tests/PHPUnit/Integration/ArchiveCronTest.php
+++ b/tests/PHPUnit/Integration/ArchiveCronTest.php
@@ -5,6 +5,7 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+use Piwik\Core\Piwik;
/**
* Tests the archive.php cron script.
diff --git a/tests/PHPUnit/Integration/EcommerceOrderWithItemsTest.php b/tests/PHPUnit/Integration/EcommerceOrderWithItemsTest.php
index d34d88e8aa..9ff5d73aba 100755
--- a/tests/PHPUnit/Integration/EcommerceOrderWithItemsTest.php
+++ b/tests/PHPUnit/Integration/EcommerceOrderWithItemsTest.php
@@ -5,6 +5,7 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+use Piwik\Core\Piwik;
/**
* Tests API methods after ecommerce orders are tracked.
diff --git a/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php b/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php
index 1f924f2ac6..e416615da9 100755
--- a/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php
+++ b/tests/PHPUnit/Integration/OneVisitorOneWebsite_SeveralDaysDateRange_ArchivingTestsTest.php
@@ -5,6 +5,7 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+use Piwik\Core\Piwik;
/**
* Tests some API using range periods & makes sure the correct amount of blob/numeric
diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php
index 9967f8252e..2c662f39f5 100755
--- a/tests/PHPUnit/IntegrationTestCase.php
+++ b/tests/PHPUnit/IntegrationTestCase.php
@@ -6,6 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
require_once PIWIK_INCLUDE_PATH . '/libs/PiwikTracker/PiwikTracker.php';
diff --git a/tests/PHPUnit/Plugins/LoginTest.php b/tests/PHPUnit/Plugins/LoginTest.php
index efd1e101a3..e6b00deada 100644
--- a/tests/PHPUnit/Plugins/LoginTest.php
+++ b/tests/PHPUnit/Plugins/LoginTest.php
@@ -6,6 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
require_once 'Login/Auth.php';
diff --git a/tests/PHPUnit/Plugins/PrivacyManagerTest.php b/tests/PHPUnit/Plugins/PrivacyManagerTest.php
index f731f91bef..ffcfe6a38f 100755
--- a/tests/PHPUnit/Plugins/PrivacyManagerTest.php
+++ b/tests/PHPUnit/Plugins/PrivacyManagerTest.php
@@ -6,6 +6,7 @@
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
use Piwik\Core\Config;
+use Piwik\Core\Piwik;
require_once 'PrivacyManager/PrivacyManager.php';
diff --git a/tests/PHPUnit/Plugins/SegmentEditorTest.php b/tests/PHPUnit/Plugins/SegmentEditorTest.php
index 3ef4238c8a..18b0fabd68 100644
--- a/tests/PHPUnit/Plugins/SegmentEditorTest.php
+++ b/tests/PHPUnit/Plugins/SegmentEditorTest.php
@@ -1,4 +1,6 @@
<?php
+use Piwik\Core\Piwik;
+
/**
* Piwik - Open source web analytics
*
diff --git a/tests/PHPUnit/Plugins/UserCountryTest.php b/tests/PHPUnit/Plugins/UserCountryTest.php
index 6206ab5054..6c6e88536e 100644
--- a/tests/PHPUnit/Plugins/UserCountryTest.php
+++ b/tests/PHPUnit/Plugins/UserCountryTest.php
@@ -5,6 +5,8 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+use Piwik\Core\Piwik;
+
require_once PIWIK_INCLUDE_PATH . '/plugins/UserCountry/UserCountry.php';
require_once 'UserCountry/functions.php';
require_once PIWIK_INCLUDE_PATH . '/core/DataFiles/Countries.php';
diff --git a/tests/PHPUnit/UI/UIIntegrationTest.php b/tests/PHPUnit/UI/UIIntegrationTest.php
index 14a047c832..905ca23d1f 100644
--- a/tests/PHPUnit/UI/UIIntegrationTest.php
+++ b/tests/PHPUnit/UI/UIIntegrationTest.php
@@ -5,6 +5,7 @@
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
+use Piwik\Core\Piwik;
/**
* Tests UI code by grabbing screenshots of webpages and comparing with expected files.
diff --git a/tests/resources/staticFileServer.php b/tests/resources/staticFileServer.php
index fc647f26af..da49ceb7ad 100644
--- a/tests/resources/staticFileServer.php
+++ b/tests/resources/staticFileServer.php
@@ -9,6 +9,8 @@
* This decision has a structural impact on the usual unit test file structure
* serveStaticFile.test.php has been created to avoid making too many modifications to /tests/core/Piwik.test.php
*/
+use Piwik\Core\Piwik;
+
define('PIWIK_DOCUMENT_ROOT', dirname(__FILE__).'/../../');
if(file_exists(PIWIK_DOCUMENT_ROOT . '/bootstrap.php'))
{