| @@ 393-404 (lines=12) @@ | ||
| 390 | } |
|
| 391 | ||
| 392 | $home = api_get_path(SYS_APP_PATH).'home/'; |
|
| 393 | if (api_is_multiple_url_enabled()) { |
|
| 394 | $access_url_id = api_get_current_access_url_id(); |
|
| 395 | if ($access_url_id != -1) { |
|
| 396 | $url_info = api_get_access_url($access_url_id); |
|
| 397 | $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $url_info['url'])); |
|
| 398 | $clean_url = api_replace_dangerous_char($url); |
|
| 399 | $clean_url = str_replace('/', '-', $clean_url); |
|
| 400 | $clean_url .= '/'; |
|
| 401 | $home_old = api_get_path(SYS_APP_PATH).'home/'; |
|
| 402 | $home = api_get_path(SYS_APP_PATH).'home/'.$clean_url; |
|
| 403 | } |
|
| 404 | } |
|
| 405 | ||
| 406 | if (file_exists($home.'register_top_'.$user_selected_language.'.html')) { |
|
| 407 | $home_top_temp = @(string)file_get_contents($home.'register_top_'.$user_selected_language.'.html'); |
|
| @@ 399-413 (lines=15) @@ | ||
| 396 | // Preparing home folder for multiple urls |
|
| 397 | if (api_get_multiple_access_url()) { |
|
| 398 | $access_url_id = api_get_current_access_url_id(); |
|
| 399 | if ($access_url_id != -1) { |
|
| 400 | // If not a dead URL |
|
| 401 | $urlInfo = api_get_access_url($access_url_id); |
|
| 402 | $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url'])); |
|
| 403 | $cleanUrl = api_replace_dangerous_char($url); |
|
| 404 | $cleanUrl = str_replace('/', '-', $cleanUrl); |
|
| 405 | $cleanUrl .= '/'; |
|
| 406 | $homepath = api_get_path(SYS_APP_PATH).'home/'.$cleanUrl; //homep for Home Path |
|
| 407 | ||
| 408 | //we create the new dir for the new sites |
|
| 409 | if (!is_dir($homepath)) { |
|
| 410 | mkdir($homepath, api_get_permissions_for_new_directories()); |
|
| 411 | } |
|
| 412 | } |
|
| 413 | } else { |
|
| 414 | $homepath = api_get_path(SYS_APP_PATH).'home/'; |
|
| 415 | } |
|
| 416 | $ext = '.html'; |
|