diff --git a/dev/initdata/generate-product.php b/dev/initdata/generate-product.php
index e9703fbfd6e..83951c57df7 100755
--- a/dev/initdata/generate-product.php
+++ b/dev/initdata/generate-product.php
@@ -61,8 +61,8 @@ $user->getrights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql);
if ($resql) {
- $num = $db->num_rows($resql); $i = 0;
- while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
+ $num = $db->num_rows($resql); $i = 0;
+ while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
}
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php
index f1e0f4f360b..9f740b5705d 100755
--- a/dev/initdata/generate-thirdparty.php
+++ b/dev/initdata/generate-thirdparty.php
@@ -64,22 +64,34 @@ $user->getrights();
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product"; $productsid = array();
$resql=$db->query($sql);
if ($resql) {
- $num = $db->num_rows($resql); $i = 0;
- while ($i < $num) { $row = $db->fetch_row($resql); $productsid[$i] = $row[0]; $i++; }
+ $num = $db->num_rows($resql); $i = 0;
+ while ($i < $num) {
+ $row = $db->fetch_row($resql);
+ $productsid[$i] = $row[0];
+ $i++;
+ }
}
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe"; $societesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql); $i = 0;
- while ($i < $num) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; $i++; }
+ while ($i < $num) {
+ $row = $db->fetch_row($resql);
+ $societesid[$i] = $row[0];
+ $i++;
+ }
} else { print "err"; }
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; $commandesid = array();
$resql=$db->query($sql);
if ($resql) {
$num = $db->num_rows($resql); $i = 0;
- while ($i < $num) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; $i++; }
+ while ($i < $num) {
+ $row = $db->fetch_row($resql);
+ $commandesid[$i] = $row[0];
+ $i++;
+ }
} else { print "err"; }
diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml
index 8c01eea6d99..015733ed95f 100644
--- a/dev/setup/codesniffer/ruleset.xml
+++ b/dev/setup/codesniffer/ruleset.xml
@@ -186,7 +186,7 @@
-
+
diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php
index 7f095a744db..f568ba2b04b 100755
--- a/dev/translation/sanity_check_en_langfiles.php
+++ b/dev/translation/sanity_check_en_langfiles.php
@@ -149,9 +149,9 @@ foreach ($langstrings_3d AS $filename => $file)
$keys = array_keys($langstrings_full, $value);
if (count($keys)>1)
{
- foreach ($keys AS $key) {
- $dups[$value][$filename][$linenum] = trim($langstrings_3dtrans[$filename][$linenum]);
- }
+ foreach ($keys AS $key) {
+ $dups[$value][$filename][$linenum] = trim($langstrings_3dtrans[$filename][$linenum]);
+ }
}
}
}
diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php
index ead5e767243..97392b902bc 100644
--- a/htdocs/adherents/admin/website.php
+++ b/htdocs/adherents/admin/website.php
@@ -178,7 +178,7 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC))
$listofval = array(-1 => $langs->trans("Undefined"));
$listofval += $adht->liste_array();
$forcetype = $conf->global->MEMBER_NEWFORM_FORCETYPE ?: -1;
- print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, count($listetype)>1?1:0);
+ print $form->selectarray("MEMBER_NEWFORM_FORCETYPE", $listofval, $forcetype, count($listofval)>1?1:0);
print "\n";
// Amount
diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php
index 3ac400509c9..e9b1a5e4de8 100644
--- a/htdocs/adherents/class/adherent.class.php
+++ b/htdocs/adherents/class/adherent.class.php
@@ -2177,6 +2177,10 @@ class Adherent extends CommonObject
global $langs;
$langs->load("members");
+ $statusType = '';
+ $labelstatut = '';
+ $labelstatutShort = '';
+
if ($statut == -1)
{
$statusType = 'status0';
diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php
index f8f21d2868a..3f3c77568c2 100644
--- a/htdocs/adherents/index.php
+++ b/htdocs/adherents/index.php
@@ -140,6 +140,7 @@ if (! empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is usele
{
print '
';
print '
';
}
diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php
index de9d1677932..c39cc385313 100644
--- a/htdocs/admin/modulehelp.php
+++ b/htdocs/admin/modulehelp.php
@@ -214,15 +214,17 @@ asort($orders);
//var_dump($modules);
+unset($objMod);
$i=0;
foreach($orders as $tmpkey => $tmpvalue)
{
- $objMod = $modules[$tmpkey];
- if ($objMod->numero == $id)
+ $tmpMod = $modules[$tmpkey];
+ if ($tmpMod->numero == $id)
{
$key = $i;
$modName = $filename[$tmpkey];
$dirofmodule = $dirmod[$tmpkey];
+ $objMod = $tmpMod;
break;
}
$i++;
@@ -233,25 +235,7 @@ $familyposition=$tab[0]; $familykey=$tab[1]; $module_position=$tab[2]; $numero=$
-$h = 0;
-
-$head[$h][0] = DOL_URL_ROOT."/admin/modulehelp.php?id=".$id.'&mode=desc';
-$head[$h][1] = $langs->trans("Description");
-$head[$h][2] = 'desc';
-$h++;
-
-$head[$h][0] = DOL_URL_ROOT."/admin/modulehelp.php?id=".$id.'&mode=feature';
-$head[$h][1] = $langs->trans("TechnicalServicesProvided");
-$head[$h][2] = 'feature';
-$h++;
-
-if ($objMod->isCoreOrExternalModule() == 'external')
-{
- $head[$h][0] = DOL_URL_ROOT."/admin/modulehelp.php?id=".$id.'&mode=changelog';
- $head[$h][1] = $langs->trans("ChangeLog");
- $head[$h][2] = 'changelog';
- $h++;
-}
+$head = modulehelp_prepare_head($objMod);
// Check filters
$modulename=$objMod->getName();
diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php
index abcb3145a80..2a5758e61d2 100644
--- a/htdocs/bookmarks/bookmarks.lib.php
+++ b/htdocs/bookmarks/bookmarks.lib.php
@@ -70,7 +70,7 @@ function printBookmarksList()
$ret.= '