Fix URL to get extra content - refs BT#9325

1.9.x
Angel Fernando Quiroz Campos 10 years ago
parent 14eccc0c77
commit 9808bfe95f
  1. 2
      main/admin/index.php
  2. 5
      main/inc/ajax/admin.ajax.php

@ -32,7 +32,7 @@ if (api_is_multiple_url_enabled()) {
if ($accessUrlId != -1) {
$urlInfo = api_get_access_url($accessUrlId);
$url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url']));
$cleanUrl = str_replace('/', '-', $cleanUrl);
$cleanUrl = str_replace('/', '-', $url);
$adminExtraContentDir = api_get_path(SYS_PATH) . "home/$cleanUrl/admin/";
}

@ -53,8 +53,7 @@ switch ($action) {
$urlInfo = api_get_access_url($accessUrlId);
$url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url']));
$cleanUrl = replace_dangerous_char($url);
$cleanUrl = str_replace('/', '-', $cleanUrl);
$cleanUrl = str_replace('/', '-', $url);
$newUrlDir = api_get_path(SYS_PATH) . "home/$cleanUrl/admin/";
} else {
@ -93,7 +92,7 @@ switch ($action) {
$urlInfo = api_get_access_url($accessUrlId);
$url = api_remove_trailing_slash(preg_replace('/https?:\/\//i', '', $urlInfo['url']));
$cleanUrl = str_replace('/', '-', $cleanUrl);
$cleanUrl = str_replace('/', '-', $url);
$newUrlDir = api_get_path(SYS_PATH) . "home/$cleanUrl/admin/";
} else {

Loading…
Cancel
Save