diff options
27 files changed, 113 insertions, 137 deletions
diff --git a/core/AssetManager.php b/core/AssetManager.php index 541157dc2f..682ae0a09a 100644 --- a/core/AssetManager.php +++ b/core/AssetManager.php @@ -46,7 +46,7 @@ class AssetManager { const MERGED_CSS_FILE = "asset_manager_global_css.css"; const MERGED_JS_FILE = "asset_manager_global_js.js"; - const CSS_IMPORT_EVENT = "AssetManager.getCssFiles"; + const CSS_IMPORT_EVENT = "AssetManager.getStylesheetFiles"; const JS_IMPORT_EVENT = "AssetManager.getJsFiles"; const MERGED_FILE_DIR = "tmp/assets/"; const CSS_IMPORT_DIRECTIVE = "<link rel=\"stylesheet\" type=\"text/css\" href=\"%s\" />\n"; @@ -110,7 +110,7 @@ class AssetManager $less = self::makeLess(); // Loop through each css file - $files = self::getCssFiles(); + $files = self::getStylesheetFiles(); $mergedContent = ""; foreach ($files as $file) { @@ -234,9 +234,9 @@ class AssetManager { $cssIncludeString = ''; - $cssFiles = self::getCssFiles(); + $stylesheets = self::getStylesheetFiles(); - foreach ($cssFiles as $cssFile) { + foreach ($stylesheets as $cssFile) { self::validateCssFile($cssFile); $cssIncludeString = $cssIncludeString . sprintf(self::CSS_IMPORT_DIRECTIVE, $cssFile); @@ -250,12 +250,12 @@ class AssetManager * * @return Array */ - private static function getCssFiles() + private static function getStylesheetFiles() { - $cssFiles = array(); - Piwik_PostEvent(self::CSS_IMPORT_EVENT, array(&$cssFiles)); + $stylesheets = array(); + Piwik_PostEvent(self::CSS_IMPORT_EVENT, array(&$stylesheets)); - $cssFiles = self::sortCssFiles($cssFiles); + $stylesheets = self::sortCssFiles($stylesheets); // We also look for the currently enabled theme and add CSS from the json $theme = PluginsManager::getInstance()->getThemeEnabled(); @@ -264,18 +264,18 @@ class AssetManager if(isset($info['stylesheet'])) { $themeStylesheetFile = 'plugins/'. $theme->getPluginName() . '/' . $info['stylesheet']; } - $cssFiles[] = $themeStylesheetFile; + $stylesheets[] = $themeStylesheetFile; } - return $cssFiles; + return $stylesheets; } /** * Ensure CSS stylesheets are loaded in a particular order regardless of the order that plugins are loaded. * - * @param array $cssFiles Array of CSS stylesheet files + * @param array $stylesheets Array of CSS stylesheet files * @return array */ - private static function sortCssFiles($cssFiles) + private static function sortCssFiles($stylesheets) { $priorityCssOrdered = array( 'libs/', @@ -287,7 +287,7 @@ class AssetManager 'tests/', ); - return self::prioritySort($priorityCssOrdered, $cssFiles); + return self::prioritySort($priorityCssOrdered, $stylesheets); } /** diff --git a/plugins/API/API.php b/plugins/API/API.php index 16b3a50c5f..ef383fb292 100644 --- a/plugins/API/API.php +++ b/plugins/API/API.php @@ -638,7 +638,7 @@ class Plugin extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'TopMenu.add' => 'addTopMenu', ); } @@ -665,8 +665,8 @@ class Plugin extends \Piwik\Plugin } } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/API/stylesheets/listAllAPI.less"; + $stylesheets[] = "plugins/API/stylesheets/listAllAPI.less"; } }
\ No newline at end of file diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php index 519f384de8..bed8cb94a6 100644 --- a/plugins/Actions/Actions.php +++ b/plugins/Actions/Actions.php @@ -61,15 +61,15 @@ class Actions extends \Piwik\Plugin 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentsMetadata' => 'getSegmentsMetadata', 'ViewDataTable.getReportDisplayProperties' => 'getReportDisplayProperties', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles' ); return $hooks; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/Actions/stylesheets/dataTableActions.less"; + $stylesheets[] = "plugins/Actions/stylesheets/dataTableActions.less"; } public function getJsFiles(&$jsFiles) diff --git a/plugins/Annotations/Annotations.php b/plugins/Annotations/Annotations.php index 3b756314c9..92609ecf16 100755 --- a/plugins/Annotations/Annotations.php +++ b/plugins/Annotations/Annotations.php @@ -24,7 +24,7 @@ class Annotations extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles' ); } @@ -32,9 +32,9 @@ class Annotations extends \Piwik\Plugin /** * Adds css files for this plugin to the list in the event notification. */ - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/Annotations/stylesheets/annotations.less"; + $stylesheets[] = "plugins/Annotations/stylesheets/annotations.less"; } /** diff --git a/plugins/CoreAdminHome/CoreAdminHome.php b/plugins/CoreAdminHome/CoreAdminHome.php index 607df94246..da1dce264d 100644 --- a/plugins/CoreAdminHome/CoreAdminHome.php +++ b/plugins/CoreAdminHome/CoreAdminHome.php @@ -30,7 +30,7 @@ class CoreAdminHome extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles', 'AdminMenu.add' => 'addMenu', 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks', @@ -56,12 +56,12 @@ class CoreAdminHome extends \Piwik\Plugin $tasks[] = $optimizeArchiveTableTask; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "libs/jquery/themes/base/jquery-ui.css"; - $cssFiles[] = "plugins/CoreAdminHome/stylesheets/menu.less"; - $cssFiles[] = "plugins/Zeitgeist/stylesheets/base.less"; - $cssFiles[] = "plugins/CoreAdminHome/stylesheets/generalSettings.less"; + $stylesheets[] = "libs/jquery/themes/base/jquery-ui.css"; + $stylesheets[] = "plugins/CoreAdminHome/stylesheets/menu.less"; + $stylesheets[] = "plugins/Zeitgeist/stylesheets/base.less"; + $stylesheets[] = "plugins/CoreAdminHome/stylesheets/generalSettings.less"; } public function getJsFiles(&$jsFiles) diff --git a/plugins/CoreHome/Controller.php b/plugins/CoreHome/Controller.php index 7a70f1ac94..b3d2e263ab 100644 --- a/plugins/CoreHome/Controller.php +++ b/plugins/CoreHome/Controller.php @@ -108,30 +108,6 @@ class Controller extends \Piwik\Controller echo $view->render(); } - /** - * This method is called when the asset manager is configured in merged mode. - * It returns the content of the css merged file. - * - * @see core/AssetManager.php - */ - public function getCss() - { - $cssMergedFile = AssetManager::getMergedCssFileLocation(); - Piwik::serveStaticFile($cssMergedFile, "text/css"); - } - - /** - * This method is called when the asset manager is configured in merged mode. - * It returns the content of the js merged file. - * - * @see core/AssetManager.php - */ - public function getJs() - { - $jsMergedFile = AssetManager::getMergedJsFileLocation(); - Piwik::serveStaticFile($jsMergedFile, "application/javascript; charset=UTF-8"); - } - // -------------------------------------------------------- // ROW EVOLUTION // The following methods render the popover that shows the diff --git a/plugins/CoreHome/CoreHome.php b/plugins/CoreHome/CoreHome.php index f6429b1304..64fe4b56dd 100644 --- a/plugins/CoreHome/CoreHome.php +++ b/plugins/CoreHome/CoreHome.php @@ -24,7 +24,7 @@ class CoreHome extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles', 'WidgetsList.add' => 'addWidgets', ); @@ -39,22 +39,22 @@ class CoreHome extends \Piwik\Plugin WidgetsList::add('Example Widgets', 'Installation_Welcome', 'CoreHome', 'getPromoVideo'); } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "libs/jquery/themes/base/jquery-ui.css"; - $cssFiles[] = "libs/jquery/stylesheets/jquery.jscrollpane.css"; - $cssFiles[] = "libs/jquery/stylesheets/scroll.less"; - $cssFiles[] = "plugins/Zeitgeist/stylesheets/base.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/coreHome.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/menu.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/dataTable.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/cloud.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css"; - $cssFiles[] = "plugins/CoreHome/stylesheets/jqplotColors.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/sparklineColors.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/promo.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/color_manager.css"; - $cssFiles[] = "plugins/CoreHome/stylesheets/sparklineColors.less"; + $stylesheets[] = "libs/jquery/themes/base/jquery-ui.css"; + $stylesheets[] = "libs/jquery/stylesheets/jquery.jscrollpane.css"; + $stylesheets[] = "libs/jquery/stylesheets/scroll.less"; + $stylesheets[] = "plugins/Zeitgeist/stylesheets/base.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/coreHome.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/menu.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/dataTable.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/cloud.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/jquery.ui.autocomplete.css"; + $stylesheets[] = "plugins/CoreHome/stylesheets/jqplotColors.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/sparklineColors.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/promo.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/color_manager.css"; + $stylesheets[] = "plugins/CoreHome/stylesheets/sparklineColors.less"; } public function getJsFiles(&$jsFiles) diff --git a/plugins/CoreVisualizations/CoreVisualizations.php b/plugins/CoreVisualizations/CoreVisualizations.php index b1dd216858..535f3b284e 100644 --- a/plugins/CoreVisualizations/CoreVisualizations.php +++ b/plugins/CoreVisualizations/CoreVisualizations.php @@ -28,7 +28,7 @@ class CoreVisualizations extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles', 'DataTableVisualization.getAvailable' => 'getAvailableDataTableVisualizations', ); @@ -45,10 +45,10 @@ class CoreVisualizations extends \Piwik\Plugin $visualizations[] = 'Piwik\\Plugins\\CoreVisualizations\\Visualizations\\JqplotGraph\\Evolution'; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/CoreVisualizations/stylesheets/dataTableVisualizations.less"; - $cssFiles[] = "plugins/CoreVisualizations/stylesheets/jqplot.css"; + $stylesheets[] = "plugins/CoreVisualizations/stylesheets/dataTableVisualizations.less"; + $stylesheets[] = "plugins/CoreVisualizations/stylesheets/jqplot.css"; } public function getJsFiles(&$jsFiles) diff --git a/plugins/DBStats/DBStats.php b/plugins/DBStats/DBStats.php index 9cb9c42fc3..22e767f360 100644 --- a/plugins/DBStats/DBStats.php +++ b/plugins/DBStats/DBStats.php @@ -31,7 +31,7 @@ class DBStats extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AdminMenu.add' => 'addMenu', 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks', 'ViewDataTable.getReportDisplayProperties' => 'getReportDisplayProperties', @@ -75,9 +75,9 @@ class DBStats extends \Piwik\Plugin Piwik_SetOption(self::TIME_OF_LAST_TASK_RUN_OPTION, $now); } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/DBStats/stylesheets/dbStatsTable.less"; + $stylesheets[] = "plugins/DBStats/stylesheets/dbStatsTable.less"; } /** Returns the date when the cacheDataByArchiveNameReports was last run. */ diff --git a/plugins/Dashboard/Dashboard.php b/plugins/Dashboard/Dashboard.php index 58618e05b4..f3b2d81862 100644 --- a/plugins/Dashboard/Dashboard.php +++ b/plugins/Dashboard/Dashboard.php @@ -30,7 +30,7 @@ class Dashboard extends \Piwik\Plugin { return array( 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'UsersManager.deleteUser' => 'deleteDashboardLayout', 'Menu.add' => 'addMenus', 'TopMenu.add' => 'addTopMenu', @@ -237,10 +237,10 @@ class Dashboard extends \Piwik\Plugin $jsFiles[] = "plugins/Dashboard/javascripts/dashboard.js"; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/CoreHome/stylesheets/dataTable.less"; - $cssFiles[] = "plugins/Dashboard/stylesheets/dashboard.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/dataTable.less"; + $stylesheets[] = "plugins/Dashboard/stylesheets/dashboard.less"; } public function deleteDashboardLayout($userLogin) diff --git a/plugins/ExampleRssWidget/ExampleRssWidget.php b/plugins/ExampleRssWidget/ExampleRssWidget.php index 868913959e..08ad525223 100644 --- a/plugins/ExampleRssWidget/ExampleRssWidget.php +++ b/plugins/ExampleRssWidget/ExampleRssWidget.php @@ -24,14 +24,14 @@ class ExampleRssWidget extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'WidgetsList.add' => 'addWidgets' ); } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/ExampleRssWidget/stylesheets/rss.less"; + $stylesheets[] = "plugins/ExampleRssWidget/stylesheets/rss.less"; } public function addWidgets() diff --git a/plugins/Feedback/Feedback.php b/plugins/Feedback/Feedback.php index 48f8d297f4..b8c0d6ff52 100644 --- a/plugins/Feedback/Feedback.php +++ b/plugins/Feedback/Feedback.php @@ -24,7 +24,7 @@ class Feedback extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles', 'TopMenu.add' => 'addTopMenu', ); @@ -42,9 +42,9 @@ class Feedback extends \Piwik\Plugin ); } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/Feedback/stylesheets/feedback.less"; + $stylesheets[] = "plugins/Feedback/stylesheets/feedback.less"; } public function getJsFiles(&$jsFiles) diff --git a/plugins/Goals/Goals.php b/plugins/Goals/Goals.php index efc8582685..c0fb1d6c6f 100644 --- a/plugins/Goals/Goals.php +++ b/plugins/Goals/Goals.php @@ -89,7 +89,7 @@ class Goals extends \Piwik\Plugin { $hooks = array( 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'Common.fetchWebsiteAttributes' => 'fetchGoalsFromDb', 'ArchiveProcessing_Day.compute' => 'archiveDay', 'ArchiveProcessing_Period.compute' => 'archivePeriod', @@ -406,9 +406,9 @@ class Goals extends \Piwik\Plugin $jsFiles[] = "plugins/Goals/javascripts/goalsForm.js"; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/Goals/stylesheets/goals.css"; + $stylesheets[] = "plugins/Goals/stylesheets/goals.css"; } public function fetchGoalsFromDb(&$array, $idSite) diff --git a/plugins/Installation/Installation.php b/plugins/Installation/Installation.php index 91224a6ceb..aca46527dc 100644 --- a/plugins/Installation/Installation.php +++ b/plugins/Installation/Installation.php @@ -31,7 +31,7 @@ class Installation extends \Piwik\Plugin 'FrontController.NoConfigurationFile' => 'dispatch', 'FrontController.badConfigurationFile' => 'dispatch', 'AdminMenu.add' => 'addMenu', - 'AssetManager.getCssFiles' => 'getCss', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', ); return $hooks; } @@ -86,8 +86,8 @@ class Installation extends \Piwik\Plugin /** * Adds CSS files to list of CSS files for asset manager. */ - public function getCss(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/Installation/stylesheets/systemCheckPage.less"; + $stylesheets[] = "plugins/Installation/stylesheets/systemCheckPage.less"; } } diff --git a/plugins/LanguagesManager/LanguagesManager.php b/plugins/LanguagesManager/LanguagesManager.php index 004d82ade6..4372676c74 100644 --- a/plugins/LanguagesManager/LanguagesManager.php +++ b/plugins/LanguagesManager/LanguagesManager.php @@ -34,7 +34,7 @@ class LanguagesManager extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles', 'TopMenu.add' => 'showLanguagesSelector', 'Translate.getLanguageToLoad' => 'getLanguageToLoad', @@ -43,9 +43,9 @@ class LanguagesManager extends \Piwik\Plugin ); } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/Zeitgeist/stylesheets/base.less"; + $stylesheets[] = "plugins/Zeitgeist/stylesheets/base.less"; } public function getJsFiles(&$jsFiles) diff --git a/plugins/Live/Live.php b/plugins/Live/Live.php index 5036ae7dba..3694366e4f 100644 --- a/plugins/Live/Live.php +++ b/plugins/Live/Live.php @@ -26,17 +26,17 @@ class Live extends \Piwik\Plugin { return array( 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'WidgetsList.add' => 'addWidget', 'Menu.add' => 'addMenu', 'ViewDataTable.getReportDisplayProperties' => 'getReportDisplayProperties', ); } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/Live/stylesheets/live.less"; - $cssFiles[] = "plugins/Live/stylesheets/visitor_profile.less"; + $stylesheets[] = "plugins/Live/stylesheets/live.less"; + $stylesheets[] = "plugins/Live/stylesheets/visitor_profile.less"; } public function getJsFiles(&$jsFiles) diff --git a/plugins/MobileMessaging/MobileMessaging.php b/plugins/MobileMessaging/MobileMessaging.php index fecec9de43..a3a4360429 100644 --- a/plugins/MobileMessaging/MobileMessaging.php +++ b/plugins/MobileMessaging/MobileMessaging.php @@ -69,7 +69,7 @@ class MobileMessaging extends \Piwik\Plugin return array( 'AdminMenu.add' => 'addMenu', 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'PDFReports.getReportParameters' => 'getReportParameters', 'PDFReports.validateReportParameters' => 'validateReportParameters', 'PDFReports.getReportMetadata' => 'getReportMetadata', @@ -100,9 +100,9 @@ class MobileMessaging extends \Piwik\Plugin $jsFiles[] = "plugins/MobileMessaging/javascripts/MobileMessagingSettings.js"; } - public function getCssFiles($cssFiles) + public function getStylesheetFiles($stylesheets) { - $cssFiles[] = "plugins/MobileMessaging/stylesheets/MobileMessagingSettings.less"; + $stylesheets[] = "plugins/MobileMessaging/stylesheets/MobileMessagingSettings.less"; } public function validateReportParameters(&$parameters, $info) diff --git a/plugins/MultiSites/MultiSites.php b/plugins/MultiSites/MultiSites.php index fab4cd498e..7aaa857ac0 100644 --- a/plugins/MultiSites/MultiSites.php +++ b/plugins/MultiSites/MultiSites.php @@ -32,7 +32,7 @@ class MultiSites extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles', 'TopMenu.add' => 'addTopMenu', 'API.getReportMetadata' => 'getReportMetadata', @@ -86,8 +86,8 @@ class MultiSites extends \Piwik\Plugin $jsFiles[] = "plugins/MultiSites/javascripts/multiSites.js"; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/MultiSites/stylesheets/multiSites.less"; + $stylesheets[] = "plugins/MultiSites/stylesheets/multiSites.less"; } } diff --git a/plugins/SegmentEditor/SegmentEditor.php b/plugins/SegmentEditor/SegmentEditor.php index 1c588a483d..8037d868e9 100644 --- a/plugins/SegmentEditor/SegmentEditor.php +++ b/plugins/SegmentEditor/SegmentEditor.php @@ -45,7 +45,7 @@ class SegmentEditor extends \Piwik\Plugin 'Piwik.getKnownSegmentsToArchiveForSite' => 'getKnownSegmentsToArchiveForSite', 'Piwik.getKnownSegmentsToArchiveAllSites' => 'getKnownSegmentsToArchiveAllSites', 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'template_nextToCalendar' => 'getSegmentEditorHtml', ); } @@ -105,8 +105,8 @@ class SegmentEditor extends \Piwik\Plugin $jsFiles[] = "plugins/SegmentEditor/javascripts/Segmentation.js"; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/SegmentEditor/stylesheets/segmentation.less"; + $stylesheets[] = "plugins/SegmentEditor/stylesheets/segmentation.less"; } } diff --git a/plugins/SitesManager/SitesManager.php b/plugins/SitesManager/SitesManager.php index cdc3a92f2b..9e8c0abd05 100644 --- a/plugins/SitesManager/SitesManager.php +++ b/plugins/SitesManager/SitesManager.php @@ -29,7 +29,7 @@ class SitesManager extends \Piwik\Plugin { return array( 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AdminMenu.add' => 'addMenu', 'Common.fetchWebsiteAttributes' => 'recordWebsiteDataInCache', ); @@ -46,10 +46,10 @@ class SitesManager extends \Piwik\Plugin /** * Get CSS files */ - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/SitesManager/stylesheets/SitesManager.less"; - $cssFiles[] = "plugins/Zeitgeist/stylesheets/base.less"; + $stylesheets[] = "plugins/SitesManager/stylesheets/SitesManager.less"; + $stylesheets[] = "plugins/Zeitgeist/stylesheets/base.less"; } /** diff --git a/plugins/Transitions/Transitions.php b/plugins/Transitions/Transitions.php index d0ea42d9b7..48e7937460 100644 --- a/plugins/Transitions/Transitions.php +++ b/plugins/Transitions/Transitions.php @@ -22,14 +22,14 @@ class Transitions extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles' ); } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = 'plugins/Transitions/stylesheets/transitions.less'; + $stylesheets[] = 'plugins/Transitions/stylesheets/transitions.less'; } public function getJsFiles(&$jsFiles) diff --git a/plugins/TreemapVisualization/TreemapVisualization.php b/plugins/TreemapVisualization/TreemapVisualization.php index 46413b5b17..c864e7c4be 100644 --- a/plugins/TreemapVisualization/TreemapVisualization.php +++ b/plugins/TreemapVisualization/TreemapVisualization.php @@ -41,7 +41,7 @@ class TreemapVisualization extends \Piwik\Plugin public function getListHooksRegistered() { return array( - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles', 'DataTableVisualization.getAvailable' => 'getAvailableDataTableVisualizations', 'ViewDataTable.configureReportView' => 'configureReportViewForActions' @@ -53,10 +53,10 @@ class TreemapVisualization extends \Piwik\Plugin $visualizations[] = 'Piwik\\Plugins\\TreemapVisualization\\Treemap'; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = 'plugins/TreemapVisualization/stylesheets/treemap.less'; - $cssFiles[] = 'plugins/TreemapVisualization/stylesheets/treemapColors.less'; + $stylesheets[] = 'plugins/TreemapVisualization/stylesheets/treemap.less'; + $stylesheets[] = 'plugins/TreemapVisualization/stylesheets/treemapColors.less'; } public function getJsFiles(&$jsFiles) diff --git a/plugins/UserCountry/UserCountry.php b/plugins/UserCountry/UserCountry.php index 2562766c08..1f9f31e062 100644 --- a/plugins/UserCountry/UserCountry.php +++ b/plugins/UserCountry/UserCountry.php @@ -46,7 +46,7 @@ class UserCountry extends \Piwik\Plugin 'Goals.getReportsWithGoalMetrics' => 'getReportsWithGoalMetrics', 'API.getReportMetadata' => 'getReportMetadata', 'API.getSegmentsMetadata' => 'getSegmentsMetadata', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'AssetManager.getJsFiles' => 'getJsFiles', 'Tracker.getVisitorLocation' => 'getVisitorLocation', 'TaskScheduler.getScheduledTasks' => 'getScheduledTasks', @@ -61,9 +61,9 @@ class UserCountry extends \Piwik\Plugin $tasks[] = GeoIPAutoUpdater::makeScheduledTask(); } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/UserCountry/stylesheets/userCountry.less"; + $stylesheets[] = "plugins/UserCountry/stylesheets/userCountry.less"; } public function getJsFiles(&$jsFiles) diff --git a/plugins/UserCountryMap/UserCountryMap.php b/plugins/UserCountryMap/UserCountryMap.php index 66da62b137..17cd549f79 100644 --- a/plugins/UserCountryMap/UserCountryMap.php +++ b/plugins/UserCountryMap/UserCountryMap.php @@ -55,7 +55,7 @@ class UserCountryMap extends \Piwik\Plugin { $hooks = array( 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'Menu.add' => 'addMenu', ); return $hooks; @@ -76,9 +76,9 @@ class UserCountryMap extends \Piwik\Plugin $jsFiles[] = "plugins/UserCountryMap/javascripts/realtime-map.js"; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/UserCountryMap/stylesheets/visitor-map.less"; - $cssFiles[] = "plugins/UserCountryMap/stylesheets/realtime-map.less"; + $stylesheets[] = "plugins/UserCountryMap/stylesheets/visitor-map.less"; + $stylesheets[] = "plugins/UserCountryMap/stylesheets/realtime-map.less"; } } diff --git a/plugins/UsersManager/UsersManager.php b/plugins/UsersManager/UsersManager.php index 8ff37b9ae5..edc0a1b9be 100644 --- a/plugins/UsersManager/UsersManager.php +++ b/plugins/UsersManager/UsersManager.php @@ -33,7 +33,7 @@ class UsersManager extends \Piwik\Plugin return array( 'AdminMenu.add' => 'addMenu', 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'SitesManager.deleteSite' => 'deleteSite', 'Common.fetchWebsiteAttributes' => 'recordAdminUsersInCache', ); @@ -81,9 +81,9 @@ class UsersManager extends \Piwik\Plugin /** * Get CSS files */ - function getCssFiles(&$cssFiles) + function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/UsersManager/stylesheets/usersManager.less"; + $stylesheets[] = "plugins/UsersManager/stylesheets/usersManager.less"; } /** diff --git a/plugins/Widgetize/Widgetize.php b/plugins/Widgetize/Widgetize.php index b47fdf9e21..47c50e00a2 100644 --- a/plugins/Widgetize/Widgetize.php +++ b/plugins/Widgetize/Widgetize.php @@ -25,7 +25,7 @@ class Widgetize extends \Piwik\Plugin { return array( 'AssetManager.getJsFiles' => 'getJsFiles', - 'AssetManager.getCssFiles' => 'getCssFiles', + 'AssetManager.getStylesheetFiles' => 'getStylesheetFiles', 'TopMenu.add' => 'addTopMenu', ); } @@ -48,12 +48,12 @@ class Widgetize extends \Piwik\Plugin $jsFiles[] = "plugins/Widgetize/javascripts/widgetize.js"; } - public function getCssFiles(&$cssFiles) + public function getStylesheetFiles(&$stylesheets) { - $cssFiles[] = "plugins/Widgetize/stylesheets/widgetize.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/coreHome.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/dataTable.less"; - $cssFiles[] = "plugins/CoreHome/stylesheets/cloud.less"; - $cssFiles[] = "plugins/Dashboard/stylesheets/dashboard.less"; + $stylesheets[] = "plugins/Widgetize/stylesheets/widgetize.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/coreHome.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/dataTable.less"; + $stylesheets[] = "plugins/CoreHome/stylesheets/cloud.less"; + $stylesheets[] = "plugins/Dashboard/stylesheets/dashboard.less"; } } diff --git a/tests/PHPUnit/TestingEnvironment.php b/tests/PHPUnit/TestingEnvironment.php index 171ce74901..a5b1509732 100644 --- a/tests/PHPUnit/TestingEnvironment.php +++ b/tests/PHPUnit/TestingEnvironment.php @@ -23,8 +23,8 @@ class Piwik_TestingEnvironment Piwik_AddAction('FrontController.dispatch', function() { \Piwik\Plugins\CoreVisualizations\Visualizations\Cloud::$debugDisableShuffle = true; }); - Piwik_AddAction('AssetManager.getCssFiles', function(&$cssFiles) { - $cssFiles[] = 'tests/resources/screenshot-override/override.css'; + Piwik_AddAction('AssetManager.getStylesheetFiles', function(&$stylesheets) { + $stylesheets[] = 'tests/resources/screenshot-override/override.css'; }); Piwik_AddAction('AssetManager.getJsFiles', function(&$jsFiles) { $jsFiles[] = 'tests/resources/screenshot-override/jquery.waitforimages.js'; |