bernd commited on 2007-08-27 19:46:31
Zeige 2 geänderte Dateien mit 7 Einfügungen und 2 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@646 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -162,8 +162,9 @@ function get_alias_details($id) |
162 | 162 |
|
163 | 163 |
$alias = mysql_fetch_assoc($result); |
164 | 164 |
|
165 |
- if ($alias['domain_id'] == NULL) |
|
165 |
+ if ($alias['domain_id'] == NULL) { |
|
166 | 166 |
$alias['domain_id'] = -1; |
167 |
+ } |
|
167 | 168 |
|
168 | 169 |
/* Das bewirkt, dass nur die eigenen Aliase gesehen werden können */ |
169 | 170 |
get_vhost_details( (int) $alias['vhost'] ); |
... | ... |
@@ -128,9 +128,13 @@ elseif ($_GET['action'] == 'addalias') |
128 | 128 |
|
129 | 129 |
|
130 | 130 |
$hostname = filter_input_hostname($_POST['hostname']); |
131 |
+ $domainid = (int) $_POST['domain']; |
|
132 |
+ if ($domainid != -1) { |
|
131 | 133 |
$domain = new Domain( (int) $_POST['domain'] ); |
132 | 134 |
if ($domain->useraccount != $_SESSION['userinfo']['uid']) |
133 | 135 |
system_failure('Ungültige Domain'); |
136 |
+ $domainid = $domain->id; |
|
137 |
+ } |
|
134 | 138 |
|
135 | 139 |
if (! is_array($_POST['options'])) |
136 | 140 |
$_POST['options'] = array(); |
... | ... |
@@ -147,7 +151,7 @@ elseif ($_GET['action'] == 'addalias') |
147 | 151 |
DEBUG('New options: '.$options); |
148 | 152 |
|
149 | 153 |
$alias['hostname'] = $hostname; |
150 |
- $alias['domainid'] = $domain->id; |
|
154 |
+ $alias['domainid'] = $domainid; |
|
151 | 155 |
|
152 | 156 |
$alias ['options'] = $options; |
153 | 157 |
|
154 | 158 |