refactor UI functions

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-21 11:22:03 +01:00
parent b0df4e46d6
commit c0e89bbd05
84 changed files with 2742 additions and 1106 deletions

View File

@@ -88,9 +88,9 @@ class DirProtections extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Res
// duplicate check
if ($username_path_check['username'] == $username && $username_path_check['path'] == $path) {
standard_error('userpathcombinationdupe', '', true);
\Froxlor\UI\Response::standard_error('userpathcombinationdupe', '', true);
} elseif ($password == $username) {
standard_error('passwordshouldnotbeusername', '', true);
\Froxlor\UI\Response::standard_error('passwordshouldnotbeusername', '', true);
}
// insert the entry
@@ -236,7 +236,7 @@ class DirProtections extends \Froxlor\Api\ApiCommand implements \Froxlor\Api\Res
);
if (! empty($password)) {
if ($password == $result['username']) {
standard_error('passwordshouldnotbeusername', '', true);
\Froxlor\UI\Response::standard_error('passwordshouldnotbeusername', '', true);
}
if (CRYPT_STD_DES == 1) {
$saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2);