more minor fixes and code-cleaning

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-08-10 12:01:26 +02:00
parent e82d7b5d8b
commit 94a19ee2b6
16 changed files with 33 additions and 29 deletions

View File

@@ -332,7 +332,7 @@ class Install
throw new Exception(lng('error.emailiswrong', [$email]));
} elseif (empty($password) || $password != $password_confirm) {
throw new Exception(lng('error.newpasswordconfirmerror'));
} elseif (!empty($password) && $password == $loginname) {
} elseif ($password == $loginname) {
throw new Exception(lng('error.passwordshouldnotbeusername'));
}
}

View File

@@ -70,10 +70,10 @@ class Update
*
* @return void
*/
public static function lastStepStatus(int $status = -1, string $message = '', string $additional_info = '')
public static function lastStepStatus(int $status = -1, string $message = 'OK', string $additional_info = '')
{
self::$update_tasks[self::$task_counter]['result_txt'] = $message ?? 'OK';
self::$update_tasks[self::$task_counter]['result_desc'] = $additional_info ?? '';
self::$update_tasks[self::$task_counter]['result_txt'] = $message;
self::$update_tasks[self::$task_counter]['result_desc'] = $additional_info;
switch ($status) {
case 0: