Skip to content
Extraits de code Groupes Projets
Valider 7ab77d28 rédigé par Fil's avatar Fil
Parcourir les fichiers

séparation de "calcul" et "recalcul" de la page : ainsi quand on fait "voir en...

séparation de "calcul" et "recalcul" de la page : ainsi quand on fait "voir en ligne" depuis l'espace privé on ne recompile pas les squelettes ; le bouton "recalcul", lui, recompile comme avant.
parent 9452e9d6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -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");
}
......
......@@ -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";
......
......@@ -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)
......
......@@ -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)
......
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