From c37c8df207ac1e856a271746f5ce985dee2cdc1e Mon Sep 17 00:00:00 2001
From: Matthieu Marcillaud <marcimat@rezo.net>
Date: Mon, 27 Sep 2010 18:46:17 +0000
Subject: [PATCH] =?UTF-8?q?D=C3=A9but=20de=20la=20sortie=20des=20br=C3=A8v?=
 =?UTF-8?q?es=20du=20core...=20(Boucles,=20Descriptions=20de=20tables=20et?=
 =?UTF-8?q?=20boutons)=20(http://zone.spip.org/trac/spip-zone/changeset/41?=
 =?UTF-8?q?281)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ecrire/base/serial.php       | 24 ------------------------
 ecrire/core.xml              | 11 +----------
 ecrire/inc/config.php        |  1 -
 ecrire/public/boucles.php    | 20 --------------------
 ecrire/public/interfaces.php | 11 -----------
 5 files changed, 1 insertion(+), 66 deletions(-)

diff --git a/ecrire/base/serial.php b/ecrire/base/serial.php
index 3143a6d4d8..2b67bf12da 100644
--- a/ecrire/base/serial.php
+++ b/ecrire/base/serial.php
@@ -95,28 +95,6 @@ $spip_auteurs_join = array(
 		"login"=>"login");
 
 
