diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index 6736f9d2279..1d05efa8e99 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -534,4 +534,3 @@ print '
';
llxFooter();
$db->close();
-?>
diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php
index 0ec3119c097..36733add335 100644
--- a/htdocs/admin/menus/other.php
+++ b/htdocs/admin/menus/other.php
@@ -143,4 +143,3 @@ print '';
llxFooter();
$db->close();
-?>
\ No newline at end of file
diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php
index 9b80662c180..3cc9e70ca31 100644
--- a/htdocs/admin/stock.php
+++ b/htdocs/admin/stock.php
@@ -77,7 +77,7 @@ if($action)
if($action == 'STOCK_USE_VIRTUAL_STOCK') {
$res = dolibarr_set_const($db, "STOCK_USE_VIRTUAL_STOCK", GETPOST('STOCK_USE_VIRTUAL_STOCK','alpha'),'chaine',0,'',$conf->entity);
}
-
+
if($action == 'STOCK_MUST_BE_ENOUGH_FOR_INVOICE') {
$res = dolibarr_set_const($db, "STOCK_MUST_BE_ENOUGH_FOR_INVOICE", GETPOST('STOCK_MUST_BE_ENOUGH_FOR_INVOICE','alpha'),'chaine',0,'',$conf->entity);
}
@@ -329,7 +329,7 @@ if ($virtualdiffersfromphysical)
print '';
}
-$db->close();
llxFooter();
-?>
+
+$db->close();
diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php
index f32122df7b9..d9833a13d01 100644
--- a/htdocs/admin/system/database.php
+++ b/htdocs/admin/system/database.php
@@ -81,7 +81,7 @@ else
print '
'.$langs->trans("Parameters").' | ';
print ''.$langs->trans("Value").' | ';
print ''."\n";
-
+
// arraytest is an array of test to do
$arraytest=array();
if (preg_match('/mysql/i',$db->type))
@@ -91,7 +91,7 @@ else
'collation_database'=>array('var'=>'dolibarr_main_db_collation','valifempty'=>'utf8_general_ci')
);
}
-
+
$listtouse=array();
if ($listname == 'listofvars') $listtouse=$listofvars;
if ($listname == 'listofstatus') $listtouse=$listofstatus;
@@ -124,4 +124,5 @@ else
}
llxFooter();
-?>
\ No newline at end of file
+
+$db->close();
diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php
index fe182c2e73e..0990d89acd0 100644
--- a/htdocs/admin/system/dbtable.php
+++ b/htdocs/admin/system/dbtable.php
@@ -130,4 +130,3 @@ else
llxFooter();
$db->close();
-?>
\ No newline at end of file
diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index 8be469006ff..fe9bde59cec 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -379,4 +379,3 @@ print '';
llxFooter();
$db->close();
-?>
diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php
index 640d5138362..1f95dce57cf 100644
--- a/htdocs/admin/system/index.php
+++ b/htdocs/admin/system/index.php
@@ -118,5 +118,3 @@ print info_admin($langs->trans("SystemInfoDesc")).'
';
llxFooter();
$db->close();
-
-?>
diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php
index a3f046f4510..8f82f33d039 100644
--- a/htdocs/admin/tools/eaccelerator.php
+++ b/htdocs/admin/tools/eaccelerator.php
@@ -350,4 +350,3 @@ print "
";
llxFooter();
$db->close();
-?>
diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php
index cac0bce888c..30c7ba4dd43 100644
--- a/htdocs/admin/tools/purge.php
+++ b/htdocs/admin/tools/purge.php
@@ -166,4 +166,3 @@ if (preg_match('/^confirm/i',$choice))
llxFooter();
$db->close();
-?>
\ No newline at end of file
diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php
index e449d265fa3..8b0b105d0f0 100644
--- a/htdocs/admin/tools/update.php
+++ b/htdocs/admin/tools/update.php
@@ -174,4 +174,3 @@ if (! empty($result['return']))
llxFooter();
$db->close();
-?>
\ No newline at end of file
diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php
index 8e5370a957e..66bc4fb22ba 100644
--- a/htdocs/admin/translation.php
+++ b/htdocs/admin/translation.php
@@ -69,4 +69,3 @@ print $langs->trans("SeeAlso").':