Update domframework to be gettext package compliant
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1661 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -41,14 +41,16 @@ class authsympa extends auth
|
||||
public function __construct ()
|
||||
{
|
||||
if (! class_exists ("SoapClient"))
|
||||
throw new Exception (_("No SOAP PHP library available"), 500);
|
||||
throw new Exception (dgettext("domframework",
|
||||
"No SOAP PHP library available"), 500);
|
||||
}
|
||||
|
||||
/** Connect to the Sympa server */
|
||||
public function connect ()
|
||||
{
|
||||
if ($this->wsdl === null)
|
||||
throw new Exception (_("No WSDL provided to Sympa auth"), 401);
|
||||
throw new Exception (dgettext("domframework",
|
||||
"No WSDL provided to Sympa auth"), 401);
|
||||
$this->client = new SoapClient($this->wsdl);
|
||||
}
|
||||
|
||||
@@ -58,13 +60,15 @@ class authsympa extends auth
|
||||
public function authentication ($email, $password)
|
||||
{
|
||||
if ($this->client === null)
|
||||
throw new Exception (_("The SOAP connection is not opened"), 401);
|
||||
throw new Exception (dgettext("domframework",
|
||||
"The SOAP connection is not opened"), 401);
|
||||
if ($this->list === null)
|
||||
throw new Exception (_("The list to check is not defined"), 401);
|
||||
throw new Exception (dgettext("domframework",
|
||||
"The list to check is not defined"), 401);
|
||||
$this->authkey = $this->client->login ($email, $password);
|
||||
if ($this->authkey === null)
|
||||
throw new Exception (
|
||||
_("Can't connect with provided email/password to sympa"),
|
||||
throw new Exception (dgettext("domframework",
|
||||
"Can't connect with provided email/password to sympa"),
|
||||
401);
|
||||
$this->email = $email;
|
||||
$rc = $this->client->authenticateAndRun ($email, $this->authkey,
|
||||
@@ -77,7 +81,8 @@ class authsympa extends auth
|
||||
/** Return all the parameters recorded for the authenticate user */
|
||||
public function getdetails ()
|
||||
{
|
||||
throw new Exception (_("The details can't be provided by Sympa"), 404);
|
||||
throw new Exception (dgettext("domframework",
|
||||
"The details can't be provided by Sympa"), 404);
|
||||
}
|
||||
|
||||
/** Method to change the password
|
||||
@@ -86,7 +91,8 @@ class authsympa extends auth
|
||||
@param string $newpassword The new password to be recorded */
|
||||
public function changepassword ($oldpassword, $newpassword)
|
||||
{
|
||||
throw new Exception (_("The password can't be change for SYMPA users"),
|
||||
throw new Exception (dgettext("domframework",
|
||||
"The password can't be change for SYMPA users"),
|
||||
405);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user