diff --git a/dev/skeletons/modMyModule.class.php b/dev/skeletons/modMyModule.class.php
index 8f819e58438..98e50bc813a 100644
--- a/dev/skeletons/modMyModule.class.php
+++ b/dev/skeletons/modMyModule.class.php
@@ -38,7 +38,7 @@ class modMyModule extends DolibarrModules
*
* @param DoliDB $db Database handler
*/
- function modMyModule($db)
+ function __construct($db)
{
global $langs,$conf;
diff --git a/htdocs/accountancy/class/accountancyaccount.class.php b/htdocs/accountancy/class/accountancyaccount.class.php
index 3d5814d143a..f99f61e782c 100644
--- a/htdocs/accountancy/class/accountancyaccount.class.php
+++ b/htdocs/accountancy/class/accountancyaccount.class.php
@@ -43,11 +43,11 @@ class AccountancyAccount
/**
* Constructor
*
- * @param DoliDB $DB Database handler
+ * @param DoliDB $db Database handler
*/
- function AccountancyAccount($DB)
+ function __construct($db)
{
- $this->db = $DB;
+ $this->db = $db;
}
diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php
index 2c278030a62..c64ede9953a 100644
--- a/htdocs/accountancy/class/accountancysystem.class.php
+++ b/htdocs/accountancy/class/accountancysystem.class.php
@@ -42,11 +42,11 @@ class AccountancySystem
/**
* Constructor
*
- * @param DoliDB $DB Database handler
+ * @param DoliDB $db Database handler
*/
- function AccountancySystem($DB)
+ function __construct($db)
{
- $this->db = $DB;
+ $this->db = $db;
}
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 83b2c24dbc5..20195bf073b 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -117,7 +117,7 @@ class Adherent extends CommonObject
*
* @param DoliDB $db Database handler
*/
- function Adherent($db)
+ function __construct($db)
{
$this->db = $db;
$this->statut = -1;
diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php
index aa08f2cbbe3..ea2a6489f5b 100644
--- a/htdocs/adherents/class/adherent_type.class.php
+++ b/htdocs/adherents/class/adherent_type.class.php
@@ -48,11 +48,11 @@ class AdherentType extends CommonObject
/**
* Constructor
*
- * @param DoliDB $DB Database handler
+ * @param DoliDB $db Database handler
*/
- function AdherentType($DB)
+ function __construct($db)
{
- $this->db = $DB ;
+ $this->db = $db;
$this->statut = 1;
}
diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php
index 0424b428f66..4db3884cdad 100755
--- a/htdocs/adherents/class/adherentstats.class.php
+++ b/htdocs/adherents/class/adherentstats.class.php
@@ -51,7 +51,7 @@ class AdherentStats extends Stats
* @param int $userid Id user for filter
* @return AdherentStats
*/
- function AdherentStats($db, $socid=0, $userid=0)
+ function __construct($db, $socid=0, $userid=0)
{
global $user, $conf;
diff --git a/htdocs/adherents/class/cotisation.class.php b/htdocs/adherents/class/cotisation.class.php
index 4a07b5dd9c9..eb4624a4c40 100644
--- a/htdocs/adherents/class/cotisation.class.php
+++ b/htdocs/adherents/class/cotisation.class.php
@@ -50,7 +50,7 @@ class Cotisation extends CommonObject
*
* @param DoliDB $db Database handler
*/
- function Cotisation($db)
+ function __construct($db)
{
$this->db = $db;
}
diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php
index da441327e5b..638064fd1dd 100644
--- a/htdocs/admin/commande.php
+++ b/htdocs/admin/commande.php
@@ -36,6 +36,7 @@ require_once(DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php');
$langs->load("admin");
$langs->load("errors");
$langs->load("orders");
+$langs->load('other');
if (! $user->admin) accessforbidden();
@@ -289,7 +290,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '
';
$tmp=$module->getExample();
- if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print ' '.$langs->trans($tmp).' '; }
+ if (preg_match('/^Error/',$tmp)) print ''.$langs->trans($tmp).' ';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print ' | '."\n";
diff --git a/htdocs/admin/dons.php b/htdocs/admin/dons.php
index b71cdb76e2a..789884702c6 100644
--- a/htdocs/admin/dons.php
+++ b/htdocs/admin/dons.php
@@ -27,6 +27,7 @@ require_once(DOL_DOCUMENT_ROOT."/compta/dons/class/don.class.php");
$langs->load("admin");
$langs->load("donations");
+$langs->load('other');
if (!$user->admin) accessforbidden();
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index 3d0fac4c72b..1adc2ecc660 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php');
$langs->load("admin");
$langs->load("sendings");
$langs->load("deliveries");
+$langs->load('other');
if (!$user->admin) accessforbidden();
diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php
index f7e501635cb..eb88d57be98 100644
--- a/htdocs/admin/facture.php
+++ b/htdocs/admin/facture.php
@@ -32,6 +32,7 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php');
$langs->load("admin");
$langs->load("errors");
+$langs->load('other');
if (! $user->admin) accessforbidden();
@@ -368,7 +369,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '';
$tmp=$module->getExample();
- if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print ' '.$langs->trans($tmp).' '; }
+ if (preg_match('/^Error/',$tmp)) print ''.$langs->trans($tmp).' ';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print ' | '."\n";
diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php
index d2c93328129..4aac5a88fed 100644
--- a/htdocs/admin/fichinter.php
+++ b/htdocs/admin/fichinter.php
@@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php');
$langs->load("admin");
$langs->load("errors");
$langs->load("interventions");
+$langs->load('other');
if (! $user->admin) accessforbidden();
@@ -251,7 +252,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '';
$tmp=$module->getExample();
- if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print ' '.$langs->trans($tmp).' '; }
+ if (preg_match('/^Error/',$tmp)) print ''.$langs->trans($tmp).' ';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print ' | '."\n";
diff --git a/htdocs/admin/fournisseur.php b/htdocs/admin/fournisseur.php
index 64abda9ce27..efc3b826b2a 100644
--- a/htdocs/admin/fournisseur.php
+++ b/htdocs/admin/fournisseur.php
@@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php');
require_once(DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php');
$langs->load("admin");
+$langs->load('other');
if (!$user->admin)
accessforbidden();
diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php
index 01b60b15c97..f23b73a766d 100644
--- a/htdocs/admin/livraison.php
+++ b/htdocs/admin/livraison.php
@@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/livraison/class/livraison.class.php");
$langs->load("admin");
$langs->load("sendings");
$langs->load("deliveries");
+$langs->load('other');
if (!$user->admin) accessforbidden();
diff --git a/htdocs/admin/project.php b/htdocs/admin/project.php
index b50c14918c6..ad67ba3a317 100644
--- a/htdocs/admin/project.php
+++ b/htdocs/admin/project.php
@@ -216,7 +216,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '';
$tmp=$module->getExample();
- if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print ' '.$langs->trans($tmp).' '; }
+ if (preg_match('/^Error/',$tmp)) print ''.$langs->trans($tmp).' ';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print ' | '."\n";
diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php
index babbfa8ad32..1d9a4e919a2 100644
--- a/htdocs/admin/propal.php
+++ b/htdocs/admin/propal.php
@@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php");
$langs->load("admin");
$langs->load("errors");
+$langs->load('other');
if (! $user->admin) accessforbidden();
@@ -274,7 +275,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '';
$tmp=$module->getExample();
- if (preg_match('/^Error/',$tmp)) { $langs->load("errors"); print ' '.$langs->trans($tmp).' '; }
+ if (preg_match('/^Error/',$tmp)) print ''.$langs->trans($tmp).' ';
elseif ($tmp=='NotConfigured') print $langs->trans($tmp);
else print $tmp;
print ' | '."\n";
diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php
index aa835cdd96e..a24d7f38d89 100644
--- a/htdocs/admin/syslog.php
+++ b/htdocs/admin/syslog.php
@@ -187,7 +187,7 @@ $var=!$var;
print '| '.$langs->trans("SyslogSyslog").' | ';
print ''.$langs->trans("SyslogFacility").': ';
print ' | ';
-print "".$form->textwithpicto('','Only LOG_USER supported on Windows');
+print " | ".$form->textwithpicto('', $langs->trans('OnlyWindowsLOG_USER'));
print ' |
';
try
diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php
index d0f6ffecefe..57fab93dc40 100644
--- a/htdocs/admin/system/phpinfo.php
+++ b/htdocs/admin/system/phpinfo.php
@@ -63,17 +63,17 @@ ob_start();
if ($_GET["what"] == 'conf')
{
- $title=$langs->trans("Setup");
+ $title = 'Setup';
phpinfo(INFO_CONFIGURATION);
}
elseif ($_GET["what"] == 'env')
{
- $title=$langs->trans("OSEnv");
+ $title = 'OSEnv';
phpinfo(INFO_ENVIRONMENT);
}
elseif ($_GET["what"] == 'modules')
{
- $title=$langs->trans("Modules");
+ $title = 'Modules';
phpinfo(INFO_MODULES);
}
else
@@ -85,37 +85,29 @@ $chaine = ob_get_contents();
ob_end_clean();
// Nettoie la sortie php pour inclusion dans une page deja existante
-$chaine = preg_replace('/background-color: #ffffff;/i','',$chaine);
-$chaine = preg_replace('/(.*)