X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FCasAuthentication%2FCasAuthenticationPlugin.php;h=16d5c20addd07fc77723d4c54a041bd46f7da322;hb=5ba2bf0c57ae6d2dc6f485012dcf34d4616ef9c7;hp=6b751a0aa4fa9e02b39d688e590e411e7851e682;hpb=42dd460d3b9aa9a8ad147d00de9b6c8e209ab4e9;p=quix0rs-gnu-social.git diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 6b751a0aa4..16d5c20add 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -54,10 +54,10 @@ class CasAuthenticationPlugin extends AuthenticationPlugin case 'phpCAS': require_once(INSTALLDIR.'/plugins/CasAuthentication/extlib/CAS.php'); return false; - case 'CasloginAction': - require_once(INSTALLDIR.'/plugins/CasAuthentication/' . strtolower(mb_substr($cls, 0, -6)) . '.php'); - return false; } + + // if it's not our exception, try standard places + return parent::onAutoload($cls); } function onArgsInitialize(&$args) @@ -68,13 +68,13 @@ class CasAuthenticationPlugin extends AuthenticationPlugin } } - function onStartInitializeRouter($m) + function onStartInitializeRouter(URLMapper $m) { $m->connect('main/cas', array('action' => 'caslogin')); return true; } - function onEndLoginGroupNav(&$action) + function onEndLoginGroupNav(Action $action) { $action_name = $action->trimmed('action'); @@ -88,7 +88,7 @@ class CasAuthenticationPlugin extends AuthenticationPlugin return true; } - function onEndShowPageNotice($action) + function onEndShowPageNotice(Action $action) { $name = $action->trimmed('action'); @@ -125,13 +125,16 @@ class CasAuthenticationPlugin extends AuthenticationPlugin function onInitializePlugin(){ parent::onInitializePlugin(); if(!isset($this->server)){ - throw new Exception(_m("Specifying a server is required."); + // TRANS: Exception thrown when the CAS Authentication plugin has been configured incorrectly. + throw new Exception(_m("Specifying a server is required.")); } if(!isset($this->port)){ - throw new Exception(_m("Specifying a port is required."); + // TRANS: Exception thrown when the CAS Authentication plugin has been configured incorrectly. + throw new Exception(_m("Specifying a port is required.")); } if(!isset($this->path)){ - throw new Exception(_m("Specifying a path is required."); + // TRANS: Exception thrown when the CAS Authentication plugin has been configured incorrectly. + throw new Exception(_m("Specifying a path is required.")); } //These values need to be accessible to a action object //I can't think of any other way than global variables @@ -144,10 +147,10 @@ class CasAuthenticationPlugin extends AuthenticationPlugin $casSettings['takeOverLogin']=$this->takeOverLogin; } - function onPluginVersion(&$versions) + function onPluginVersion(array &$versions) { $versions[] = array('name' => 'CAS Authentication', - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:CasAuthentication', // TRANS: Plugin description. CAS is Central Authentication Service.