bernd commited on 2010-01-04 13:33:15
Zeige 2 geänderte Dateien mit 8 Einfügungen und 8 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1561 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -91,7 +91,7 @@ function get_dyndns_records($id) |
91 | 91 |
$data = array(); |
92 | 92 |
while ($entry = mysql_fetch_assoc($result)) { |
93 | 93 |
$dom = new Domain((int) $entry['domain']); |
94 |
- $dom->ensure_customerdomain(); |
|
94 |
+ $dom->ensure_userdomain(); |
|
95 | 95 |
$entry['fqdn'] = $entry['hostname'].'.'.$dom->fqdn; |
96 | 96 |
if (! $entry['hostname']) |
97 | 97 |
$entry['fqdn'] = $dom->fqdn; |
... | ... |
@@ -133,7 +133,7 @@ function get_dns_record($id) |
133 | 133 |
system_failure('illegal ID'); |
134 | 134 |
$data = mysql_fetch_assoc($result); |
135 | 135 |
$dom = new Domain( (int) $data['domain']); |
136 |
- $dom->ensure_customerdomain(); |
|
136 |
+ $dom->ensure_userdomain(); |
|
137 | 137 |
DEBUG($data); |
138 | 138 |
return $data; |
139 | 139 |
} |
... | ... |
@@ -146,7 +146,7 @@ function get_domain_records($dom) |
146 | 146 |
$data = array(); |
147 | 147 |
while ($entry = mysql_fetch_assoc($result)) { |
148 | 148 |
$dom = new Domain((int) $entry['domain']); |
149 |
- $dom->ensure_customerdomain(); |
|
149 |
+ $dom->ensure_userdomain(); |
|
150 | 150 |
$entry['fqdn'] = $entry['hostname'].'.'.$dom->fqdn; |
151 | 151 |
if (! $entry['hostname']) |
152 | 152 |
$entry['fqdn'] = $dom->fqdn; |
... | ... |
@@ -182,7 +182,7 @@ function save_dns_record($id, $record) |
182 | 182 |
if (!in_array($record['type'], $implemented_record_types)) |
183 | 183 |
system_failure('record type '.$record['type'].' not implemented at the moment.'); |
184 | 184 |
$dom = new Domain( (int) $record['domain'] ); |
185 |
- $dom->ensure_customerdomain(); |
|
185 |
+ $dom->ensure_userdomain(); |
|
186 | 186 |
if (! $dom->id) |
187 | 187 |
system_failure('invalid domain'); |
188 | 188 |
verify_input_hostname($record['hostname'], true); |
... | ... |
@@ -271,7 +271,7 @@ function delete_dns_record($id) |
271 | 271 |
function convert_from_autorecords($domainid) |
272 | 272 |
{ |
273 | 273 |
$dom = new Domain( (int) $domainid ); |
274 |
- $dom->ensure_customerdomain(); |
|
274 |
+ $dom->ensure_userdomain(); |
|
275 | 275 |
$dom = $dom->id; |
276 | 276 |
|
277 | 277 |
db_query("INSERT IGNORE INTO dns.custom_records SELECT r.id, r.lastchange, type, d.id, hostname, ip, NULL AS dyndns, data, spec, ttl FROM dns.v_tmptable_allrecords AS r INNER JOIN dns.v_domains AS d ON (d.name=r.domain) WHERE d.id={$dom}"); |
... | ... |
@@ -282,7 +282,7 @@ function convert_from_autorecords($domainid) |
282 | 282 |
function enable_autorecords($domainid) |
283 | 283 |
{ |
284 | 284 |
$dom = new Domain( (int) $domainid ); |
285 |
- $dom->ensure_customerdomain(); |
|
285 |
+ $dom->ensure_userdomain(); |
|
286 | 286 |
$dom = $dom->id; |
287 | 287 |
|
288 | 288 |
db_query("UPDATE kundendaten.domains SET autodns=1 WHERE id={$dom} LIMIT 1"); |
... | ... |
@@ -291,7 +291,7 @@ function enable_autorecords($domainid) |
291 | 291 |
function disable_autorecords($domainid) |
292 | 292 |
{ |
293 | 293 |
$dom = new Domain( (int) $domainid ); |
294 |
- $dom->ensure_customerdomain(); |
|
294 |
+ $dom->ensure_userdomain(); |
|
295 | 295 |
$dom = $dom->id; |
296 | 296 |
|
297 | 297 |
db_query("UPDATE kundendaten.domains SET autodns=0 WHERE id={$dom} LIMIT 1"); |
... | ... |
@@ -3,7 +3,7 @@ |
3 | 3 |
$role = $_SESSION['role']; |
4 | 4 |
|
5 | 5 |
|
6 |
-if ($role & ROLE_CUSTOMER) |
|
6 |
+if ($role & ROLE_SYSTEMUSER && $role & ROLE_CUSTOMER) |
|
7 | 7 |
{ |
8 | 8 |
$menu["dns_dns"] = array("label" => "DNS-Einträge", "file" => "dns", "weight" => 10, "submenu" => "domains_domains"); |
9 | 9 |
$menu["dns_dyndns"] = array("label" => "DynDNS", "file" => "dyndns", "weight" => 11, "submenu" => "domains_domains"); |
10 | 10 |