Hanno commited on 2019-03-14 11:17:25
Zeige 1 geänderte Dateien mit 1 Einfügungen und 19 Löschungen.
... | ... |
@@ -186,20 +186,6 @@ function userdomain() |
186 | 186 |
return $res; |
187 | 187 |
} |
188 | 188 |
|
189 |
-function user_uses_userdomain() |
|
190 |
-{ |
|
191 |
- global $config; |
|
192 |
- $uid = (int) $_SESSION['userinfo']['uid']; |
|
193 |
- $userdomain = userdomain(); |
|
194 |
- $result = db_query("SELECT id FROM vhosts.vhost WHERE domain=:domid AND user=:uid", array(":uid" => $uid, ":domid" => $userdomain['id'])); |
|
195 |
- if ($result->rowCount() > 0) { |
|
196 |
- DEBUG("User hat ".$result->rowCount()." Domains *.schokokeks.net"); |
|
197 |
- return true; |
|
198 |
- } |
|
199 |
- DEBUG("User hat keine Domains *.schokokeks.net"); |
|
200 |
- return false; |
|
201 |
-} |
|
202 |
- |
|
203 | 189 |
function domainselect($selected = null, $selectattribute = '') |
204 | 190 |
{ |
205 | 191 |
global $domainlist, $config; |
... | ... |
@@ -222,12 +208,8 @@ function domainselect($selected = null, $selectattribute = '') |
222 | 208 |
$ret .= "<option value=\"{$dom->id}\"{$s}>{$dom->fqdn}</option>\n"; |
223 | 209 |
} |
224 | 210 |
$userdomain = userdomain(); |
225 |
- $user_needs_userdomain = $userdomain && (count($domainlist) == 0 || user_uses_userdomain()); |
|
226 |
- $user_needs_userdomain = $user_needs_userdomain || ($selected == -2); |
|
227 |
- if (count($domainlist) > 0 && $user_needs_userdomain) { |
|
228 | 211 |
$ret .= ' <option value="" disabled="disabled">--------------------------------</option>'; |
229 |
- } |
|
230 |
- if ($userdomain && (count($domainlist) == 0 || user_uses_userdomain())) { |
|
212 |
+ if ($userdomain) { |
|
231 | 213 |
$s = ($selected == -1 ? ' selected="selected"' : ''); |
232 | 214 |
$ret .= ' <option value="-1"'.$s.'>'.$_SESSION['userinfo']['username'].'.'.$userdomain['name'].'</option>'; |
233 | 215 |
} |
234 | 216 |