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=364b8e308babfaeb64e5ba45e4df9aa881ac9d97;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 82e06b5576..d523077c5e 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 ee28e8d8a4..ccb4f1b8c7 100644 --- a/plugins/ApiLogger/ApiLoggerPlugin.php +++ b/plugins/ApiLogger/ApiLoggerPlugin.php @@ -33,7 +33,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 17c5f49d7e..015f76011d 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -63,7 +63,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 05868d2444..be889b36b7 100644 --- a/plugins/EmailRegistration/EmailRegistrationPlugin.php +++ b/plugins/EmailRegistration/EmailRegistrationPlugin.php @@ -51,7 +51,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 b85ba44c7a..fdbc22f903 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -129,7 +129,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 94c049837f..1d1e73ee0f 100644 --- a/plugins/PostDebug/PostDebugPlugin.php +++ b/plugins/PostDebug/PostDebugPlugin.php @@ -42,7 +42,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 0d1d05351f..6a9f548b13 100644 --- a/plugins/SlicedFavorites/SlicedFavoritesPlugin.php +++ b/plugins/SlicedFavorites/SlicedFavoritesPlugin.php @@ -67,7 +67,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 07047c2778..212a46fae9 100644 --- a/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php +++ b/plugins/StrictTransportSecurity/StrictTransportSecurityPlugin.php @@ -42,7 +42,7 @@ class StrictTransportSecurityPlugin extends Plugin parent::__construct(); } - function onArgsInitialize($args) + function onArgsInitialize(array &$args) { $path = common_config('site', 'path'); if (GNUsocial::useHTTPS() && ($path == '/' || mb_strlen($path)==0 )) {