Author: bill@adequates.com
Date: Sat Aug 19 11:01:42 2006
New Revision: 4717
Log:
reorganisation : avoir ce qu'il faut ou il faut et pas plus !
Added:
_plugins_/_contenu_editorial_/spipcarto/base/carto.php
- copied, changed from r4575, _plugins_/_contenu_editorial_/spipcarto/base/spipcarto.php
_plugins_/_contenu_editorial_/spipcarto/spipcarto_prive.php
- copied, changed from r4705, _plugins_/_contenu_editorial_/spipcarto/spipcarto_options.php
Removed:
_plugins_/_contenu_editorial_/spipcarto/base/spipcarto.php
_plugins_/_contenu_editorial_/spipcarto/spipcarto_options.php
Modified:
_plugins_/_contenu_editorial_/spipcarto/plugin.xml
_plugins_/_contenu_editorial_/spipcarto/spipcarto.php
_plugins_/_contenu_editorial_/spipcarto/spipcarto_fonctions.php
Copied: _plugins_/_contenu_editorial_/spipcarto/base/carto.php (from r4575, _plugins_/_contenu_editorial_/spipcarto/base/spipcarto.php)
--- _plugins_/_contenu_editorial_/spipcarto/base/spipcarto.php (original)
+++ _plugins_/_contenu_editorial_/spipcarto/base/carto.php Sat Aug 19 11:01:42 2006
@@ -1,23 +1,23 @@
<?php
/*****************************************************************************\
-* SPIP-CARTO, Solution de partage et délaboration dinformation
+* SPIP-CARTO, Solution de partage et d��laboration d�information
* (Carto)Graphique sous SPIP
*
* Copyright (c) 2005
*
-* Stéphane Laurent, François-Xavier Prunayre, Pierre Giraud, Jean-Claude
+* St�phane Laurent, Fran�ois-Xavier Prunayre, Pierre Giraud, Jean-Claude
* Moissinac et tous les membres du projet SPIP-CARTO V1 (Annie Danzart - Arnaud
-* Fontaine - Arnaud Saint Léger - Benoit Veler - Christine Potier - Christophe
+* Fontaine - Arnaud Saint L�ger - Benoit Veler - Christine Potier - Christophe
* Betin - Daniel Faivre - David Delon - David Jonglez - Eric Guichard - Jacques
-* Chatignoux - Julien Custot - Laurent Jégou - Mathieu Géhin - Michel Briand -
-* Mose - Olivier Frérot - Philippe Fournel - Thierry Joliveau)
+* Chatignoux - Julien Custot - Laurent J�gou - Mathieu G�hin - Michel Briand -
+* Mose - Olivier Fr�rot - Philippe Fournel - Thierry Joliveau)
*
* voir : http://www.geolibre.net/article.php3?id_article=16
*
* Ce programme est un logiciel libre distribue sous licence GNU/GPL.
-* Pour plus de details voir le fichier COPYING.txt ou laide en ligne.
+* Pour plus de details voir le fichier COPYING.txt ou l�aide en ligne.
*
- -
+� -
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License, or
@@ -33,7 +33,7 @@
the Free Software Foundation, Inc.,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
or check http://www.gnu.org/copyleft/gpl.html
- -
+� -
*
\***************************************************************************/
//////////////////////////////////////////////////
@@ -51,8 +51,6 @@
"texte" => "TEXT BINARY NOT NULL",
"url_carte" => "TEXT BINARY NOT NULL",
"callage" => "TEXT BINARY NOT NULL",
- "statut" => "VARCHAR(8) NOT NULL default 'publie'",
- "idx" => "enum('','1','non','oui','idx') NOT NULL default ''",
"id_srs" => "bigint(21) NOT NULL");
$spip_carto_cartes_key = array(
@@ -72,13 +70,15 @@
"url_objet" => "TEXT BINARY NOT NULL",
"url_logo" => "TEXT BINARY NOT NULL",
"geometrie" => "TEXT BINARY NOT NULL",
- "statut" => "VARCHAR(8) NOT NULL default 'publie'",
- "idx" => "enum('','1','non','oui','idx') NOT NULL default ''");
+ "statut" => "VARCHAR(8) NOT NULL default 'publie'"
+ );
$spip_carto_objets_key = array(
"PRIMARY KEY" => "id_carto_objet",
"KEY id_carto_carte" => "id_carto_carte",
- "KEY titre" => "titre");
+ "KEY titre" => "titre",
+ "KEY statut" => "statut"
+ );
//////////////////////////////////////////////////
// CARTO_CARTES_ARTICLES
@@ -106,10 +106,6 @@
"KEY id_article" => "id_article");
-$tables_auxiliaires['spip_carto_cartes_articles'] = array(
- 'field' => &$spip_carto_cartes_articles,
- 'key' => &$spip_carto_cartes_articles_key);
-
//////////////////////////////////////////////////
// MOTS_CARTO_OBJETS
//////////////////////////////////////////////////
@@ -144,51 +140,54 @@
//global $tables_principales,$table_primary,$tables_auxiliaires,$tables_relations;
-$tables_principales['spip_carto_cartes'] =
+$GLOBALS['tables_principales']['spip_carto_cartes'] =
array('field' => &$spip_carto_cartes, 'key' => &$spip_carto_cartes_key);
-$tables_principales['spip_carto_objets'] =
+$GLOBALS['tables_principales']['spip_carto_objets'] =
array('field' => &$spip_carto_objets, 'key' => &$spip_carto_objets_key);
//Relation avec les articles
-$tables_auxiliaires['spip_carto_cartes_articles'] = array(
+$GLOBALS['tables_auxiliaires']['spip_carto_cartes_articles'] = array(
'field' => &$spip_carto_cartes_articles,
'key' => &$spip_carto_cartes_articles_key);
-//La, ca se discute ...
-//Ca devrait etre une table secondaire
-//mais comme on n'utilise que l'id_mot dans la boucle
-//on gagne une jointure dans la requete
-//$tables_principales['spip_mots_carto_objets'] = array(
-// 'field' => &$spip_mots_carto_objets,
-// 'key' => &$spip_mots_carto_objets_key);
-$tables_auxiliaires['spip_mots_carto_objets'] = array(
+$GLOBALS['tables_auxiliaires']['spip_mots_carto_objets'] = array(
'field' => &$spip_mots_carto_objets,
'key' => &$spip_mots_carto_objets_key);
-
-$table_primary['carto_objets']="id_carto_objet";
-$table_primary['carto_cartes']="id_carto_carte";
-
-$table_des_tables['carto_objets']="carto_objets";
-$table_des_tables['carto_cartes']="carto_cartes";
-
-$tables_relations['documents']['id_carto_carte']='documents_carto_cartes';
-$tables_relations['mots']['id_carto_objet']='mots_carto_objets';
-$tables_relations['carto_objets']['id_mot']='mots_carto_objets';
-$tables_relations['carto_cartes']['id_document']='documents_carto_cartes';
-
-function boucle_CARTO_CARTES($id_boucle, &$boucles) {
- $boucle = &$boucles[$id_boucle];
- $boucle->from[] = "spip_carto_cartes AS " . $boucle->type_requete;
- return calculer_boucle($id_boucle, $boucles);
-}
-
-function boucle_CARTO_OBJETS($id_boucle, &$boucles) {
- $boucle = &$boucles[$id_boucle];
- $boucle->from[] = "spip_carto_objets AS " . $boucle->type_requete;
- return calculer_boucle($id_boucle, $boucles);
-}
-
+$GLOBALS['tables_auxiliaires']['spip_documents_carto_cartes'] = array(
+ 'field' => &$spip_documents_carto_cartes,
+ 'key' => &$spip_documents_carto_cartes_key);
+
+
+$GLOBALS['table_primary']['carto_objets']="id_carto_objet";
+$GLOBALS['table_primary']['carto_cartes']="id_carto_carte";
+
+$GLOBALS['table_des_tables']['carto_objets']="carto_objets";
+$GLOBALS['table_des_tables']['carto_cartes']="carto_cartes";
+
+$GLOBALS['tables_jointures']['spip_mots'][]= 'mots_carto_objets';
+$GLOBALS['tables_jointures']['spip_carto_objets'][]='mots_carto_objets';
+$GLOBALS['tables_jointures']['spip_documents'][]='documents_carto_cartes';
+$GLOBALS['tables_jointures']['spip_carto_cartes'][]='documents_carto_cartes';
+$GLOBALS['tables_jointures']['spip_articles'][]='carto_cartes_articles';
+$GLOBALS['tables_jointures']['spip_carto_cartes'][]='carto_cartes_articles';
+
+$GLOBALS['choses_possibles']['carto_objets'] = array(
+ 'titre_chose' => 'Objets',
+ 'id_chose' => 'id_carto_objet',
+ 'table_principale' => 'spip_carto_objets',
+ 'url_base' => 'cartes_edit&id_carte=',
+
+ 'table_carte' => 'spip_carto_cartes',
+ 'tables_limite' => array(
+ 'carto_objets' => array(
+ 'table' => 'spip_carto_objets',
+ 'nom_id' => 'id_carto_objet'),
+ 'carto_cartes' => array(
+ 'table' => 'spip_carto_objets',
+ 'nom_id' => 'id_carto_carte'),
+ )
+ );
?>
\ No newline at end of file
Removed: _plugins_/_contenu_editorial_/spipcarto/base/spipcarto.php
--- _plugins_/_contenu_editorial_/spipcarto/base/spipcarto.php (original)
+++ _plugins_/_contenu_editorial_/spipcarto/base/spipcarto.php (removed)
@@ -1,194 +0,0 @@
-<?php
-/*****************************************************************************\
-* SPIP-CARTO, Solution de partage et délaboration dinformation
-* (Carto)Graphique sous SPIP
-*
-* Copyright (c) 2005
-*
-* Stéphane Laurent, François-Xavier Prunayre, Pierre Giraud, Jean-Claude
-* Moissinac et tous les membres du projet SPIP-CARTO V1 (Annie Danzart - Arnaud
-* Fontaine - Arnaud Saint Léger - Benoit Veler - Christine Potier - Christophe
-* Betin - Daniel Faivre - David Delon - David Jonglez - Eric Guichard - Jacques
-* Chatignoux - Julien Custot - Laurent Jégou - Mathieu Géhin - Michel Briand -
-* Mose - Olivier Frérot - Philippe Fournel - Thierry Joliveau)
-*
-* voir : http://www.geolibre.net/article.php3?id_article=16
-*
-* Ce programme est un logiciel libre distribue sous licence GNU/GPL.
-* Pour plus de details voir le fichier COPYING.txt ou laide en ligne.
-*
- -
-This program is free software ; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation ; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY ; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[... 1032 lines stripped ...]