Skip to content
Extraits de code Groupes Projets
Valider ca302ba5 rédigé par esj's avatar esj
Parcourir les fichiers

confusion entre generer_url_ecrire/public dans certains endroits (pas toujours...

confusion entre generer_url_ecrire/public dans certains endroits (pas toujours un pb, mais incompatible avec la genericite visee a terme)
parent a6bc227b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -149,11 +149,8 @@ function creer_repertoire($base, $subdir) { ...@@ -149,11 +149,8 @@ function creer_repertoire($base, $subdir) {
include("$path/.test"); include("$path/.test");
@unlink("$path/.test"); @unlink("$path/.test");
} }
if (!$ok) { if ($ok) return "$subdir/";
redirige_par_entete(generer_url_ecrire("spip_test_dirs","")); redirige_par_entete(generer_url_public('spip_test_dirs'));
}
return ($ok? "$subdir/" : '');
} }
?> ?>
...@@ -90,7 +90,7 @@ function deplacer_fichier_upload($source, $dest) { ...@@ -90,7 +90,7 @@ function deplacer_fichier_upload($source, $dest) {
if ($f) { if ($f) {
fclose ($f); fclose ($f);
} else { } else {
redirige_par_entete(generer_url_ecrire("spip_test_dirs"), redirige_par_entete(generer_url_public('spip_test_dirs'),
"?test_dir=". dirname($dest)); "?test_dir=". dirname($dest));
} }
@unlink($dest); @unlink($dest);
...@@ -464,7 +464,7 @@ function examiner_les_fichiers($files, $mode, $type, $id, $id_document, $hash, $ ...@@ -464,7 +464,7 @@ function examiner_les_fichiers($files, $mode, $type, $id, $id_document, $hash, $
'chemin' => $zip, 'chemin' => $zip,
'doc' => $mode, 'doc' => $mode,
'type' => $type), 'type' => $type),
generer_url_ecrire("spip_image","id_article=$id")); generer_url_public('spip_image',"id_article=$id"));
// a tout de suite en joindre5 ou joindre6 // a tout de suite en joindre5 ou joindre6
exit; exit;
} }
......
...@@ -167,7 +167,7 @@ function extrait_article($row) { ...@@ -167,7 +167,7 @@ function extrait_article($row) {
include_ecrire("inc_texte"); include_ecrire("inc_texte");
$adresse_site = $GLOBALS['meta']["adresse_site"]; $adresse_site = $GLOBALS['meta']["adresse_site"];
$id_article = $row[0]; $id_article = $row[0];
$titre = $row[2]; $titre = $row[2];
$chapo = $row[6]; $chapo = $row[6];
...@@ -192,7 +192,7 @@ function extrait_article($row) { ...@@ -192,7 +192,7 @@ function extrait_article($row) {
$extrait .= "\n\n".textebrut(propre(couper_intro("$chapo<p>$texte", 700)))."\n\n"; $extrait .= "\n\n".textebrut(propre(couper_intro("$chapo<p>$texte", 700)))."\n\n";
if ($statut == 'publie') if ($statut == 'publie')
$extrait .= "-> ". $extrait .= "-> ".
generer_url_ecrire($adresse_site."/spip_redirect", "id_article=$id_article") . generer_url_public('spip_redirect', "id_article=$id_article") .
"\n\n"; "\n\n";
return $extrait; return $extrait;
} }
......
...@@ -63,8 +63,7 @@ function ajouter_session($auteur, $id_session) { ...@@ -63,8 +63,7 @@ function ajouter_session($auteur, $id_session) {
fputs($f, $texte); fputs($f, $texte);
fclose($f); fclose($f);
} else { } else {
redirige_par_entete(generer_url_ecrire($GLOBALS['meta']["adresse_site"] . redirige_par_entete(generer_url_public('spip_test_dirs'));
"/spip_test_dirs"));
} }
} }
...@@ -215,7 +214,7 @@ function ask_php_auth($pb, $raison, $retour, $url='', $re='', $lien='') { ...@@ -215,7 +214,7 @@ function ask_php_auth($pb, $raison, $retour, $url='', $re='', $lien='') {
@Header("HTTP/1.0 401 Unauthorized"); @Header("HTTP/1.0 401 Unauthorized");
echo "<b>$pb</b><p>$raison</p>[<a href='./'>$retour</a>] "; echo "<b>$pb</b><p>$raison</p>[<a href='./'>$retour</a>] ";
if ($url) { if ($url) {
echo "[<a href='", generer_url_ecrire('spip_cookie',"essai_auth_http=oui&$url"), "'>$re</a>]"; echo "[<a href='", generer_url_public('spip_cookie',"essai_auth_http=oui&$url"), "'>$re</a>]";
} }
if ($lien) if ($lien)
......
...@@ -86,10 +86,10 @@ function controle_signatures($script, $id, $debut, $where, $order, $limit=10) { ...@@ -86,10 +86,10 @@ function controle_signatures($script, $id, $debut, $where, $order, $limit=10) {
$id_article, $id_article,
" </b></span>"; " </b></span>";
echo "<a href='", generer_url_ecrire((($statut == 'publie') ? echo "<a href='",
"../spip_redirect" : (($statut == 'publie') ?
"articles"), generer_url_public('spip_redirect', "id_article=$id_article") :
"id_article=$id_article"), generer_url_ecrire('articles', "id_article=$id_article")),
"'>", "'>",
typo($titre), typo($titre),
"</a>"; "</a>";
......
...@@ -17,20 +17,19 @@ include_ecrire("inc_urls"); ...@@ -17,20 +17,19 @@ include_ecrire("inc_urls");
include_ecrire("inc_acces"); // pour low_sec (iCal) include_ecrire("inc_acces"); // pour low_sec (iCal)
function afficher_liens_calendrier($lien, $args, $icone, $texte) { function afficher_liens_calendrier($lien, $args, $icone, $texte) {
$adresse_site=$GLOBALS['meta']["adresse_site"];
echo debut_cadre_enfonce($icone); echo debut_cadre_enfonce($icone);
echo $texte; echo $texte;
echo "<table style='width: 100%;><tr'><td style='width: 200px;'>"; echo "<table style='width: 100%;><tr'><td style='width: 200px;'>";
icone_horizontale (_T('ical_methode_http'), icone_horizontale (_T('ical_methode_http'),
generer_url_ecrire("$adresse_site/$lien", $args), generer_url_public($lien, $args),
"calendrier-24.gif"); "calendrier-24.gif");
echo "</td>"; echo "</td>";
echo "<td> &nbsp; </td>"; echo "<td> &nbsp; </td>";
echo "<td style='width: 200px;'>"; echo "<td style='width: 200px;'>";
$webcal = ereg_replace("https?://", "webcal://", $adresse_site); icone_horizontale (_T('ical_methode_webcal'),
icone_horizontale (_T('ical_methode_webcal'), ereg_replace("https?://", "webcal://", generer_url_public($lien, $args)),
generer_url_ecrire("$webcal/$lien", $args), "calendrier-24.gif");
"calendrier-24.gif");
echo "</td></tr></table>"; echo "</td></tr></table>";
echo fin_cadre_enfonce(); echo fin_cadre_enfonce();
} }
...@@ -116,8 +115,7 @@ echo _T('ical_texte_rss'); ...@@ -116,8 +115,7 @@ echo _T('ical_texte_rss');
echo "<p>"._T("ical_texte_rss_articles")."</p>"; echo "<p>"._T("ical_texte_rss_articles")."</p>";
echo propre("<ul><cadre>".generer_url_ecrire($adresse_site."/backend") . echo propre("<ul><cadre>" . generer_url_public('backend') . "</cadre></ul>");
"</cadre></ul>");
echo "<p>"._T("ical_texte_rss_articles2")."</p>"; echo "<p>"._T("ical_texte_rss_articles2")."</p>";
...@@ -133,7 +131,7 @@ echo "<p>"._T("ical_texte_rss_articles2")."</p>"; ...@@ -133,7 +131,7 @@ echo "<p>"._T("ical_texte_rss_articles2")."</p>";
$titre_rubrique = typo($row['titre']); $titre_rubrique = typo($row['titre']);
$titre = htmlspecialchars($titre_rubrique); $titre = htmlspecialchars($titre_rubrique);
echo "<li>", http_href(generer_url_ecrire($adresse_site."/backend", "id_rubrique=$id_rubrique"), echo "<li>", http_href( generer_url_public('backend', "id_rubrique=$id_rubrique"),
'<span class="rss-button">RSS</span>&nbsp; ' . $titre_rubrique, '<span class="rss-button">RSS</span>&nbsp; ' . $titre_rubrique,
$titre), $titre),
"</li>\n"; "</li>\n";
...@@ -147,7 +145,7 @@ echo "<p>"._T("ical_texte_rss_articles2")."</p>"; ...@@ -147,7 +145,7 @@ echo "<p>"._T("ical_texte_rss_articles2")."</p>";
if ($activer_breves == "oui") { if ($activer_breves == "oui") {
echo "<p>"._T("ical_texte_rss_breves")."</p>"; echo "<p>"._T("ical_texte_rss_breves")."</p>";
echo propre('<ul><cadre>'.generer_url_ecrire($adresse_site."/backend-breves"). "</cadre></ul>"); echo propre('<ul><cadre>' . generer_url_ecrire('backend-breves'). "</cadre></ul>");
} }
...@@ -164,7 +162,7 @@ debut_cadre_relief("doc-24.gif", false, "", _T('ical_titre_js')); ...@@ -164,7 +162,7 @@ debut_cadre_relief("doc-24.gif", false, "", _T('ical_titre_js'));
echo _T('ical_texte_js').'<p />'; echo _T('ical_texte_js').'<p />';
echo propre('<cadre><script type="text/javascript" src="'. echo propre('<cadre><script type="text/javascript" src="'.
generer_url_ecrire($adresse_site."/distrib") . generer_url_ecrire('distrib') .
'"></script></cadre>'); '"></script></cadre>');
fin_cadre_relief(); fin_cadre_relief();
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter