From 58e10ebb6e917f27a71f3695477f3e279af0c316 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 31 Jan 2015 17:51:43 +0100 Subject: [PATCH] Also for onEndShowScripts() 'Action' is the proper type-hint. Signed-off-by: Roland Haeder --- plugins/AnonymousFave/AnonymousFavePlugin.php | 2 +- plugins/Autocomplete/AutocompletePlugin.php | 2 +- plugins/Blog/BlogPlugin.php | 2 +- plugins/Bookmark/BookmarkPlugin.php | 2 +- plugins/ClientSideShorten/ClientSideShortenPlugin.php | 2 +- plugins/DirectionDetector/DirectionDetectorPlugin.php | 2 +- plugins/Event/EventPlugin.php | 2 +- plugins/FacebookBridge/FacebookBridgePlugin.php | 2 +- plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php | 2 +- .../GNUsocialProfileExtensionsPlugin.php | 2 +- plugins/GoogleAnalytics/GoogleAnalyticsPlugin.php | 2 +- plugins/InfiniteScroll/InfiniteScrollPlugin.php | 2 +- plugins/LinkPreview/LinkPreviewPlugin.php | 2 +- plugins/Mapstraction/MapstractionPlugin.php | 2 +- plugins/MobileProfile/MobileProfilePlugin.php | 2 +- plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php | 2 +- plugins/PiwikAnalytics/PiwikAnalyticsPlugin.php | 2 +- plugins/QnA/QnAPlugin.php | 2 +- plugins/Realtime/RealtimePlugin.php | 2 +- plugins/Recaptcha/RecaptchaPlugin.php | 2 +- plugins/TabFocus/TabFocusPlugin.php | 2 +- plugins/TinyMCE/TinyMCEPlugin.php | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/plugins/AnonymousFave/AnonymousFavePlugin.php b/plugins/AnonymousFave/AnonymousFavePlugin.php index 841b652401..ef7a69381b 100644 --- a/plugins/AnonymousFave/AnonymousFavePlugin.php +++ b/plugins/AnonymousFave/AnonymousFavePlugin.php @@ -93,7 +93,7 @@ class AnonymousFavePlugin extends Plugin } } - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { // Setup ajax calls for favoriting. Usually this is only done when // a user is logged in. diff --git a/plugins/Autocomplete/AutocompletePlugin.php b/plugins/Autocomplete/AutocompletePlugin.php index 380ab5a5dc..0d3fdfc91d 100644 --- a/plugins/Autocomplete/AutocompletePlugin.php +++ b/plugins/Autocomplete/AutocompletePlugin.php @@ -39,7 +39,7 @@ class AutocompletePlugin extends Plugin parent::__construct(); } - function onEndShowScripts($action){ + function onEndShowScripts(Action $action){ if (common_logged_in()) { $action->element('span', array('id' => 'autocomplete-api', 'data-url' => common_local_url('autocomplete'))); diff --git a/plugins/Blog/BlogPlugin.php b/plugins/Blog/BlogPlugin.php index 5f377186fe..723146221c 100644 --- a/plugins/Blog/BlogPlugin.php +++ b/plugins/Blog/BlogPlugin.php @@ -189,7 +189,7 @@ class BlogPlugin extends MicroAppPlugin return null; } - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $action->script(common_path('plugins/TinyMCE/js/jquery.tinymce.js')); $action->inlineScript('var _tinymce_path = "'.common_path('plugins/TinyMCE/js/tiny_mce.js').'";'."\n". diff --git a/plugins/Bookmark/BookmarkPlugin.php b/plugins/Bookmark/BookmarkPlugin.php index 234e8accac..8de736a527 100644 --- a/plugins/Bookmark/BookmarkPlugin.php +++ b/plugins/Bookmark/BookmarkPlugin.php @@ -100,7 +100,7 @@ class BookmarkPlugin extends MicroAppPlugin return true; } - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $action->script($this->path('js/bookmark.js')); return true; diff --git a/plugins/ClientSideShorten/ClientSideShortenPlugin.php b/plugins/ClientSideShorten/ClientSideShortenPlugin.php index 94629a07b0..9dd3b1f515 100644 --- a/plugins/ClientSideShorten/ClientSideShortenPlugin.php +++ b/plugins/ClientSideShorten/ClientSideShortenPlugin.php @@ -38,7 +38,7 @@ class ClientSideShortenPlugin extends Plugin parent::__construct(); } - function onEndShowScripts($action){ + function onEndShowScripts(Action $action){ if (common_logged_in()) { $user = common_current_user(); $action->inlineScript('var maxNoticeLength = ' . User_urlshortener_prefs::maxNoticeLength($user)); diff --git a/plugins/DirectionDetector/DirectionDetectorPlugin.php b/plugins/DirectionDetector/DirectionDetectorPlugin.php index 561d38cd38..289196b4a9 100644 --- a/plugins/DirectionDetector/DirectionDetectorPlugin.php +++ b/plugins/DirectionDetector/DirectionDetectorPlugin.php @@ -118,7 +118,7 @@ class DirectionDetectorPlugin extends Plugin { * * @param Action $action */ - function onEndShowScripts($action){ + function onEndShowScripts(Action $action){ if (common_logged_in()) { $action->script($this->path('jquery.DirectionDetector.js')); } diff --git a/plugins/Event/EventPlugin.php b/plugins/Event/EventPlugin.php index b64779fa77..3afab5f13b 100644 --- a/plugins/Event/EventPlugin.php +++ b/plugins/Event/EventPlugin.php @@ -291,7 +291,7 @@ class EventPlugin extends MicroAppPlugin } } - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $action->script($this->path('js/event.js')); } diff --git a/plugins/FacebookBridge/FacebookBridgePlugin.php b/plugins/FacebookBridge/FacebookBridgePlugin.php index f6f519ed34..9618eee31c 100644 --- a/plugins/FacebookBridge/FacebookBridgePlugin.php +++ b/plugins/FacebookBridge/FacebookBridgePlugin.php @@ -329,7 +329,7 @@ class FacebookBridgePlugin extends Plugin * @param Action $action the current action * */ - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { if ($this->needsScripts($action)) { diff --git a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php index 598af388fb..906509fef5 100644 --- a/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php +++ b/plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php @@ -162,7 +162,7 @@ class GNUsocialPhotosPlugin extends Plugin $action->cssLink('/plugins/GNUsocialPhotos/res/style.css'); } - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $action->script('plugins/GNUsocialPhotos/res/gnusocialphotos.js'); } diff --git a/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php b/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php index cf8eda17c9..fcf7e87366 100644 --- a/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php +++ b/plugins/GNUsocialProfileExtensions/GNUsocialProfileExtensionsPlugin.php @@ -107,7 +107,7 @@ class GNUsocialProfileExtensionsPlugin extends Plugin $action->cssLink('/plugins/GNUsocialProfileExtensions/res/style.css'); } - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $action->script('plugins/GNUsocialProfileExtensions/js/profile.js'); } diff --git a/plugins/GoogleAnalytics/GoogleAnalyticsPlugin.php b/plugins/GoogleAnalytics/GoogleAnalyticsPlugin.php index 1dc0f0f07a..2f07747a4d 100644 --- a/plugins/GoogleAnalytics/GoogleAnalyticsPlugin.php +++ b/plugins/GoogleAnalytics/GoogleAnalyticsPlugin.php @@ -64,7 +64,7 @@ class GoogleAnalyticsPlugin extends Plugin parent::__construct(); } - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $code = common_config('googleanalytics', 'code'); if (empty($code)) { diff --git a/plugins/InfiniteScroll/InfiniteScrollPlugin.php b/plugins/InfiniteScroll/InfiniteScrollPlugin.php index 716a90dedf..713e9ef61a 100644 --- a/plugins/InfiniteScroll/InfiniteScrollPlugin.php +++ b/plugins/InfiniteScroll/InfiniteScrollPlugin.php @@ -41,7 +41,7 @@ class InfiniteScrollPlugin extends Plugin parent::__construct(); } - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $action->inlineScript('var infinite_scroll_on_next_only = ' . ($this->on_next_only?'true':'false') . ';'); $action->inlineScript('var ajax_loader_url = "' . ($this->path('ajax-loader.gif')) . '";'); diff --git a/plugins/LinkPreview/LinkPreviewPlugin.php b/plugins/LinkPreview/LinkPreviewPlugin.php index 5edf66767d..5e04d4d154 100644 --- a/plugins/LinkPreview/LinkPreviewPlugin.php +++ b/plugins/LinkPreview/LinkPreviewPlugin.php @@ -48,7 +48,7 @@ class LinkPreviewPlugin extends Plugin * @param Action $action * @return boolean hook result */ - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $user = common_current_user(); if ($user && common_config('attachments', 'process_links')) { diff --git a/plugins/Mapstraction/MapstractionPlugin.php b/plugins/Mapstraction/MapstractionPlugin.php index c802fbfb91..7356607ce2 100644 --- a/plugins/Mapstraction/MapstractionPlugin.php +++ b/plugins/Mapstraction/MapstractionPlugin.php @@ -83,7 +83,7 @@ class MapstractionPlugin extends Plugin * * @return boolean event handler return */ - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $actionName = $action->trimmed('action'); diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index 145311d5b0..2713f5b934 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -332,7 +332,7 @@ class MobileProfilePlugin extends WAP20Plugin } } - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { // @todo FIXME: "Show Navigation" / "Hide Navigation" needs i18n $action->inlineScript(' diff --git a/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php b/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php index 06c75f7a93..a597f82996 100644 --- a/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php +++ b/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php @@ -42,7 +42,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { */ class OpenExternalLinkTargetPlugin extends Plugin { - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { $action->inlineScript('$(document).on("click", "a[rel~=external]:not([class~=attachment])", function () { window.open(this.href); return false; });'); diff --git a/plugins/PiwikAnalytics/PiwikAnalyticsPlugin.php b/plugins/PiwikAnalytics/PiwikAnalyticsPlugin.php index fa5894a8f5..59ef822cb2 100644 --- a/plugins/PiwikAnalytics/PiwikAnalyticsPlugin.php +++ b/plugins/PiwikAnalytics/PiwikAnalyticsPlugin.php @@ -76,7 +76,7 @@ class PiwikAnalyticsPlugin extends Plugin * * @return boolean ignored */ - function onEndShowScripts($action) + function onEndShowScripts(Action $action) { // Slight modification to the default code. // Loading the piwik.js file from a