From 479e8fff080121dd6bfec8e57700a7e19f6d0f5c Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 13 Mar 2003 18:53:40 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20des=20tables=20dans=20le=20chargement?= =?UTF-8?q?=20et=20modif=20constantes=20par=20d=E9faut.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/pre.inc.php | 10 +++++----- mysql/Makefile | 12 +++++------- mysql/data/data.sql | 2 +- mysql/data/data_dev.sql | 11 +++++++++++ mysql/drop.sql | 12 ++++++++++++ mysql/tables/Makefile | 10 ++++++---- 6 files changed, 40 insertions(+), 17 deletions(-) diff --git a/htdocs/admin/pre.inc.php b/htdocs/admin/pre.inc.php index 3c2499a93b0..fff92add05e 100644 --- a/htdocs/admin/pre.inc.php +++ b/htdocs/admin/pre.inc.php @@ -43,14 +43,14 @@ function llxHeader($head = "", $urlp = "") { $menu->add_submenu("sqltables.php", "Tables"); - if (DB_NAME_OSC <> "DB_NAME_OSC") - { - $menu->add("osc-languages.php", "OSC Languages $toto"); - } - if ($conf->boutique->enabled) { $menu->add("boutique.php", "Boutique"); + + if (defined("DB_NAME_OSC")) + { + $menu->add_submenu("osc-languages.php", "OSC Languages $toto"); + } } $menu->add("phpinfo.php", "phpinfo"); diff --git a/mysql/Makefile b/mysql/Makefile index e8dbe2f639b..a04cb29e14b 100644 --- a/mysql/Makefile +++ b/mysql/Makefile @@ -28,8 +28,7 @@ OPTIONS= TABLES=$(shell find tables/ -name "*sql") all: - cd tables \ - && make show + cat README show: cd tables \ @@ -44,16 +43,15 @@ dev: && make dev -fulldev: droptable table load dev +fulldev: drop table load dev -droptable: - cd tables \ - && make drop +drop: + $(MYSQL) $(OPTIONS) $(BASE) < drop.sql load: $(MYSQL) $(OPTIONS) $(BASE) < data/data.sql -drop: dropdb droppriv +dropall: dropdb droppriv droppriv: $(MYSQL) mysql -e "delete from db where Db='$(BASE)' ; " diff --git a/mysql/data/data.sql b/mysql/data/data.sql index 0d32555fa91..9280458aa57 100644 --- a/mysql/data/data.sql +++ b/mysql/data/data.sql @@ -45,7 +45,7 @@ insert into llx_const(name, value, type, note) values ('MAIN_SEARCHFORM_CONTACT' insert into llx_const(name, value, type, note) values ('COMPTA_ONLINE_PAYMENT_BPLC','1','yesno','Système de gestion de la banque populaire de Lorraine'); INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_THEME','dolibarr','chaine','theme principal'); -INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_TITLE','Adherents test J1B','chaine','Titre des pages'); +INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_TITLE','Dolibarr','chaine','Titre des pages'); INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_MAIL_RESIL','Votre adhesion sur %SERVEUR% vient d\'etre resilie.\r\nNous esperons vous revoir tres bientot','texte','Mail de Resiliation'); INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_MAIL_VALID','MAIN\r\nVotre adhesion vient d\'etre validee. \r\nVoici le rappel de vos coordonnees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante : \r\n%SERVEUR%public/adherents/','texte','Mail de validation'); INSERT INTO llx_const (name, value, type, note) VALUES ('MAIN_MAIL_EDIT','Voici le rappel des coordonnees que vous avez modifiees (toute information erronee entrainera la non validation de votre inscription) :\r\n\r\n%INFO%\r\n\r\nVous pouvez a tout moment, grace a votre login et mot de passe, modifier vos coordonnees a l\'adresse suivante :\r\n%SERVEUR%public/adherents/','texte','Mail d\'edition'); diff --git a/mysql/data/data_dev.sql b/mysql/data/data_dev.sql index caa92760c84..65ebe1c6799 100644 --- a/mysql/data/data_dev.sql +++ b/mysql/data/data_dev.sql @@ -46,6 +46,17 @@ values ('02-11-YHGT',2,now(),'2002-11-01',1,1000,0,196,1196,1,NULL,NULL,''); insert into llx_facture_fourn (facnumber, fk_soc, datec, datef, paye, amount, remise, tva, total, fk_statut, fk_user_author, fk_user_valid, note) values ('02-12-YHGT',2,now(),'2002-12-01',1,1000,0,196,1196,1,NULL,NULL,''); +REPLACE INTO llx_const (name, value, type, visible) VALUES ('MAIN_THEME', 'yellow','chaine',1); + +REPLACE INTO llx_const (name, value, type, visible) VALUES ('MAIN_MODULE_BOUTIQUE', '1','yesno',0); +REPLACE INTO llx_const (name, value, type, visible) VALUES ('MAIN_MODULE_COMMANDE', '1','yesno',0); +REPLACE INTO llx_const (name, value, type, visible) VALUES ('MAIN_MODULE_COMMERCIAL','1','yesno',0); +REPLACE INTO llx_const (name, value, type, visible) VALUES ('MAIN_MODULE_DON', '1','yesno',0); +REPLACE INTO llx_const (name, value, type, visible) VALUES ('MAIN_MODULE_FACTURE', '1','yesno',0); +REPLACE INTO llx_const (name, value, type, visible) VALUES ('MAIN_MODULE_ADHERENT', '1','yesno',0); + +REPLACE INTO llx_const (name, value, type, visible) VALUES ('BOUTIQUE_LIVRE','1','yesno',0); +REPLACE INTO llx_const (name, value, type, visible) VALUES ('BOUTIQUE_ALBUM','1','yesno',0); delete from llx_user; diff --git a/mysql/drop.sql b/mysql/drop.sql index e753ca34902..0025a92a8c8 100644 --- a/mysql/drop.sql +++ b/mysql/drop.sql @@ -51,6 +51,10 @@ drop table if exists llx_adherent_options; drop table if exists llx_adherent_options_label; +drop table if exists llx_album; + +drop table if exists llx_auteur; + drop table if exists llx_bank; drop table if exists llx_bank_account; @@ -79,6 +83,8 @@ drop table if exists llx_don; drop table if exists llx_don_projet; +drop table if exists llx_editeur; + drop table if exists llx_fa_pr; drop table if exists llx_facture; @@ -89,6 +95,10 @@ drop table if exists llx_facture_fourn; drop table if exists llx_fichinter; +drop table if exists llx_groupart; + +drop table if exists llx_livre; + drop table if exists llx_paiement; drop table if exists llx_pointmort; @@ -105,6 +115,8 @@ drop table if exists llx_service; drop table if exists llx_soc_recontact; +drop table if exists llx_sqltables; + drop table if exists llx_tva; drop table if exists llx_user; diff --git a/mysql/tables/Makefile b/mysql/tables/Makefile index a294953b0e8..00b834bfe68 100644 --- a/mysql/tables/Makefile +++ b/mysql/tables/Makefile @@ -38,6 +38,8 @@ create: $(MYSQL) $(OPTIONS) $(BASE) < llx_adherent_type.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_adherent_options.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_adherent_options_label.sql + $(MYSQL) $(OPTIONS) $(BASE) < llx_album.sql + $(MYSQL) $(OPTIONS) $(BASE) < llx_auteur.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_bank.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_bank_account.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_bank_categ.sql @@ -52,11 +54,14 @@ create: $(MYSQL) $(OPTIONS) $(BASE) < llx_cotisation.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_don.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_don_projet.sql + $(MYSQL) $(OPTIONS) $(BASE) < llx_editeur.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_fa_pr.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_facture.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_facturedet.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_facture_fourn.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_fichinter.sql + $(MYSQL) $(OPTIONS) $(BASE) < llx_groupart.sql + $(MYSQL) $(OPTIONS) $(BASE) < llx_livre.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_paiement.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_pointmort.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_product.sql @@ -65,6 +70,7 @@ create: $(MYSQL) $(OPTIONS) $(BASE) < llx_propaldet.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_service.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_soc_recontact.sql + $(MYSQL) $(OPTIONS) $(BASE) < llx_sqltables.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_tva.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_user.sql $(MYSQL) $(OPTIONS) $(BASE) < llx_ventes.sql @@ -74,9 +80,5 @@ create: $(MYSQL) $(OPTIONS) $(BASE) < socpeople.sql $(MYSQL) $(OPTIONS) $(BASE) < socstatutlog.sql - -drop: - $(MYSQL) $(OPTIONS) $(BASE) < drop.sql - show: $(MYSQL) $(OPTIONS) $(BASE) -e 'show tables'