]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
move check for SSL from util.php to OpenIDPlugin
authorEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 13:00:58 +0000 (09:00 -0400)
committerEvan Prodromou <evan@controlyourself.ca>
Tue, 4 Aug 2009 17:01:23 +0000 (13:01 -0400)
lib/util.php
plugins/OpenID/OpenIDPlugin.php

index cd9bd9ed83b421b44e768a6f2e6934d03b2c583f..1f9dd429c7948b6bd009696027a81c2979b52795 100644 (file)
@@ -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))) {
index 5d600159bf9c3c6908907da2c56663604edc6191..ccbad5ffbd62f21c2485f037d7207791f5ac5002 100644 (file)
@@ -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;
+        }
+    }
+}