Bernd Wurst commited on 2016-02-19 04:57:23
Zeige 2 geänderte Dateien mit 9 Einfügungen und 2 Löschungen.
... | ... |
@@ -50,9 +50,13 @@ foreach ($records AS $rec) |
50 | 50 |
$editable = false; |
51 | 51 |
} else { |
52 | 52 |
$dyndns = get_dyndns_account($rec['dyndns']); |
53 |
+ if ($dyndns === NULL) { |
|
54 |
+ $data = '<em>DynDNS #'.(int) $rec['dyndns'].' (nicht Ihr Account)</em>'; |
|
55 |
+ } else { |
|
53 | 56 |
$data = internal_link('dyndns_edit', '<em>DynDNS #'.(int) $rec['dyndns'].' ('.filter_input_general($dyndns['handle']).')</em>', 'id='.(int) $rec['dyndns']); |
54 | 57 |
} |
55 | 58 |
} |
59 |
+ } |
|
56 | 60 |
if ($rec['type'] == 'mx') |
57 | 61 |
{ |
58 | 62 |
$data .= ' ('.(int) $rec['spec'].')'; |
... | ... |
@@ -35,13 +35,16 @@ function get_dyndns_accounts() |
35 | 35 |
} |
36 | 36 |
|
37 | 37 |
|
38 |
-function get_dyndns_account($id) |
|
38 |
+function get_dyndns_account($id, $ignore=true) |
|
39 | 39 |
{ |
40 | 40 |
$args = array(":id" => (int) $id, |
41 | 41 |
":uid" => (int) $_SESSION['userinfo']['uid']); |
42 | 42 |
$result = db_query("SELECT * FROM dns.dyndns WHERE id=:id AND uid=:uid", $args); |
43 | 43 |
if ($result->rowCount() != 1) { |
44 |
- logger(LOG_WARNING, "modules/dns/include/dnsinclude", "dyndns", "account »{$id}« invalid for uid »{$uid}«."); |
|
44 |
+ if ($ignore) { |
|
45 |
+ return NULL; |
|
46 |
+ } |
|
47 |
+ logger(LOG_WARNING, "modules/dns/include/dnsinclude", "dyndns", "account »{$id}« invalid for uid »{$_SESSION['userinfo']['uid']}«."); |
|
45 | 48 |
system_failure("Account ungültig"); |
46 | 49 |
} |
47 | 50 |
$item = $result->fetch(); |
48 | 51 |