From 7ab77d28d6b7ec2a9b10ebff9ee23ec148bd1c15 Mon Sep 17 00:00:00 2001 From: Fil <fil@rezo.net> Date: Fri, 27 May 2005 19:27:54 +0000 Subject: [PATCH] =?UTF-8?q?s=C3=A9paration=20de=20"calcul"=20et=20"recalcu?= =?UTF-8?q?l"=20de=20la=20page=20:=20ainsi=20quand=20on=20fait=20"voir=20e?= =?UTF-8?q?n=20ligne"=20depuis=20l'espace=20priv=C3=A9=20on=20ne=20recompi?= =?UTF-8?q?le=20pas=20les=20squelettes=20;=20le=20bouton=20"recalcul",=20l?= =?UTF-8?q?ui,=20recompile=20comme=20avant.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecrire/inc_presentation.php3 | 12 ++++++------ ecrire/sites.php3 | 14 +++++++------- inc-calcul.php3 | 3 ++- spip_redirect.php3 | 3 +-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/ecrire/inc_presentation.php3 b/ecrire/inc_presentation.php3 index 7facce5dcb..9c3adb8d93 100644 --- a/ecrire/inc_presentation.php3 +++ b/ecrire/inc_presentation.php3 @@ -3103,14 +3103,14 @@ function voir_en_ligne ($type, $id, $statut=false, $image='racine-24.gif') { FROM spip_articles WHERE id_article=$id AND date<=NOW()"))) $statut = 'prop'; if ($statut == 'publie') - $en_ligne = 'recalcul'; + $en_ligne = 'calcul'; else if ($statut == 'prop') $en_ligne = 'preview'; break; case 'rubrique': if ($id > 0) if ($statut == 'publie') - $en_ligne = 'recalcul'; + $en_ligne = 'calcul'; else $en_ligne = 'preview'; break; @@ -3118,16 +3118,16 @@ function voir_en_ligne ($type, $id, $statut=false, $image='racine-24.gif') { case 'auteur': case 'site': if ($statut == 'publie') - $en_ligne = 'recalcul'; + $en_ligne = 'calcul'; else if ($statut == 'prop') $en_ligne = 'preview'; break; case 'mot': - $en_ligne = 'recalcul'; + $en_ligne = 'calcul'; break; } - if ($en_ligne == 'recalcul') + if ($en_ligne == 'calcul') $message = _T('icone_voir_en_ligne'); else if ($en_ligne == 'preview') { // est-ce autorise ? @@ -3139,7 +3139,7 @@ function voir_en_ligne ($type, $id, $statut=false, $image='racine-24.gif') { } if ($message) - icone_horizontale($message, "../spip_redirect.php3?id_$type=$id&$en_ligne=oui", $image, "rien.gif"); + icone_horizontale($message, "../spip_redirect.php3?id_$type=$id&var_mode=$en_ligne", $image, "rien.gif"); } diff --git a/ecrire/sites.php3 b/ecrire/sites.php3 index b8d63b040c..bd00809a28 100644 --- a/ecrire/sites.php3 +++ b/ecrire/sites.php3 @@ -137,7 +137,7 @@ if ($nom_site AND $modifier_site == 'oui' AND $flag_editable) { $result = spip_query($query); if ($syndication_old != $syndication OR $url_syndic != $old_syndic) { - $recalcul = "oui"; + $reload = "oui"; } if ($syndication_old != $syndication AND $syndication == "non") { spip_query("DELETE FROM spip_syndic_articles WHERE id_syndic='$id_syndic'"); @@ -158,7 +158,7 @@ if ($nom_site AND $modifier_site == 'oui' AND $flag_editable) { $link = new Link('sites.php3'); $link->addVar('id_syndic'); $link->addVar('redirect'); - $link->addVar('recalcul', $recalcul); + $link->addVar('reload', $reload); $redirect = $link->getUrl(); $redirect_ok = 'oui'; } @@ -180,9 +180,9 @@ if ($redirect AND $redirect_ok == 'oui') { // -// recalcul +// reload // -if ($recalcul == "oui") { +if ($reload == "oui") { $result = spip_query ("SELECT * FROM spip_syndic WHERE id_syndic='$id_syndic' AND syndication IN ('oui', 'sus', 'off')"); if ($result AND spip_num_rows($result)>0) $erreur_syndic = syndic_a_jour ($id_syndic); @@ -367,7 +367,7 @@ if ($syndication == "oui" OR $syndication == "off" OR $syndication == "sus") { debut_boite_info(); echo _T('avis_site_syndique_probleme', array('url_syndic' => $url_syndic)); echo "<center><b>"; - echo "<a href='sites.php3?id_syndic=$id_syndic&recalcul=oui'>"; + echo "<a href='sites.php3?id_syndic=$id_syndic&reload=oui'>"; echo _T('lien_nouvelle_recuperation')."</a></b></center>\n"; fin_boite_info(); } @@ -379,7 +379,7 @@ if ($syndication == "oui" OR $syndication == "off" OR $syndication == "sus") { // afficher la date de dernier acces a la syndication if ($date_syndic) echo "<p><div align='left'>"._T('info_derniere_syndication').' '.affdate_heure($date_syndic) - .".</div><div align='right'><a href='sites.php3?id_syndic=$id_syndic&recalcul=oui'>"._T('lien_mise_a_jour_syndication')."</a></div>\n"; + .".</div><div align='right'><a href='sites.php3?id_syndic=$id_syndic&reload=oui'>"._T('lien_mise_a_jour_syndication')."</a></div>\n"; // modifier la moderation if ($flag_administrable && $options=='avancees') { @@ -423,7 +423,7 @@ else if (preg_match(',^select: (.*),', $url_syndic, $regs)) { echo "</select>\n"; echo aide("rubsyn"); echo '<input type="hidden" name="modifier_site" value="oui" />'; - echo '<input type="hidden" name="recalcul" value="oui" />'; + echo '<input type="hidden" name="reload" value="oui" />'; echo "<div align='$spip_lang_right'><input type='submit' name='Valider' value='"._T('bouton_valider')."' class='fondo'></div>\n"; echo fin_cadre_relief(); echo "</div></form>\n"; diff --git a/inc-calcul.php3 b/inc-calcul.php3 index c1d26000ec..c26b68f730 100644 --- a/inc-calcul.php3 +++ b/inc-calcul.php3 @@ -45,7 +45,8 @@ else // Le squelette compile est-il trop vieux ? function squelette_obsolete($skel, $squelette) { return ( - $GLOBALS['var_mode'] + $GLOBALS['var_mode'] == 'recalcul' + OR $GLOBALS['var_mode'] == 'preview' OR !@file_exists($skel) OR (@filemtime($squelette) > ($date = @filemtime($skel))) OR (@filemtime('mes_fonctions.php3') > $date) diff --git a/spip_redirect.php3 b/spip_redirect.php3 index 9c885375b1..c276bbdeec 100644 --- a/spip_redirect.php3 +++ b/spip_redirect.php3 @@ -54,8 +54,7 @@ if (strpos($url,'?')) { else { $super='?'; } -if ($recalcul) $url .= $super."var_mode=recalcul"; -else if ($preview) $url .= $super."var_mode=preview"; +$url .= $super."var_mode=$var_mode"; // Ne pas masquer cette eventuelle erreur (aide a detecter des lignes vides // dans inc-urls.php3 ou mes_fonctions/mes_options) -- GitLab