Update of /home/spip-cvs/spip/ecrire
In directory alan:/tmp/cvs-serv27608/ecrire
Modified Files:
articles.php3 articles_versions.php3 config-fonctions.php3
inc_config.php3 inc_version.php3
Log Message:
configuration et interface de "gestion des révisions"
Index: config-fonctions.php3
RCS file: /home/spip-cvs/spip/ecrire/config-fonctions.php3,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- config-fonctions.php3 21 Apr 2004 21:05:00 -0000 1.63
+++ config-fonctions.php3 3 Jul 2004 11:54:33 -0000 1.64
@@ -250,6 +250,43 @@
}
+//
+// Gestion des revisions des articles
+//
+
+if ($options == "avancees") {
+ debut_cadre_relief("historique-24.gif");
+
+ $articles_versions = lire_meta("articles_versions");
+
+ echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=3 WIDTH=\"100%\">";
+ echo "<TR><TD BGCOLOR='$couleur_foncee' BACKGROUND='img_pack/rien.gif'><B><FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3 COLOR='#FFFFFF'>"._L('Suivi des révisions')."</FONT></B></TD></TR>";
+
+ echo "<TR><TD class='verdana2'>";
+ echo _L('Le suivi des révisions permet de conserver un historique de toutes les modifications apportées au contenu d\'un article, et d\'afficher les différences entre les versions successives.');
+ echo "</TD></TR>";
+
+ echo "<TR><TD ALIGN='center' class='verdana2'>";
+ afficher_choix('articles_versions', $articles_versions,
+ array('oui' => _L('Activer le suivi des révisions'),
+ 'non' => _L('Désactiver le suivi des révisions')));
+ echo "</TD></TR>\n";
+
+ if (!$flag_revisions) {
+ echo "<TR><TD ALIGN='center' class='verdana2'>";
+ echo "<i>"._L('La configuration de votre serveur ne permet pas d\'activer le suivi des révisions')."</i>";
+ echo "</TD></TR>\n";
+ }
+
+ echo "<TR><td style='text-align:$spip_lang_right;'>";
+ echo "<INPUT TYPE='submit' NAME='Valider' VALUE='"._T('bouton_valider')."' CLASS='fondo'>";
+ echo "</TD></TR>";
+ echo "</TABLE>\n";
+
+ fin_cadre_relief();
+
+ echo "<p>";
+}
Index: inc_config.php3
RCS file: /home/spip-cvs/spip/ecrire/inc_config.php3,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- inc_config.php3 26 May 2004 15:25:18 -0000 1.48
+++ inc_config.php3 3 Jul 2004 11:54:33 -0000 1.49
@@ -51,6 +51,7 @@
'forum_prive_admin' => 'non',
'activer_moteur' => 'oui',
+ 'articles_versions' => 'non',
'activer_statistiques' => 'oui',
'documents_article' => 'oui',
@@ -229,6 +230,7 @@
'forum_prive_admin',
'activer_moteur',
+ 'articles_versions',
'activer_statistiques',
'documents_article',
Index: articles_versions.php3
RCS file: /home/spip-cvs/spip/ecrire/articles_versions.php3,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- articles_versions.php3 3 Jul 2004 03:12:58 -0000 1.2
+++ articles_versions.php3 3 Jul 2004 11:54:33 -0000 1.3
@@ -20,6 +20,7 @@
$id_rubrique = $row["id_rubrique"];
$date = $row["date"];
$statut_article = $row["statut"];
+ $titre = typo($row["titre"]);
$maj = $row["maj"];
$date_redac = $row["date_redac"];
$visites = $row["visites"];
@@ -78,7 +79,7 @@
-debut_page("« $titre_article »", "documents", "articles");
+debut_page(_L('Révisions :')." « $titre »", "documents", "articles");
debut_grand_cadre();
Index: articles.php3
RCS file: /home/spip-cvs/spip/ecrire/articles.php3,v
retrieving revision 1.174
retrieving revision 1.175
diff -u -d -r1.174 -r1.175
--- articles.php3 3 Jul 2004 03:12:58 -0000 1.174
+++ articles.php3 3 Jul 2004 11:54:33 -0000 1.175
@@ -14,7 +14,7 @@
$articles_ps = lire_meta("articles_ps");
$articles_redac = lire_meta("articles_redac");
$articles_mots = lire_meta("articles_mots");
-$articles_versions = lire_meta("articles_versions");
+$articles_versions = (lire_meta("articles_versions")=='oui') && $flag_revisions;
if ($id_article==0) {
if ($new=='oui') {
@@ -260,7 +260,7 @@
// -- Experimental --
// Stockage des versions
- if ($articles_versions != 'non') {
+ if ($articles_versions) {
include_ecrire("inc_diff.php3");
ajouter_version($id_article, $champs_versions);
}
@@ -419,7 +419,7 @@
icone_horizontale(_T('icone_evolution_visites', array('visites' => $visites)), "statistiques_visites.php3?id_article=$id_article", "statistiques-24.gif","rien.gif");
}
-if ($articles_versions != 'non' AND $connect_statut == "0minirezo" AND $id_version>1) {
+if ($articles_versions AND $id_version>1) {
icone_horizontale(_L('Afficher les révisions...'), "articles_versions.php3?id_article=$id_article", "historique-24.gif", "rien.gif");
}
Index: inc_version.php3
RCS file: /home/spip-cvs/spip/ecrire/inc_version.php3,v
retrieving revision 1.315
retrieving revision 1.316
diff -u -d -r1.315 -r1.316
--- inc_version.php3 3 Jul 2004 03:14:49 -0000 1.315
+++ inc_version.php3 3 Jul 2004 11:54:33 -0000 1.316
@@ -233,7 +233,7 @@
$flag_strtotime = function_exists("strtotime");
$flag_gd = $flag_ImageGif || $flag_ImageJpeg || $flag_ImagePng;
-
+$flag_revisions = $flag_pcre; // a completer
//