dépôts
/
ptitvelo
/
web
/
www.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[SPIP] ~maj 3.0.13 -> 3.0.14
[ptitvelo/web/www.git]
/
www
/
ecrire
/
inc
/
headers.php
diff --git
a/www/ecrire/inc/headers.php
b/www/ecrire/inc/headers.php
index
efd818e
..
b237baa
100644
(file)
--- a/
www/ecrire/inc/headers.php
+++ b/
www/ecrire/inc/headers.php
@@
-3,7
+3,7
@@
/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-201
2
*
+ * Copyright (c) 2001-201
4
*
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
@@
-20,7
+20,7
@@
if (!defined('_ECRIRE_INC_VERSION')) return;
function redirige_par_entete($url, $equiv='', $status = 302) {
if (!in_array($status,array(301,302)))
$status = 302;
function redirige_par_entete($url, $equiv='', $status = 302) {
if (!in_array($status,array(301,302)))
$status = 302;
-
+
$url = trim(strtr($url, "\n\r", " "));
# en theorie on devrait faire ca tout le temps, mais quand la chaine
# commence par ? c'est imperatif, sinon l'url finale n'est pas la bonne
$url = trim(strtr($url, "\n\r", " "));
# en theorie on devrait faire ca tout le temps, mais quand la chaine
# commence par ? c'est imperatif, sinon l'url finale n'est pas la bonne
@@
-28,6
+28,12
@@
function redirige_par_entete($url, $equiv='', $status = 302) {
$url = url_de_base().$url;
if ($url[0]=='#')
$url = self('&').$url;
$url = url_de_base().$url;
if ($url[0]=='#')
$url = self('&').$url;
+ # si profondeur non nulle et url relative, il faut la passer en absolue
+ if ($GLOBALS['profondeur_url']>(_DIR_RESTREINT?1:2)
+ AND !preg_match(",^(\w+:)?//,",$url)){
+ include_spip("inc/filtres_mini");
+ $url = url_absolue($url);
+ }
if ($x = _request('transformer_xml'))
$url = parametre_url($url, 'transformer_xml', $x, '&');
if ($x = _request('transformer_xml'))
$url = parametre_url($url, 'transformer_xml', $x, '&');