|
@@ -148,17 +148,17 @@ if (!api_get_user_id()) {
|
|
|
}
|
|
|
|
|
|
$home = 'home/';
|
|
|
-if ($_configuration['multiple_access_urls']) {
|
|
|
- $access_url_id = api_get_current_access_url_id();
|
|
|
- if ($access_url_id != -1){
|
|
|
- $url_info = api_get_access_url($access_url_id);
|
|
|
- $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $url_info['url']));
|
|
|
- $clean_url = replace_dangerous_char($url);
|
|
|
- $clean_url = str_replace('/', '-', $clean_url);
|
|
|
- $clean_url .= '/';
|
|
|
- $home_old = 'home/';
|
|
|
- $home = 'home/'.$clean_url;
|
|
|
- }
|
|
|
+if (api_get_multiple_access_url()) {
|
|
|
+ $access_url_id = api_get_current_access_url_id();
|
|
|
+ $url_info = api_get_access_url($access_url_id);
|
|
|
+ $url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $url_info['url']));
|
|
|
+ $clean_url = replace_dangerous_char($url);
|
|
|
+ $clean_url = str_replace('/', '-', $clean_url);
|
|
|
+ $clean_url .= '/';
|
|
|
+ $home_old = 'home/';
|
|
|
+ // if $clean_url == "localhost/" means that the multiple URL was not well configured we don't rename the $home variable
|
|
|
+ if ($clean_url != 'localhost/')
|
|
|
+ $home = 'home/'.$clean_url;
|
|
|
}
|
|
|
|
|
|
// Including the page for the news
|