From 259fbed33959ff7010cda40556af92acc376de49 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Mon, 25 Aug 2003 17:39:21 +0000 Subject: [PATCH] Nettoyage du code --- htdocs/product/album/fiche.php | 1 - htdocs/product/album/index.php | 1 - htdocs/product/concert/fiche.php | 2 -- htdocs/product/concert/index.php | 1 - htdocs/product/groupart/fiche.php | 9 ++------- htdocs/product/groupart/index.php | 8 ++++---- htdocs/service/fiche.php3 | 2 -- htdocs/service/index.php | 1 - htdocs/soc.php3 | 2 -- htdocs/societe.php | 3 --- htdocs/societe/notify/fiche.php | 1 - htdocs/societe/notify/index.php | 2 -- htdocs/user/fiche.php3 | 1 - 13 files changed, 6 insertions(+), 28 deletions(-) diff --git a/htdocs/product/album/fiche.php b/htdocs/product/album/fiche.php index 584e4d3d37a..96bd67557c5 100644 --- a/htdocs/product/album/fiche.php +++ b/htdocs/product/album/fiche.php @@ -19,7 +19,6 @@ * $Source$ * */ - require("./pre.inc.php"); llxHeader(); diff --git a/htdocs/product/album/index.php b/htdocs/product/album/index.php index 2aa65f8c0dd..3a9ab9ca7db 100644 --- a/htdocs/product/album/index.php +++ b/htdocs/product/album/index.php @@ -19,7 +19,6 @@ * $Source$ * */ - require("./pre.inc.php"); llxHeader(); diff --git a/htdocs/product/concert/fiche.php b/htdocs/product/concert/fiche.php index 26869b4c2bb..1d7e8ab9e10 100644 --- a/htdocs/product/concert/fiche.php +++ b/htdocs/product/concert/fiche.php @@ -24,8 +24,6 @@ require("./pre.inc.php"); llxHeader(); -$db = new Db(); - if ($action == 'add') { $concert = new Concert($db); diff --git a/htdocs/product/concert/index.php b/htdocs/product/concert/index.php index 343c209a098..53fdc3dfd06 100644 --- a/htdocs/product/concert/index.php +++ b/htdocs/product/concert/index.php @@ -24,7 +24,6 @@ require("./pre.inc.php"); llxHeader(); -$db = new Db(); if ($sortfield == "") { $sortfield="c.date_concert"; } diff --git a/htdocs/product/groupart/fiche.php b/htdocs/product/groupart/fiche.php index c4c4298b781..fe7cd2bcdf4 100644 --- a/htdocs/product/groupart/fiche.php +++ b/htdocs/product/groupart/fiche.php @@ -19,31 +19,26 @@ * $Source$ * */ - require("./pre.inc.php"); llxHeader(); -if ($action == 'add') { +if ($action == 'add') +{ $groupart = new Groupart($db); - $groupart->nom = $nom; - $id = $groupart->create($user); } if ($action == 'update') { $groupart = new Groupart($db); - $groupart->nom = $nom; - $groupart->update($id, $user); } if ($action == 'updateosc') { $groupart = new Groupart($db); $result = $groupart->fetch($id); - $groupart->updateosc($user); } diff --git a/htdocs/product/groupart/index.php b/htdocs/product/groupart/index.php index 2f0863302eb..3c6259a6fbc 100644 --- a/htdocs/product/groupart/index.php +++ b/htdocs/product/groupart/index.php @@ -19,16 +19,16 @@ * $Source$ * */ - require("./pre.inc.php"); llxHeader(); -$db = new Db(); -if ($sortfield == "") { +if ($sortfield == "") +{ $sortfield="lower(g.nom)"; } -if ($sortorder == "") { +if ($sortorder == "") +{ $sortorder="ASC"; } diff --git a/htdocs/service/fiche.php3 b/htdocs/service/fiche.php3 index 1d9babf159c..1f735cb7254 100644 --- a/htdocs/service/fiche.php3 +++ b/htdocs/service/fiche.php3 @@ -25,8 +25,6 @@ require("../service.class.php3"); llxHeader(); -$db = new Db(); - if ($action == 'add') { $service = new Service($db); diff --git a/htdocs/service/index.php b/htdocs/service/index.php index 7f102e1ee8b..19cabfdbc57 100644 --- a/htdocs/service/index.php +++ b/htdocs/service/index.php @@ -24,7 +24,6 @@ require("./pre.inc.php3"); llxHeader(); -$db = new Db(); if ($sortfield == "") { $sortfield="lower(p.ref)"; } diff --git a/htdocs/soc.php3 b/htdocs/soc.php3 index 2b1a36c749f..e82b7a7c647 100644 --- a/htdocs/soc.php3 +++ b/htdocs/soc.php3 @@ -34,8 +34,6 @@ if ($user->societe_id > 0) llxHeader(); -$db = new Db(); - if ($action == 'add') { diff --git a/htdocs/societe.php b/htdocs/societe.php index 6a6ca126a2c..7f2fd22e868 100644 --- a/htdocs/societe.php +++ b/htdocs/societe.php @@ -33,11 +33,8 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } - llxHeader(); -$db = new Db(); - if ($sortorder == "") { $sortorder="ASC"; } diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index 352dc8bb8e9..f6f01080d6b 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -29,7 +29,6 @@ if ($user->societe_id > 0) } llxHeader(); -$db = new Db(); if ($HTTP_POST_VARS["action"] == 'add') { diff --git a/htdocs/societe/notify/index.php b/htdocs/societe/notify/index.php index 8ff673656d4..92fe2ad86bc 100644 --- a/htdocs/societe/notify/index.php +++ b/htdocs/societe/notify/index.php @@ -32,8 +32,6 @@ if ($user->societe_id > 0) llxHeader(); -$db = new Db(); - if ($sortorder == "") { $sortorder="ASC"; diff --git a/htdocs/user/fiche.php3 b/htdocs/user/fiche.php3 index 80bcd092f5f..cbcfc9d3eb6 100644 --- a/htdocs/user/fiche.php3 +++ b/htdocs/user/fiche.php3 @@ -22,7 +22,6 @@ require("./pre.inc.php3"); -$db = new Db(); $form = new Form($db); if ($subaction == 'addrights' && $user->admin)