Skip to content
Extraits de code Groupes Projets
Valider 3edf69fb rédigé par cerdic's avatar cerdic
Parcourir les fichiers

"report de [10405] :

un cas courant d'appel indirect de url_de_base() dans mes_options est la pose d'un cookie (de langue par exemple) via spip_setcookie
"
parent 0bb4cbee
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -746,7 +746,16 @@ function url_de_base() {
test_valeur_serveur($_SERVER['HTTPS']))
) ? 'https' : 'http';
# note : HTTP_HOST contient le :port si necessaire
$myself = $http.'://'.$server.$GLOBALS['REQUEST_URI'];
if (!$GLOBALS['REQUEST_URI']){
if (isset($_SERVER['REQUEST_URI'])) {
$GLOBALS['REQUEST_URI'] = $_SERVER['REQUEST_URI'];
} else {
$GLOBALS['REQUEST_URI'] = $_SERVER['PHP_SELF'];
if ($_SERVER['QUERY_STRING']
AND !strpos($_SERVER['REQUEST_URI'], '?'))
$GLOBALS['REQUEST_URI'] .= '?'.$_SERVER['QUERY_STRING'];
}
} $myself = $http.'://'.$server.$GLOBALS['REQUEST_URI'];
# supprimer la chaine de GET
list($myself) = explode('?', $myself);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter