X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fplugins%2Fgis%2Fbase%2Fgis.php;h=576475527b374292819ac075ae6c46698478abc7;hb=c0f18416f529232b5555c6410a8765a5125ebcd3;hp=89aa1cb43afff846758011af4bdf9547c4ad1e94;hpb=50522c53acc9e61a4a7de3a1890c4ba93e2f61b4;p=lhc%2Fweb%2Fwww.git diff --git a/www/plugins/gis/base/gis.php b/www/plugins/gis/base/gis.php index 89aa1cb4..57647552 100644 --- a/www/plugins/gis/base/gis.php +++ b/www/plugins/gis/base/gis.php @@ -1,8 +1,10 @@ array( - "id_gis" => "bigint(21) NOT NULL", - "titre" => "text NOT NULL DEFAULT ''", - "descriptif" => "text NOT NULL DEFAULT ''", - "lat" => "double NULL NULL", - "lon" => "double NULL NULL", - "zoom" => "tinyint(4) NULL NULL", - "adresse" => "text NOT NULL DEFAULT ''", - "pays" => "text NOT NULL DEFAULT ''", - "code_pays" => "varchar(255) NOT NULL DEFAULT ''", - "region" => "text NOT NULL DEFAULT ''", - "departement" => "text NOT NULL DEFAULT ''", - "ville" => "text NOT NULL DEFAULT ''", - "code_postal" => "varchar(255) NOT NULL DEFAULT ''" + 'id_gis' => 'bigint(21) NOT NULL', + 'titre' => "text NOT NULL DEFAULT ''", + 'descriptif' => "text NOT NULL DEFAULT ''", + 'lat' => 'double NULL NULL', + 'lon' => 'double NULL NULL', + 'zoom' => 'tinyint(4) NULL NULL', + 'adresse' => "text NOT NULL DEFAULT ''", + 'pays' => "text NOT NULL DEFAULT ''", + 'code_pays' => "varchar(255) NOT NULL DEFAULT ''", + 'region' => "text NOT NULL DEFAULT ''", + 'departement' => "text NOT NULL DEFAULT ''", + 'ville' => "text NOT NULL DEFAULT ''", + 'code_postal' => "varchar(255) NOT NULL DEFAULT ''", + 'color' => "varchar(25) NOT NULL DEFAULT ''", + 'weight' => "varchar(4) NOT NULL DEFAULT ''", + 'opacity' => "varchar(4) NOT NULL DEFAULT ''", + 'fillcolor' => "varchar(25) NOT NULL DEFAULT ''", + 'fillopacity' => "varchar(4) NOT NULL DEFAULT ''" ), 'key' => array( - "PRIMARY KEY" => "id_gis", + 'PRIMARY KEY' => 'id_gis', 'KEY lat' => 'lat', 'KEY lon' => 'lon', 'KEY pays' => 'pays(500)', @@ -58,7 +65,7 @@ function gis_declarer_tables_objets_sql($tables){ 'KEY code_postal' => 'code_postal', ), 'join' => array( - "id_gis"=>"id_gis" + 'id_gis' => 'id_gis' ), 'principale' => 'oui', 'modeles' => array('carte_gis', 'carte_gis_preview'), @@ -71,8 +78,9 @@ function gis_declarer_tables_objets_sql($tables){ 'url_voir' => 'gis', 'url_edit' => 'gis_edit', 'editable' => 'oui', - 'champs_editables' => array('lat', 'lon', 'zoom', 'titre', 'descriptif', 'adresse', 'code_postal', 'ville', 'region', 'departement', 'pays', 'code_pays'), - 'champs_versionnes' => array('lat', 'lon', 'zoom', 'titre', 'descriptif', 'adresse', 'code_postal', 'ville', 'region', 'departement', 'pays', 'code_pays'), + 'champs_editables' => array('lat', 'lon', 'zoom', 'titre', 'descriptif', 'adresse', 'code_postal', 'ville', 'region', 'departement', 'pays', 'code_pays', 'color', 'weight', 'opacity', 'fillcolor', 'fillopacity'), + 'champs_versionnes' => array('lat', 'lon', 'zoom', 'titre', 'descriptif', 'adresse', 'code_postal', 'ville', 'region', 'departement', 'pays', 'code_pays', 'color', 'weight', 'opacity', 'fillcolor', 'fillopacity'), + 'champs_critere_gis' => array('gis.titre AS titre_gis', 'gis.descriptif AS descriptif_gis', 'gis.adresse AS adresse_gis', 'gis.pays AS pays_gis', 'gis.code_pays AS code_pays_gis', 'gis.region AS region_gis', 'gis.departement AS departement_gis', 'gis.ville AS ville_gis', 'gis.code_postal AS code_postal_gis'), 'icone_objet' => 'gis', 'rechercher_champs' => array( 'titre' => 8, @@ -115,17 +123,17 @@ function gis_declarer_tables_objets_sql($tables){ return $tables; } -function gis_declarer_tables_auxiliaires($tables_auxiliaires){ +function gis_declarer_tables_auxiliaires($tables_auxiliaires) { $spip_gis_liens = array( - "id_gis" => "bigint(21) NOT NULL", - "objet" => "VARCHAR (25) DEFAULT '' NOT NULL", - "id_objet" => "bigint(21) NOT NULL"); + 'id_gis' => 'bigint(21) NOT NULL', + 'objet' => "VARCHAR (25) DEFAULT '' NOT NULL", + 'id_objet' => 'bigint(21) NOT NULL'); $spip_gis_liens_key = array( - "PRIMARY KEY" => "id_gis,id_objet,objet", - "KEY id_gis" => "id_gis", - "KEY id_objet" => "id_objet", - "KEY objet" => "objet" + 'PRIMARY KEY' => 'id_gis,id_objet,objet', + 'KEY id_gis' => 'id_gis', + 'KEY id_objet' => 'id_objet', + 'KEY objet' => 'objet' ); $tables_auxiliaires['spip_gis_liens'] = array( @@ -134,5 +142,3 @@ function gis_declarer_tables_auxiliaires($tables_auxiliaires){ return $tables_auxiliaires; } - -?>