@@ -1517,11 +1517,11 @@ |
||
1517 | 1517 | { |
1518 | 1518 | $hostname = strtolower(trim($hostname)); |
1519 | 1519 | $count = substr_count($hostname, '.'); |
1520 | - if($count === 2){ |
|
1521 | - if(strlen(explode('.', $hostname)[1]) > 3) |
|
1520 | + if ($count === 2) { |
|
1521 | + if (strlen(explode('.', $hostname)[1]) > 3) |
|
1522 | 1522 | $hostname = explode('.', $hostname, 2)[1]; |
1523 | 1523 | } |
1524 | - else if($count > 2) |
|
1524 | + else if ($count > 2) |
|
1525 | 1525 | $hostname = get_domain(explode('.', $hostname, 2)[1]); |
1526 | 1526 | |
1527 | 1527 | return $hostname; |
@@ -1253,7 +1253,6 @@ discard block |
||
1253 | 1253 | |
1254 | 1254 | continue; |
1255 | 1255 | } |
1256 | - |
|
1257 | 1256 | else |
1258 | 1257 | { |
1259 | 1258 | $fh = @fopen($path . '/.htaccess', 'w'); |
@@ -1265,7 +1264,6 @@ discard block |
||
1265 | 1264 | Deny from all' . $close); |
1266 | 1265 | fclose($fh); |
1267 | 1266 | } |
1268 | - |
|
1269 | 1267 | else |
1270 | 1268 | $errors[] = 'htaccess_cannot_create_file'; |
1271 | 1269 | } |
@@ -1276,7 +1274,6 @@ discard block |
||
1276 | 1274 | |
1277 | 1275 | continue; |
1278 | 1276 | } |
1279 | - |
|
1280 | 1277 | else |
1281 | 1278 | { |
1282 | 1279 | $fh = @fopen($path . '/index.php', 'w'); |
@@ -1303,7 +1300,6 @@ discard block |
||
1303 | 1300 | ?' . '>'); |
1304 | 1301 | fclose($fh); |
1305 | 1302 | } |
1306 | - |
|
1307 | 1303 | else |
1308 | 1304 | $errors[] = 'index-php_cannot_create_file'; |
1309 | 1305 | } |
@@ -1517,7 +1513,8 @@ discard block |
||
1517 | 1513 | { |
1518 | 1514 | $hostname = strtolower(trim($hostname)); |
1519 | 1515 | $count = substr_count($hostname, '.'); |
1520 | - if($count === 2){ |
|
1516 | + if($count === 2) |
|
1517 | + { |
|
1521 | 1518 | if(strlen(explode('.', $hostname)[1]) > 3) |
1522 | 1519 | $hostname = explode('.', $hostname, 2)[1]; |
1523 | 1520 | } |