-$spip_breves = array(
-		"id_breve"	=> "bigint(21) NOT NULL",
-		"date_heure"	=> "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
-		"titre"	=> "text DEFAULT '' NOT NULL",
-		"texte"	=> "longtext DEFAULT '' NOT NULL",
-		"lien_titre"	=> "text DEFAULT '' NOT NULL",
-		"lien_url"	=> "text DEFAULT '' NOT NULL",
-		"statut"	=> "varchar(6)  DEFAULT '0' NOT NULL",
-		"id_rubrique"	=> "bigint(21) DEFAULT '0' NOT NULL",
-		"lang"	=> "VARCHAR(10) DEFAULT '' NOT NULL",
-		"langue_choisie"	=> "VARCHAR(3) DEFAULT 'non'",
-		"maj"	=> "TIMESTAMP");
-
-$spip_breves_key = array(
-		"PRIMARY KEY"	=> "id_breve",
-		"KEY id_rubrique"	=> "id_rubrique",
-#		"KEY url_propre"	=> "url_propre"
-);
-$spip_breves_join = array(
-		"id_breve"=>"id_breve",
-		"id_rubrique"=>"id_rubrique");
-
 $spip_messages = array(
 		"id_message"	=> "bigint(21) NOT NULL",
 		"titre"	=> "text DEFAULT '' NOT NULL",
@@ -202,8 +180,6 @@ $tables_principales['spip_articles'] =
 	array('field' => &$spip_articles, 'key' => &$spip_articles_key, 'join' => &$spip_articles_join);
 $tables_principales['spip_auteurs']  =
 	array('field' => &$spip_auteurs, 'key' => &$spip_auteurs_key,'join' => &$spip_auteurs_join);
-$tables_principales['spip_breves']   =
-	array('field' => &$spip_breves, 'key' => &$spip_breves_key,'join' => &$spip_breves_join);
 $tables_principales['spip_messages'] =
 	array('field' => &$spip_messages, 'key' => &$spip_messages_key);
 $tables_principales['spip_rubriques'] =
diff --git a/ecrire/core.xml b/ecrire/core.xml
index 0ce2843df7..656d4c389a 100644
--- a/ecrire/core.xml
+++ b/ecrire/core.xml
@@ -24,10 +24,7 @@
 		<titre>info_rubriques</titre>		
 		<url>naviguer</url>
 	</bouton>
-	<bouton id='breves' parent="bando_edition">
-		<icone>images/breve-16.png</icone>
-		<titre>icone_breves</titre>
-	</bouton>
+
 	<bouton id='sites' parent="bando_edition">
 		<icone>images/site-16.png</icone>
 		<titre>icone_sites_references</titre>
@@ -168,12 +165,6 @@
 		<url>sites_edit</url>
 		<args>new=oui&amp;id_rubrique=@id_rubrique@</args>
 	</bouton>
-	<bouton id='breve_creer' parent="outils_rapides">
-		<icone>images/breve-new-16.png</icone>
-		<titre>icone_nouvelle_breve</titre>
-		<url>breves_edit</url>
-		<args>new=oui&amp;id_rubrique=@id_rubrique@</args>
-	</bouton>
 
 	<onglet id='infos_perso' parent="infos_perso">
 		<icone>images/infos_perso-24.png</icone>
diff --git a/ecrire/inc/config.php b/ecrire/inc/config.php
index 5411e90f1c..c05a0537fd 100644
--- a/ecrire/inc/config.php
+++ b/ecrire/inc/config.php
@@ -346,7 +346,6 @@ function liste_metas()
 		'nom_site' => _T('info_mon_site_spip'),
 		'adresse_site' => preg_replace(",/$,", "", url_de_base()),
 		'descriptif_site' => '',
-		'activer_breves' => 'non',
 		'activer_logos' => 'oui',
 		'activer_logos_survol' => 'non',
 		'articles_surtitre' => 'non',
diff --git a/ecrire/public/boucles.php b/ecrire/public/boucles.php
index cc8f5ce53a..a886dfd53f 100644
--- a/ecrire/public/boucles.php
+++ b/ecrire/public/boucles.php
@@ -87,26 +87,6 @@ function boucle_AUTEURS_dist($id_boucle, &$boucles) {
 	return calculer_boucle($id_boucle, $boucles); 
 }
 
-//
-// <BOUCLE(BREVES)>
-//
-// http://doc.spip.org/@boucle_BREVES_dist
-function boucle_BREVES_dist($id_boucle, &$boucles) {
-	$boucle = &$boucles[$id_boucle];
-	$id_table = $boucle->id_table;
-	$mstatut = $id_table .'.statut';
-
-	// Restreindre aux elements publies
-	if (!isset($boucle->modificateur['criteres']['statut'])) {
-		if (!$GLOBALS['var_preview'])
-			array_unshift($boucle->where,array("'='", "'$mstatut'", "'\\'publie\\''"));
-		else
-			array_unshift($boucle->where,array("'IN'", "'$mstatut'", "'(\\'publie\\',\\'prop\\')'"));
-	}
-
-	return calculer_boucle($id_boucle, $boucles); 
-}
-
 
 //
 // <BOUCLE(DOCUMENTS)>
diff --git a/ecrire/public/interfaces.php b/ecrire/public/interfaces.php
index 1558191f17..f282317339 100644
--- a/ecrire/public/interfaces.php
+++ b/ecrire/public/interfaces.php
@@ -182,17 +182,12 @@ function declarer_interfaces(){
 
 $table_des_tables['articles']='articles';
 $table_des_tables['auteurs']='auteurs';
-$table_des_tables['breves']='breves';
 $table_des_tables['documents']='documents';
 $table_des_tables['types_documents']='types_documents';
 $table_des_tables['rubriques']='rubriques';
 $table_des_tables['hierarchie']='rubriques';
 $table_des_tables['messages']='messages';
 
-$exceptions_des_tables['breves']['id_secteur']='id_rubrique';
-$exceptions_des_tables['breves']['date']='date_heure';
-$exceptions_des_tables['breves']['nom_site']='lien_titre';
-$exceptions_des_tables['breves']['url_site']='lien_url';
 
 $exceptions_des_tables['documents']['type_document']=array('types_documents'
 , 'titre');
@@ -201,7 +196,6 @@ $exceptions_des_tables['documents']['mime_type']=array('types_documents'
 , 'mime_type');
 
 
-$table_titre['breves']= 'titre , lang';
 $table_titre['articles']= 'titre, lang';
 $table_titre['rubriques']= 'titre, lang';
 $table_titre['messages']= "titre, '' AS lang";
@@ -210,7 +204,6 @@ $table_titre['documents']= "titre, fichier AS surnom, '' AS lang";
 
 $table_date['articles']='date';
 $table_date['auteurs']='date';
-$table_date['breves']='date_heure';
 $table_date['documents']='date';
 $table_date['types_documents']='date';
 $table_date['rubriques']='date';
@@ -226,8 +219,6 @@ $tables_jointures['spip_articles'][]= 'documents_liens';
 
 $tables_jointures['spip_auteurs'][]= 'auteurs_articles';
 
-$tables_jointures['spip_breves'][]= 'documents_liens';
-
 $tables_jointures['spip_documents'][]= 'documents_liens';
 $tables_jointures['spip_documents'][]= 'types_documents';
 
@@ -253,8 +244,6 @@ $table_des_traitements['DATE_NOUVEAUTES'][]= 'normaliser_date(%s)';
 $table_des_traitements['DESCRIPTIF'][]= _TRAITEMENT_RACCOURCIS;
 $table_des_traitements['FICHIER']['documents']= 'get_spip_doc(%s)';
 $table_des_traitements['INTRODUCTION'][]= 'PtoBR('. _TRAITEMENT_RACCOURCIS .')';
-$table_des_traitements['LIEN_TITRE'][]= _TRAITEMENT_TYPO;
-$table_des_traitements['LIEN_URL'][]= 'vider_url(%s)';
 $table_des_traitements['MESSAGE'][]= _TRAITEMENT_RACCOURCIS;
 $table_des_traitements['NOM_SITE_SPIP'][]= _TRAITEMENT_TYPO;
 $table_des_traitements['NOM'][]= _TRAITEMENT_TYPO;
-- 
GitLab