bernd commited on 2010-10-06 08:47:19
Zeige 1 geänderte Dateien mit 7 Einfügungen und 5 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1833 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -19,12 +19,14 @@ function list_vhosts() |
19 | 19 |
return $ret; |
20 | 20 |
} |
21 | 21 |
|
22 |
-function ipv6_possible($serverid) |
|
22 |
+function ipv6_possible($server) |
|
23 | 23 |
{ |
24 |
- $serverid = (int) $serverid; |
|
25 |
- $result = db_query("SELECT v6_prefix FROM system.servers WHERE id={$serverid}"); |
|
26 |
- $server = mysql_fetch_assoc($result); |
|
27 |
- return ($server['v6_prefix'] != NULL); |
|
24 |
+ $serverid = (int) $server; |
|
25 |
+ $servername = mysql_real_escape_string($server); |
|
26 |
+ $result = db_query("SELECT v6_prefix FROM system.servers WHERE id={$serverid} OR hostname='{$servername}'"); |
|
27 |
+ $line = mysql_fetch_assoc($result); |
|
28 |
+ DEBUG("Server {$server} is v6-capable: ". ($line['v6_prefix'] != NULL)); |
|
29 |
+ return ($line['v6_prefix'] != NULL); |
|
28 | 30 |
} |
29 | 31 |
|
30 | 32 |
function empty_vhost() |
31 | 33 |