[BS5] add whats new modal after update
This commit is contained in:
@@ -27,7 +27,11 @@ if (is_array($alertbox_log_parser)) {
|
||||
$globalVariables = [
|
||||
'mailcow_info' => array(
|
||||
'version_tag' => $GLOBALS['MAILCOW_GIT_VERSION'],
|
||||
'git_project_url' => $GLOBALS['MAILCOW_GIT_URL']
|
||||
'last_version_tag' => $GLOBALS['MAILCOW_LAST_GIT_VERSION'],
|
||||
'project_url' => $GLOBALS['MAILCOW_GIT_URL'],
|
||||
'project_owner' => $GLOBALS['MAILCOW_GIT_OWNER'],
|
||||
'project_repo' => $GLOBALS['MAILCOW_GIT_REPO'],
|
||||
'updatedAt' => $GLOBALS['MAILCOW_UPDATEDAT']
|
||||
),
|
||||
'js_path' => '/cache/'.basename($JSPath),
|
||||
'pending_tfa_method' => @$_SESSION['pending_tfa_method'],
|
||||
|
@@ -251,7 +251,7 @@ function password_check($password1, $password2) {
|
||||
|
||||
return true;
|
||||
}
|
||||
function last_login($action, $username, $sasl_limit_days = 7) {
|
||||
function last_login($action, $username, $sasl_limit_days = 7, $ui_offset = 1) {
|
||||
global $pdo;
|
||||
global $redis;
|
||||
$sasl_limit_days = intval($sasl_limit_days);
|
||||
@@ -319,8 +319,11 @@ function last_login($action, $username, $sasl_limit_days = 7) {
|
||||
$stmt = $pdo->prepare('SELECT `remote`, `time` FROM `logs`
|
||||
WHERE JSON_EXTRACT(`call`, "$[0]") = "check_login"
|
||||
AND JSON_EXTRACT(`call`, "$[1]") = :username
|
||||
AND `type` = "success" ORDER BY `time` DESC LIMIT 1 OFFSET 1');
|
||||
$stmt->execute(array(':username' => $username));
|
||||
AND `type` = "success" ORDER BY `time` DESC LIMIT 1 OFFSET :offset');
|
||||
$stmt->execute(array(
|
||||
':username' => $username,
|
||||
':offset' => $ui_offset
|
||||
));
|
||||
$ui = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user