Merge branch '961_Error_al_cambiar_ruta_de_pandora_v7' into 'develop'

fixed errors in errors login

See merge request !547
This commit is contained in:
vgilc 2017-06-02 09:19:35 +02:00
commit 6ad0dde2b7
1 changed files with 5 additions and 16 deletions

View File

@ -114,23 +114,12 @@ require_once ($ownDir . 'functions.php');
// If not we will get ugly warnings. Set Europe/Madrid by default
// Later will be replaced by the good one.
if (!defined('METACONSOLE')) {
if(!isset($config["homeurl"])){
$url = explode('/', $_SERVER['REQUEST_URI']);
$config["homeurl"] = $url[1];
$config["homeurl_static"] = $url[1];
$config["error"] = "homeurl_bad_defined";
return;
}
else{
$url = explode('/', $_SERVER['REQUEST_URI']);
if($config["homeurl"] != '/'.$url[1]){
$config["homeurl"] = '/'.$url[1];
$config["homeurl_static"] = '/'.$url[1];
$config["error"] = "homeurl_bad_defined";
return;
}
}
$url = explode('/', $_SERVER['REQUEST_URI']);
array_pop($url);
$config["homeurl"] = rtrim(join("/", $url),"/");
$config["homeurl_static"] = $config["homeurl"];
}
if (!isset($config["homeurl_static"])) {
$config["homeurl_static"] = $config["homeurl"];
}