Bernd Wurst commited on 2014-02-07 05:13:04
Zeige 2 geänderte Dateien mit 6 Einfügungen und 3 Löschungen.
... | ... |
@@ -120,7 +120,8 @@ function db_query($stmt, $params = NULL) |
120 | 120 |
{ |
121 | 121 |
global $_db; |
122 | 122 |
__ensure_connected(); |
123 |
- DEBUG($stmt); |
|
123 |
+ $backtrace = debug_backtrace(); |
|
124 |
+ DEBUG($backtrace[0]['file'].':'.$backtrace[0]['line'].': '.$stmt); |
|
124 | 125 |
if ($params) { |
125 | 126 |
DEBUG($params); |
126 | 127 |
} |
... | ... |
@@ -52,7 +52,7 @@ function change_mailaccount($id, $arr) |
52 | 52 |
{ |
53 | 53 |
$id = (int) $id; |
54 | 54 |
$uid = (int) $_SESSION['userinfo']['uid']; |
55 |
- $conditions = array("local=:local", "domain=:domain"); |
|
55 |
+ $conditions = array(); |
|
56 | 56 |
$values = array(":id" => $id, ":uid" => $uid); |
57 | 57 |
|
58 | 58 |
if (isset($arr['account'])) |
... | ... |
@@ -73,6 +73,8 @@ function change_mailaccount($id, $arr) |
73 | 73 |
} |
74 | 74 |
} |
75 | 75 |
$values[":local"] = $local; |
76 |
+ $conditions[] = "local=:local"; |
|
77 |
+ $conditions[] = "domain=:domain"; |
|
76 | 78 |
} |
77 | 79 |
if (isset($arr['mailbox'])) { |
78 | 80 |
array_push($conditions, "`maildir`=:maildir"); |
... | ... |
@@ -96,7 +98,7 @@ function change_mailaccount($id, $arr) |
96 | 98 |
|
97 | 99 |
|
98 | 100 |
db_query("UPDATE mail.mailaccounts SET ".implode(",", $conditions)." WHERE id=:id AND uid=:uid", $values); |
99 |
- logger(LOG_INFO, "modules/imap/include/mailaccounts", "imap", "updated account »{$arr['account']}«"); |
|
101 |
+ logger(LOG_INFO, "modules/imap/include/mailaccounts", "imap", "updated account »{$id}«"); |
|
100 | 102 |
|
101 | 103 |
} |
102 | 104 |
|
103 | 105 |