move check for SSL from util.php to OpenIDPlugin

This commit is contained in:
Evan Prodromou 2009-08-04 09:00:58 -04:00
parent 797f296974
commit 0616ea0205
2 changed files with 15 additions and 3 deletions

View 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))) {

View File

@ -119,4 +119,17 @@ class OpenIDPlugin extends Plugin
return true;
}
}
}
function onSensitiveAction($action, &$ssl)
{
switch ($action)
{
case 'finishopenidlogin':
case 'finishaddopenid':
$ssl = true;
return false;
default:
return true;
}
}
}