add domainid to result-list of Emails.get(); fix typo in EmailAccounts.add(); enhance debugging in Database-class
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -109,7 +109,7 @@ class EmailAccounts extends ApiCommand implements ResourceEntity
|
|||||||
`customerid` = :cid,
|
`customerid` = :cid,
|
||||||
`email` = :email,
|
`email` = :email,
|
||||||
`username` = :username," . (Settings::Get('system.mailpwcleartext') == '1' ? '`password` = :password, ' : '') . "
|
`username` = :username," . (Settings::Get('system.mailpwcleartext') == '1' ? '`password` = :password, ' : '') . "
|
||||||
`password_enc` = :password_end,
|
`password_enc` = :password_enc,
|
||||||
`homedir` = :homedir,
|
`homedir` = :homedir,
|
||||||
`maildir` = :maildir,
|
`maildir` = :maildir,
|
||||||
`uid` = :uid,
|
`uid` = :uid,
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ class Emails extends ApiCommand implements ResourceEntity
|
|||||||
$params['customerid'] = implode(", ", $customer_ids);
|
$params['customerid'] = implode(", ", $customer_ids);
|
||||||
$params['idea'] = ($id <= 0 ? $emailaddr : $id);
|
$params['idea'] = ($id <= 0 ? $emailaddr : $id);
|
||||||
|
|
||||||
$result_stmt = Database::prepare("SELECT v.`id`, v.`email`, v.`email_full`, v.`iscatchall`, v.`destination`, v.`customerid`, v.`popaccountid`, u.`quota`
|
$result_stmt = Database::prepare("SELECT v.`id`, v.`email`, v.`email_full`, v.`iscatchall`, v.`destination`, v.`customerid`, v.`popaccountid`, v.`domainid`, u.`quota`
|
||||||
FROM `" . TABLE_MAIL_VIRTUAL . "` v
|
FROM `" . TABLE_MAIL_VIRTUAL . "` v
|
||||||
LEFT JOIN `" . TABLE_MAIL_USERS . "` u ON v.`popaccountid` = u.`id`
|
LEFT JOIN `" . TABLE_MAIL_USERS . "` u ON v.`popaccountid` = u.`id`
|
||||||
WHERE v.`customerid` IN (:customerid)
|
WHERE v.`customerid` IN (:customerid)
|
||||||
|
|||||||
@@ -372,17 +372,17 @@ class Database {
|
|||||||
@fwrite($errlog, "|TRACE\n".$error_trace."\n");
|
@fwrite($errlog, "|TRACE\n".$error_trace."\n");
|
||||||
@fclose($errlog);
|
@fclose($errlog);
|
||||||
|
|
||||||
|
if (empty($sql['debug'])) {
|
||||||
|
$error_trace = '';
|
||||||
|
} elseif (!is_null($stmt)) {
|
||||||
|
$error_trace .= "<br><br>".$stmt->queryString;
|
||||||
|
}
|
||||||
|
|
||||||
if ($showerror && $json_response) {
|
if ($showerror && $json_response) {
|
||||||
throw new Exception($error_message, 500);
|
throw new Exception($error_message.($sql['debug'] ? "\n\n".$error_trace : ''), 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($showerror) {
|
if ($showerror) {
|
||||||
if (empty($sql['debug'])) {
|
|
||||||
$error_trace = '';
|
|
||||||
} elseif (!is_null($stmt)) {
|
|
||||||
$error_trace .= "<br><br>".$stmt->queryString;
|
|
||||||
}
|
|
||||||
|
|
||||||
// fallback
|
// fallback
|
||||||
$theme = 'Sparkle';
|
$theme = 'Sparkle';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user