Bernd Wurst commited on 2014-01-25 08:23:19
Zeige 1 geänderte Dateien mit 3 Einfügungen und 6 Löschungen.
... | ... |
@@ -27,13 +27,10 @@ function get_domain_offer($domainname) |
27 | 27 |
{ |
28 | 28 |
$domainname = filter_input_hostname($domainname); |
29 | 29 |
$domainname = preg_replace('/^www\./', '', $domainname); |
30 |
- if (preg_match('/.*\..*\..*/', $domainname)) { |
|
31 |
- warning('zu viele Punkte im Domainname'); |
|
32 |
- return; |
|
33 |
- } |
|
34 |
- $basename = preg_replace('/\..*$/', '', $domainname); |
|
30 |
+ |
|
31 |
+ $basename = preg_replace('/([^\.]+)\..*$/', '\1', $domainname); |
|
35 | 32 |
DEBUG('Found Basename: '.$basename); |
36 |
- $tld = preg_replace('/^.*\./', '', $domainname); |
|
33 |
+ $tld = preg_replace('/^[^\.]*\./', '', $domainname); |
|
37 | 34 |
DEBUG('Found TLD: '.$tld); |
38 | 35 |
|
39 | 36 |
$cid = (int) $_SESSION['customerinfo']['customerno']; |
40 | 37 |