Change all the "new class" by "new Class"

This commit is contained in:
2021-05-07 13:10:37 +02:00
parent c8d275be31
commit c09fa961cd
39 changed files with 430 additions and 432 deletions

View File

@@ -23,11 +23,11 @@ class Authhtpasswd extends Auth
public function connect ()
{
if (! file_exists ($this->htpasswdFile))
throw new Exception (sprintf (dgettext ("domframework",
throw new \Exception (sprintf (dgettext ("domframework",
"The HTPasswd file '%s' is not found"),
$this->htpasswdFile), 500);
if (! is_readable ($this->htpasswdFile))
throw new Exception (sprintf (dgettext ("domframework",
throw new \Exception (sprintf (dgettext ("domframework",
"The HTPasswd file '%s' is not readable"),
$this->htpasswdFile), 500);
}
@@ -55,12 +55,12 @@ class Authhtpasswd extends Auth
throw new \Exception (dgettext ("domframework",
"Invalid format of password"), 500);
if (crypt ($password, $cryptedPassword) !== $cryptedPassword)
throw new Exception ("Bad password for '$email'", 401);
throw new \Exception ("Bad password for '$email'", 401);
$this->details = array ("email"=>$email);
return TRUE;
}
}
throw new Exception ("Unable to find the user : '$email'", 401);
throw new \Exception ("Unable to find the user : '$email'", 401);
}
/** Return all the parameters recorded for the authenticate user */
@@ -75,7 +75,7 @@ class Authhtpasswd extends Auth
@param string $newpassword The new password to be recorded */
public function changepassword ($oldpassword, $newpassword)
{
throw new Exception (dgettext ("domframework",
throw new \Exception (dgettext ("domframework",
"The password can't be change for HTPasswd users"),
405);
}
@@ -87,7 +87,7 @@ class Authhtpasswd extends Auth
@param string $newpassword The new password to be recorded */
public function overwritepassword ($email, $newpassword)
{
throw new Exception (dgettext ("domframework",
throw new \Exception (dgettext ("domframework",
"The password can't be change for HTPasswd users"),
405);
}