X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FCasAuthentication%2FCasAuthenticationPlugin.php;h=2f17492a8e2dd4c35356a954272eabc40644c6aa;hb=39dce9e348410b0f5e16d4c8176d01d2d0a7215e;hp=203e5fe420c6e6f1e09e1bb172ab47f1c8466c50;hpb=c89ed16d24d56879bf40a70d500509d1d42a4532;p=quix0rs-gnu-social.git diff --git a/plugins/CasAuthentication/CasAuthenticationPlugin.php b/plugins/CasAuthentication/CasAuthenticationPlugin.php index 203e5fe420..2f17492a8e 100644 --- a/plugins/CasAuthentication/CasAuthenticationPlugin.php +++ b/plugins/CasAuthentication/CasAuthenticationPlugin.php @@ -22,7 +22,7 @@ * @category Plugin * @package StatusNet * @author Craig Andrews - * @copyright 2009 Craig Andrews http://candrews.integralblue.com + * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org * @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0 * @link http://status.net/ */ @@ -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) @@ -74,13 +74,15 @@ class CasAuthenticationPlugin extends AuthenticationPlugin return true; } - function onEndLoginGroupNav(&$action) + function onEndLoginGroupNav($action) { $action_name = $action->trimmed('action'); $action->menuItem(common_local_url('caslogin'), + // TRANS: Menu item. CAS is Central Authentication Service. _m('CAS'), - _m('Login or register with CAS'), + // TRANS: Tooltip for menu item. CAS is Central Authentication Service. + _m('Login or register with CAS.'), $action_name === 'caslogin'); return true; @@ -93,9 +95,11 @@ class CasAuthenticationPlugin extends AuthenticationPlugin switch ($name) { case 'login': - $instr = '(Have an account with CAS? ' . - 'Try our [CAS login]'. - '(%%action.caslogin%%)!)'; + // TRANS: Invitation to users with a CAS account to log in using the service. + // TRANS: "[CAS login]" is a link description. (%%action.caslogin%%) is the URL. + // TRANS: These two elements may not be separated. + $instr = _m('(Have an account with CAS? ' . + 'Try our [CAS login](%%action.caslogin%%)!)'); break; default: return true; @@ -121,13 +125,16 @@ class CasAuthenticationPlugin extends AuthenticationPlugin function onInitializePlugin(){ parent::onInitializePlugin(); if(!isset($this->server)){ - throw new Exception("must specify a server"); + // 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("must specify a port"); + // 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("must specify a path"); + // 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 @@ -143,11 +150,11 @@ class CasAuthenticationPlugin extends AuthenticationPlugin function onPluginVersion(&$versions) { $versions[] = array('name' => 'CAS Authentication', - 'version' => STATUSNET_VERSION, + 'version' => GNUSOCIAL_VERSION, 'author' => 'Craig Andrews', 'homepage' => 'http://status.net/wiki/Plugin:CasAuthentication', - 'rawdescription' => - _m('The CAS Authentication plugin allows for StatusNet to handle authentication through CAS (Central Authentication Service).')); + // TRANS: Plugin description. CAS is Central Authentication Service. + 'rawdescription' => _m('The CAS Authentication plugin allows for StatusNet to handle authentication through CAS (Central Authentication Service).')); return true; } }