diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php
index 9edb18c482c..21b65ae2d42 100644
--- a/htdocs/admin/boxes.php
+++ b/htdocs/admin/boxes.php
@@ -24,8 +24,6 @@ llxHeader();
print_titre("Boites affichées");
-$db = new Db();
-
if ($HTTP_POST_VARS["action"] == 'add')
{
diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php
index 4080966d9cf..9fae2f154ea 100644
--- a/htdocs/admin/const.php
+++ b/htdocs/admin/const.php
@@ -35,7 +35,6 @@ print '
Note | ';
print "Action | ";
print "\n";
-$db = new Db();
$form = new Form($db);
$typeconst=array('yesno','texte','chaine');
if ($user->admin)
diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php
index a6b8b7f5a94..558b7a5ee48 100644
--- a/htdocs/admin/external_rss.php
+++ b/htdocs/admin/external_rss.php
@@ -30,8 +30,6 @@ if (!$user->admin)
exit;
}
-$db = new Db();
-
$def = array();
// positionne la variable pour le nombre de rss externes
diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php
index 6043a557c4c..5c659f8e41c 100644
--- a/htdocs/admin/fichinter.php
+++ b/htdocs/admin/fichinter.php
@@ -29,8 +29,6 @@ if (!$user->admin)
exit;
}
-$db = new Db();
-
// positionne la variable pour le test d'affichage de l'icone
$ficheinter_addon_var_pdf = FICHEINTER_ADDON_PDF;
diff --git a/htdocs/boutique/auteur/fiche.php b/htdocs/boutique/auteur/fiche.php
index 14cced4f1dc..c08eb889e11 100644
--- a/htdocs/boutique/auteur/fiche.php
+++ b/htdocs/boutique/auteur/fiche.php
@@ -22,8 +22,6 @@
require("./pre.inc.php");
-$db = new Db();
-
if ($action == 'add') {
$auteur = new Auteur($db);
diff --git a/htdocs/boutique/auteur/index.php b/htdocs/boutique/auteur/index.php
index af92ad0a1a9..f0aad6c2201 100644
--- a/htdocs/boutique/auteur/index.php
+++ b/htdocs/boutique/auteur/index.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "") {
$sortfield="lower(e.nom)";
}
diff --git a/htdocs/boutique/client/fiche.php b/htdocs/boutique/client/fiche.php
index 098d3d95b35..96b6303257e 100644
--- a/htdocs/boutique/client/fiche.php
+++ b/htdocs/boutique/client/fiche.php
@@ -20,13 +20,10 @@
* $Source$
*
*/
-
require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($action == 'addga') {
$client = new Client($db);
diff --git a/htdocs/boutique/client/index.php b/htdocs/boutique/client/index.php
index d6792e7531c..0a8d08cb0d3 100644
--- a/htdocs/boutique/client/index.php
+++ b/htdocs/boutique/client/index.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "") {
$sortfield="lower(c.customers_lastname)";
}
diff --git a/htdocs/boutique/commande/fiche.php b/htdocs/boutique/commande/fiche.php
index e6a268d5eda..e501bdd484a 100644
--- a/htdocs/boutique/commande/fiche.php
+++ b/htdocs/boutique/commande/fiche.php
@@ -25,8 +25,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
/*
*
*
diff --git a/htdocs/boutique/commande/index.php b/htdocs/boutique/commande/index.php
index f3e8ee4907c..95f6e561c52 100644
--- a/htdocs/boutique/commande/index.php
+++ b/htdocs/boutique/commande/index.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "")
{
$sortfield="date_purchased";
diff --git a/htdocs/boutique/livre/fiche.php b/htdocs/boutique/livre/fiche.php
index 08edb9a6493..8bc661d3331 100644
--- a/htdocs/boutique/livre/fiche.php
+++ b/htdocs/boutique/livre/fiche.php
@@ -22,8 +22,6 @@
require("./pre.inc.php");
-$db = new Db();
-
if ($action == 'add')
{
$livre = new Livre($db);
diff --git a/htdocs/boutique/livre/index.php b/htdocs/boutique/livre/index.php
index b93a48e5970..55124d1d842 100644
--- a/htdocs/boutique/livre/index.php
+++ b/htdocs/boutique/livre/index.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "")
{
$sortfield="lower(l.title)";
diff --git a/htdocs/boutique/livre/vignettes.php b/htdocs/boutique/livre/vignettes.php
index 18cc440f9e2..f1ed6124411 100644
--- a/htdocs/boutique/livre/vignettes.php
+++ b/htdocs/boutique/livre/vignettes.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "")
{
$sortfield="lower(l.ref)";
diff --git a/htdocs/boutique/newsletter/fiche.php b/htdocs/boutique/newsletter/fiche.php
index af10fca20e9..e90c500e1c3 100644
--- a/htdocs/boutique/newsletter/fiche.php
+++ b/htdocs/boutique/newsletter/fiche.php
@@ -22,8 +22,6 @@
require("./pre.inc.php");
-$db = new Db();
-
if ($action == 'add') {
$newsletter = new Newsletter($db);
diff --git a/htdocs/boutique/newsletter/index.php b/htdocs/boutique/newsletter/index.php
index aae5f931e35..16908ff1cd5 100644
--- a/htdocs/boutique/newsletter/index.php
+++ b/htdocs/boutique/newsletter/index.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "") {
$sortfield="datec";
}
diff --git a/htdocs/boutique/notification/fiche.php b/htdocs/boutique/notification/fiche.php
index 5c812afd26f..c2f7ba1d6c4 100644
--- a/htdocs/boutique/notification/fiche.php
+++ b/htdocs/boutique/notification/fiche.php
@@ -24,8 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($action == 'add') {
$editeur = new Editeur($db);
diff --git a/htdocs/boutique/notification/index.php b/htdocs/boutique/notification/index.php
index 3adb546d351..a4f3e30e4ed 100644
--- a/htdocs/boutique/notification/index.php
+++ b/htdocs/boutique/notification/index.php
@@ -25,7 +25,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "") {
$sortfield="lower(c.customers_lastname)";
}
diff --git a/htdocs/boutique/notification/produits.php b/htdocs/boutique/notification/produits.php
index 0cc84583f2a..74c75e87400 100644
--- a/htdocs/boutique/notification/produits.php
+++ b/htdocs/boutique/notification/produits.php
@@ -25,7 +25,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "") {
$sortfield="lower(p.products_name)";
}
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index 4d2703d8d46..0b24ed70bd3 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -24,8 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
-
if ($id)
{
diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php
index 90cbf94d133..b7b1eb5228d 100644
--- a/htdocs/commande/index.php
+++ b/htdocs/commande/index.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "") {
$sortfield="o.orders_status ASC, o.date_purchased";
}
diff --git a/htdocs/compta/caisse/annuel.php b/htdocs/compta/caisse/annuel.php
index 2bc2e1428cb..f1659c88d1a 100644
--- a/htdocs/compta/caisse/annuel.php
+++ b/htdocs/compta/caisse/annuel.php
@@ -25,8 +25,6 @@ require("./pre.inc.php");
*
*/
-$db = new Db();
-
llxHeader();
/*
diff --git a/htdocs/compta/caisse/index.php b/htdocs/compta/caisse/index.php
index 34cdbfade94..967739dc49f 100644
--- a/htdocs/compta/caisse/index.php
+++ b/htdocs/compta/caisse/index.php
@@ -25,8 +25,6 @@ require("./pre.inc.php");
*
*/
-$db = new Db();
-
llxHeader();
/*
diff --git a/htdocs/fourn/facture/fiche.php3 b/htdocs/fourn/facture/fiche.php3
index b274ab0b913..e7f263c93b4 100644
--- a/htdocs/fourn/facture/fiche.php3
+++ b/htdocs/fourn/facture/fiche.php3
@@ -30,8 +30,6 @@ if ($user->societe_id > 0)
$socidp = $user->societe_id;
}
-$db = new Db();
-
$html = new Form($db);
if ($action == 'valid')
diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php
index 12ada3b4da6..c304745a0ab 100644
--- a/htdocs/fourn/facture/index.php
+++ b/htdocs/fourn/facture/index.php
@@ -33,8 +33,6 @@ if ($user->societe_id > 0)
$socid = $user->societe_id;
}
-$db = new Db();
-
if ($action == 'note')
{
$sql = "UPDATE societe SET note='$note' WHERE idp=$socid";
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index 644a35e7e5e..e4d88fa72cd 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -22,8 +22,6 @@
require("./pre.inc.php3");
require("./paiementfourn.class.php");
-$db = new Db();
-
/*
* Sécurité accés client
*/
diff --git a/htdocs/postnuke/articles/fiche.php b/htdocs/postnuke/articles/fiche.php
index aacb9d5444c..8b2c54455b9 100644
--- a/htdocs/postnuke/articles/fiche.php
+++ b/htdocs/postnuke/articles/fiche.php
@@ -23,8 +23,6 @@
require("./pre.inc.php");
require("./pnarticle.class.php");
-$db = new Db();
-
if ($action == 'update' && !$cancel)
{
diff --git a/htdocs/postnuke/articles/index.php b/htdocs/postnuke/articles/index.php
index f41e88cca41..e11be645f68 100644
--- a/htdocs/postnuke/articles/index.php
+++ b/htdocs/postnuke/articles/index.php
@@ -24,7 +24,6 @@ require("./pre.inc.php");
llxHeader();
-$db = new Db();
if ($sortfield == "")
{
$sortfield="lower(p.pn_title)";