[Web] Fix app password editing, fixes #4239
parent
a6c9b8003f
commit
e616755072
|
@ -51,7 +51,6 @@ return function(task)
|
||||||
and not task:has_symbol('GLOBAL_MIME_FROM_BL')
|
and not task:has_symbol('GLOBAL_MIME_FROM_BL')
|
||||||
and not task:has_symbol('LOCAL_BL_ASN')
|
and not task:has_symbol('LOCAL_BL_ASN')
|
||||||
and not task:has_symbol('GLOBAL_RCPT_BL')
|
and not task:has_symbol('GLOBAL_RCPT_BL')
|
||||||
and not task:has_symbol('BAD_SUBJECT_00')
|
|
||||||
and not task:has_symbol('MAILCOW_BLACK') then
|
and not task:has_symbol('MAILCOW_BLACK') then
|
||||||
local action = task:get_metric_action('default')
|
local action = task:get_metric_action('default')
|
||||||
if action == 'reject' or action == 'add header' or action == 'rewrite subject' then
|
if action == 'reject' or action == 'add header' or action == 'rewrite subject' then
|
||||||
|
|
|
@ -136,7 +136,7 @@ function app_passwd($_action, $_data = null) {
|
||||||
$_SESSION['return'][] = array(
|
$_SESSION['return'][] = array(
|
||||||
'type' => 'success',
|
'type' => 'success',
|
||||||
'log' => array(__FUNCTION__, $_action, $_data_log),
|
'log' => array(__FUNCTION__, $_action, $_data_log),
|
||||||
'msg' => array('object_modified', htmlspecialchars($ids))
|
'msg' => array('object_modified', htmlspecialchars(implode(', ', $ids)))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -189,7 +189,7 @@ function app_passwd($_action, $_data = null) {
|
||||||
`active`
|
`active`
|
||||||
FROM `app_passwd`
|
FROM `app_passwd`
|
||||||
WHERE `id` = :id");
|
WHERE `id` = :id");
|
||||||
$stmt->execute(array(':id' => $_data['id']));
|
$stmt->execute(array(':id' => $_data));
|
||||||
$app_passwd_data = $stmt->fetch(PDO::FETCH_ASSOC);
|
$app_passwd_data = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||||
if (empty($app_passwd_data)) {
|
if (empty($app_passwd_data)) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -202,4 +202,4 @@ function app_passwd($_action, $_data = null) {
|
||||||
return $app_passwd_data;
|
return $app_passwd_data;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,7 +133,7 @@ jQuery(function($){
|
||||||
{"name":"address","title":lang.alias},
|
{"name":"address","title":lang.alias},
|
||||||
{"name":"validity","formatter":function unix_time_format(tm) { var date = new Date(tm ? tm * 1000 : 0); return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});},"title":lang.alias_valid_until,"style":{"width":"170px"}},
|
{"name":"validity","formatter":function unix_time_format(tm) { var date = new Date(tm ? tm * 1000 : 0); return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});},"title":lang.alias_valid_until,"style":{"width":"170px"}},
|
||||||
{"sorted": true,"sortValue": function(value){res = new Date(value);return res.getTime();},"direction":"DESC","name":"created","formatter":function date_format(datetime) { var date = new Date(datetime.replace(/-/g, "/")); return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});},"title":lang.created_on,"style":{"width":"170px"}},
|
{"sorted": true,"sortValue": function(value){res = new Date(value);return res.getTime();},"direction":"DESC","name":"created","formatter":function date_format(datetime) { var date = new Date(datetime.replace(/-/g, "/")); return date.toLocaleDateString(undefined, {year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", second: "2-digit"});},"title":lang.created_on,"style":{"width":"170px"}},
|
||||||
{"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":lang.action,"breakpoints":"xs sm"}
|
{"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","min-width":"220px","width":"220px"},"type":"html","title":lang.action,"breakpoints":"xs sm"}
|
||||||
],
|
],
|
||||||
"empty": lang.empty,
|
"empty": lang.empty,
|
||||||
"rows": $.ajax({
|
"rows": $.ajax({
|
||||||
|
@ -259,7 +259,7 @@ jQuery(function($){
|
||||||
{"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}},
|
{"sorted": true,"name":"id","title":"ID","style":{"maxWidth":"60px","width":"60px","text-align":"center"}},
|
||||||
{"name":"name","title":lang.app_name},
|
{"name":"name","title":lang.app_name},
|
||||||
{"name":"active","filterable": false,"style":{"maxWidth":"70px","width":"70px"},"title":lang.active,"formatter": function(value){return 1==value?'<i class="bi bi-check-lg"></i>':0==value&&'<i class="bi bi-x-lg"></i>';}},
|
{"name":"active","filterable": false,"style":{"maxWidth":"70px","width":"70px"},"title":lang.active,"formatter": function(value){return 1==value?'<i class="bi bi-check-lg"></i>':0==value&&'<i class="bi bi-x-lg"></i>';}},
|
||||||
{"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","maxWidth":"180px","width":"180px"},"type":"html","title":lang.action,"breakpoints":"xs sm"}
|
{"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right","min-width":"220px","width":"220px"},"type":"html","title":lang.action,"breakpoints":"xs sm"}
|
||||||
],
|
],
|
||||||
"empty": lang.empty,
|
"empty": lang.empty,
|
||||||
"rows": $.ajax({
|
"rows": $.ajax({
|
||||||
|
|
|
@ -485,7 +485,7 @@ if (isset($_GET['query'])) {
|
||||||
}
|
}
|
||||||
if (!empty($app_passwds)) {
|
if (!empty($app_passwds)) {
|
||||||
foreach ($app_passwds as $app_passwd) {
|
foreach ($app_passwds as $app_passwd) {
|
||||||
$details = app_passwd('details', array('id' => $app_passwd['id']));
|
$details = app_passwd('details', $app_passwd['id']);
|
||||||
if ($details !== false) {
|
if ($details !== false) {
|
||||||
$data[] = $details;
|
$data[] = $details;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue