[SPIP][PLUGINS] v3.0-->v3.2
[lhc/web/www.git] / www / plugins-dist / organiseur / base / organiseur.php
index 53e01c2..777bc9c 100644 (file)
@@ -10,7 +10,9 @@
  *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *
 \***************************************************************************/
 
-if (!defined('_ECRIRE_INC_VERSION')) return;
+if (!defined('_ECRIRE_INC_VERSION')) {
+       return;
+}
 
 
 /**
@@ -19,42 +21,44 @@ if (!defined('_ECRIRE_INC_VERSION')) return;
  * @param array $tables
  * @return array
  */
-function organiseur_declarer_tables_objets_sql($tables){
+function organiseur_declarer_tables_objets_sql($tables) {
 
-       $tables['spip_auteurs']['field']["imessage"] = "VARCHAR(3)";
-       $tables['spip_auteurs']['field']["messagerie"] = "VARCHAR(3)";
+       $tables['spip_auteurs']['field']['imessage'] = 'VARCHAR(3)';
+       $tables['spip_auteurs']['field']['messagerie'] = 'VARCHAR(3)';
 
        $tables['spip_messages'] = array(
-               'page'=> false,
+               'page' => false,
                'texte_modifier' => 'icone_modifier_message',
                'texte_creer' => 'icone_ecrire_nouveau_message',
                'texte_objets' => 'organiseur:messages',
                'texte_objet' => 'organiseur:message',
-               'info_aucun_objet'=> 'info_aucun_message',
+               'info_aucun_objet' => 'info_aucun_message',
                'info_1_objet' => 'info_1_message',
                'info_nb_objets' => 'info_nb_messages',
 
                'principale' => 'oui',
-               'champs_editables' => array('titre', 'texte', 'type','date_heure', 'date_fin', 'rv', 'id_auteur', 'destinataires'),
+               'champs_editables' => array(
+                       'titre', 'texte', 'type', 'date_heure', 'date_fin', 'rv', 'id_auteur', 'destinataires'
+               ),
                'field' => array(
-                       "id_message"    => "bigint(21) NOT NULL",
-                       "titre" => "text DEFAULT '' NOT NULL",
-                       "texte" => "longtext DEFAULT '' NOT NULL",
+                       'id_message' => 'bigint(21) NOT NULL',
+                       'titre' => "text DEFAULT '' NOT NULL",
+                       'texte' => "longtext DEFAULT '' NOT NULL",
                        // normal,
                        // pb (pense bete)
                        // affich (annonce publique)
-                       "type"  => "varchar(6) DEFAULT '' NOT NULL",
-                       "date_heure"    => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
-                       "date_fin"      => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
-                       "rv"    => "varchar(3) DEFAULT '' NOT NULL",
-                       "statut"        => "varchar(6)  DEFAULT '0' NOT NULL",
-                       "id_auteur"     => "bigint(21) DEFAULT 0 NOT NULL",
-                       "destinataires" => "text DEFAULT '' NOT NULL",
-                       "maj"   => "TIMESTAMP"
+                       'type' => "varchar(6) DEFAULT '' NOT NULL",
+                       'date_heure' => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
+                       'date_fin' => "datetime DEFAULT '0000-00-00 00:00:00' NOT NULL",
+                       'rv' => "varchar(3) DEFAULT '' NOT NULL",
+                       'statut' => "varchar(6) DEFAULT '0' NOT NULL",
+                       'id_auteur' => 'bigint(21) DEFAULT 0 NOT NULL',
+                       'destinataires' => "text DEFAULT '' NOT NULL",
+                       'maj' => 'TIMESTAMP'
                ),
                'key' => array(
-                       "PRIMARY KEY"   => "id_message",
-                       "KEY id_auteur" => "id_auteur"
+                       'PRIMARY KEY' => 'id_message',
+                       'KEY id_auteur' => 'id_auteur'
                ),
                'titre' => "titre, '' AS lang",
                'date' => 'date_heure',
@@ -63,17 +67,17 @@ function organiseur_declarer_tables_objets_sql($tables){
                                'champ' => 'statut',
                                'publie' => 'publie',
                                'previsu' => '!',
-                               'exception' => array('statut','tout')
+                               'exception' => array('statut', 'tout')
                        ),
                ),
                'rechercher_champs' => array(
-                       'titre' => 8, 'texte' => 1
+                       'titre' => 8,
+                       'texte' => 1
                ),
 
        );
 
        return $tables;
-       
 }
 
 /**
@@ -82,10 +86,8 @@ function organiseur_declarer_tables_objets_sql($tables){
  * @param array $interfaces
  * @return array
  */
-function organiseur_declarer_tables_interfaces($interfaces){
-       $interfaces['table_des_tables']['messages']='messages';
+function organiseur_declarer_tables_interfaces($interfaces) {
+       $interfaces['table_des_tables']['messages'] = 'messages';
 
        return $interfaces;
 }
-
-?>