From: Evan Prodromou Date: Tue, 4 Aug 2009 13:00:58 +0000 (-0400) Subject: move check for SSL from util.php to OpenIDPlugin X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0616ea020550c2bf3d5ce5e9f6452f9359384146;p=quix0rs-gnu-social.git move check for SSL from util.php to OpenIDPlugin --- diff --git a/lib/util.php b/lib/util.php index cd9bd9ed83..1f9dd429c7 100644 --- a/lib/util.php +++ b/lib/util.php @@ -735,8 +735,7 @@ function common_local_url($action, $args=null, $params=null, $fragment=null) function common_is_sensitive($action) { static $sensitive = array('login', 'register', 'passwordsettings', - 'twittersettings', 'finishopenidlogin', - 'finishaddopenid', 'api'); + 'twittersettings', 'api'); $ssl = null; if (Event::handle('SensitiveAction', array($action, &$ssl))) { diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index 5d600159bf..ccbad5ffbd 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -119,4 +119,17 @@ class OpenIDPlugin extends Plugin return true; } } -} \ No newline at end of file + + function onSensitiveAction($action, &$ssl) + { + switch ($action) + { + case 'finishopenidlogin': + case 'finishaddopenid': + $ssl = true; + return false; + default: + return true; + } + } +}