From: Roland Haeder Date: Sun, 8 Mar 2015 23:55:35 +0000 (+0100) Subject: onArgsInitialize() wants an array and many plugins want to add more elements, so... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ac198ec31a03b8c062fa44952315ccb8bb8597b7;p=quix0rs-gnu-social.git onArgsInitialize() wants an array and many plugins want to add more elements, so make it everywhere the same. Signed-off-by: Roland Haeder --- diff --git a/plugins/AnonymousFave/AnonymousFavePlugin.php b/plugins/AnonymousFave/AnonymousFavePlugin.php index 6ff1cb19de..e5230a8857 100644 --- a/plugins/AnonymousFave/AnonymousFavePlugin.php +++ b/plugins/AnonymousFave/AnonymousFavePlugin.php @@ -62,7 +62,7 @@ class AnonymousFavePlugin extends Plugin // that anonymous faving is allowed for all users. public $restricted = array(); - function onArgsInitialize() { + function onArgsInitialize(array &$args) { // We always want a session because we're tracking anon users common_ensure_session(); } diff --git a/plugins/ApiLogger/ApiLoggerPlugin.php b/plugins/ApiLogger/ApiLoggerPlugin.php index 920009de5a..0db34fd5aa 100644 --- a/plugins/ApiLogger/ApiLoggerPlugin.php +++ b/plugins/ApiLogger/ApiLoggerPlugin.php @@ -32,7 +32,7 @@ class ApiLoggerPlugin extends Plugin // 0.1 will check about 10% of hits, etc. public $frequency = 1.0; - function onArgsInitialize($args) + function onArgsInitialize(array &$args) { if (isset($args['action'])) { $action = strtolower($args['action']); diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 16d5c20add..423d22ddb1 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -60,7 +60,7 @@ class CasAuthenticationPlugin extends AuthenticationPlugin return parent::onAutoload($cls); } - function onArgsInitialize(&$args) + function onArgsInitialize(array &$args) { if($this->takeOverLogin && $args['action'] == 'login') { diff --git a/plugins/EmailRegistration/EmailRegistrationPlugin.php b/plugins/EmailRegistration/EmailRegistrationPlugin.php index 9e0fd58856..330f72b15b 100644 --- a/plugins/EmailRegistration/EmailRegistrationPlugin.php +++ b/plugins/EmailRegistration/EmailRegistrationPlugin.php @@ -49,7 +49,7 @@ class EmailRegistrationPlugin extends Plugin { const CONFIRMTYPE = 'register'; - function onArgsInitialize(&$args) + function onArgsInitialize(array &$args) { if (array_key_exists('action', $args) && $args['action'] == 'register') { // YOINK! diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index 9f4daf9fcc..22c60c8939 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -125,7 +125,7 @@ class OpenIDPlugin extends Plugin * * @return boolean hook return */ - function onArgsInitialize($args) + function onArgsInitialize(array &$args) { if (common_config('site', 'openidonly')) { if (array_key_exists('action', $args)) { diff --git a/plugins/PostDebug/PostDebugPlugin.php b/plugins/PostDebug/PostDebugPlugin.php index cfeb81cf2a..72492deaca 100644 --- a/plugins/PostDebug/PostDebugPlugin.php +++ b/plugins/PostDebug/PostDebugPlugin.php @@ -40,7 +40,7 @@ class PostDebugPlugin extends Plugin */ public $dir=false; - public function onArgsInitialize(&$args) + public function onArgsInitialize(array &$args) { if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'POST') { diff --git a/plugins/SlicedFavorites/SlicedFavoritesPlugin.php b/plugins/SlicedFavorites/SlicedFavoritesPlugin.php index 4e1129536d..e8435fa05a 100644 --- a/plugins/SlicedFavorites/SlicedFavoritesPlugin.php +++ b/plugins/SlicedFavorites/SlicedFavoritesPlugin.php @@ -65,7 +65,7 @@ class SlicedFavoritesPlugin extends Plugin } // Take over the default... :D - function onArgsInitialize($args) + function onArgsInitialize(array &$args) { if (array_key_exists('action', $args)) { $action = trim($args['action']); diff --git a/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php b/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php index bb60323ffc..f94abb9b20 100644 --- a/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php +++ b/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php @@ -41,11 +41,11 @@ class StrictTransportSecurityPlugin extends Plugin parent::__construct(); } - function onArgsInitialize($args) + function onArgsInitialize(array &$args) { $path = common_config('site', 'path'); if(common_config('site', 'ssl') == 'always' && ($path == '/' || ! $path )) { - header('Strict-Transport-Security: max-age=' . $this->max_age . + ($this->includeSubDomains?'; includeSubDomains':'')); + header('Strict-Transport-Security: max-age=' . $this->max_age . + ($this->includeSubDomains ? '; includeSubDomains' : '')); } }