Passed
Branch develop (66e4de)
by Laurent
33:03
created
htdocs/categories/admin/categorie.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,8 +27,9 @@
 block discarded – undo
27 27
 require_once DOL_DOCUMENT_ROOT.'/core/lib/categories.lib.php';
28 28
 
29 29
 
30
-if (!$user->admin)
31
-accessforbidden();
30
+if (!$user->admin) {
31
+	accessforbidden();
32
+}
32 33
 
33 34
 // Load translation files required by the page
34 35
 $langs->loadLangs(array("categories", "admin"));
Please login to merge, or discard this patch.
htdocs/bom/tpl/objectline_create.tpl.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,7 +38,9 @@  discard block
 block discarded – undo
38 38
 
39 39
 global $forceall, $forcetoshowtitlelines;
40 40
 
41
-if (empty($forceall)) $forceall = 0;
41
+if (empty($forceall)) {
42
+	$forceall = 0;
43
+}
42 44
 
43 45
 
44 46
 // Define colspan for the button 'Add'
@@ -89,10 +91,14 @@  discard block
 block discarded – undo
89 91
 // Predefined product/service
90 92
 if (!empty($conf->product->enabled) || !empty($conf->service->enabled))
91 93
 {
92
-	if ($forceall >= 0 && $freelines) echo '<br>';
94
+	if ($forceall >= 0 && $freelines) {
95
+		echo '<br>';
96
+	}
93 97
 	echo '<span class="prod_entry_mode_predef">';
94 98
 	$filtertype = '';
95
-	if (!empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) $filtertype = '1';
99
+	if (!empty($object->element) && $object->element == 'contrat' && empty($conf->global->CONTRACT_SUPPORT_PRODUCTS)) {
100
+		$filtertype = '1';
101
+	}
96 102
 
97 103
 	$statustoshow = -1;
98 104
 	if (!empty($conf->global->ENTREPOT_EXTRA_STATUS))
Please login to merge, or discard this patch.
htdocs/asterisk/wrapper.php 1 patch
Braces   +48 added lines, -16 removed lines patch added patch discarded remove patch
@@ -28,13 +28,27 @@  discard block
 block discarded – undo
28 28
  * 				write = system,call,log,verbose,command,agent,user
29 29
  */
30 30
 
31
-if (!defined('NOREQUIRESOC'))    define('NOREQUIRESOC', '1');
32
-if (!defined('NOREQUIRETRAN'))   define('NOREQUIRETRAN', '1');
33
-if (!defined('NOCSRFCHECK'))     define('NOCSRFCHECK', '1');
34
-if (!defined('NOTOKENRENEWAL'))  define('NOTOKENRENEWAL', '1');
35
-if (!defined('NOREQUIREMENU'))   define('NOREQUIREMENU', '1');
36
-if (!defined('NOREQUIREHTML'))   define('NOREQUIREHTML', '1');
37
-if (!defined('NOREQUIREAJAX'))   define('NOREQUIREAJAX', '1');
31
+if (!defined('NOREQUIRESOC')) {
32
+	define('NOREQUIRESOC', '1');
33
+}
34
+if (!defined('NOREQUIRETRAN')) {
35
+	define('NOREQUIRETRAN', '1');
36
+}
37
+if (!defined('NOCSRFCHECK')) {
38
+	define('NOCSRFCHECK', '1');
39
+}
40
+if (!defined('NOTOKENRENEWAL')) {
41
+	define('NOTOKENRENEWAL', '1');
42
+}
43
+if (!defined('NOREQUIREMENU')) {
44
+	define('NOREQUIREMENU', '1');
45
+}
46
+if (!defined('NOREQUIREHTML')) {
47
+	define('NOREQUIREHTML', '1');
48
+}
49
+if (!defined('NOREQUIREAJAX')) {
50
+	define('NOREQUIREAJAX', '1');
51
+}
38 52
 
39 53
 /**
40 54
  * Empty header
@@ -75,15 +89,33 @@  discard block
 block discarded – undo
75 89
 
76 90
 
77 91
 // Define Asterisk setup
78
-if (!isset($conf->global->ASTERISK_HOST))      $conf->global->ASTERISK_HOST = "127.0.0.1";
79
-if (!isset($conf->global->ASTERISK_TYPE))      $conf->global->ASTERISK_TYPE = "SIP/";
80
-if (!isset($conf->global->ASTERISK_INDICATIF)) $conf->global->ASTERISK_INDICATIF = "0";
81
-if (!isset($conf->global->ASTERISK_PORT))      $conf->global->ASTERISK_PORT = 5038;
82
-if ($conf->global->ASTERISK_INDICATIF == 'NONE')  $conf->global->ASTERISK_INDICATIF = '';
83
-if (!isset($conf->global->ASTERISK_CONTEXT))   $conf->global->ASTERISK_CONTEXT = "from-internal";
84
-if (!isset($conf->global->ASTERISK_WAIT_TIME)) $conf->global->ASTERISK_WAIT_TIME = "30";
85
-if (!isset($conf->global->ASTERISK_PRIORITY))  $conf->global->ASTERISK_PRIORITY = "1";
86
-if (!isset($conf->global->ASTERISK_MAX_RETRY)) $conf->global->ASTERISK_MAX_RETRY = "2";
92
+if (!isset($conf->global->ASTERISK_HOST)) {
93
+	$conf->global->ASTERISK_HOST = "127.0.0.1";
94
+}
95
+if (!isset($conf->global->ASTERISK_TYPE)) {
96
+	$conf->global->ASTERISK_TYPE = "SIP/";
97
+}
98
+if (!isset($conf->global->ASTERISK_INDICATIF)) {
99
+	$conf->global->ASTERISK_INDICATIF = "0";
100
+}
101
+if (!isset($conf->global->ASTERISK_PORT)) {
102
+	$conf->global->ASTERISK_PORT = 5038;
103
+}
104
+if ($conf->global->ASTERISK_INDICATIF == 'NONE') {
105
+	$conf->global->ASTERISK_INDICATIF = '';
106
+}
107
+if (!isset($conf->global->ASTERISK_CONTEXT)) {
108
+	$conf->global->ASTERISK_CONTEXT = "from-internal";
109
+}
110
+if (!isset($conf->global->ASTERISK_WAIT_TIME)) {
111
+	$conf->global->ASTERISK_WAIT_TIME = "30";
112
+}
113
+if (!isset($conf->global->ASTERISK_PRIORITY)) {
114
+	$conf->global->ASTERISK_PRIORITY = "1";
115
+}
116
+if (!isset($conf->global->ASTERISK_MAX_RETRY)) {
117
+	$conf->global->ASTERISK_MAX_RETRY = "2";
118
+}
87 119
 
88 120
 
89 121
 $login = GETPOST('login');
Please login to merge, or discard this patch.
htdocs/admin/ecm.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,9 @@
 block discarded – undo
28 28
 // Load translation files required by the page
29 29
 $langs->load("admin");
30 30
 
31
-if (!$user->admin) accessforbidden();
31
+if (!$user->admin) {
32
+	accessforbidden();
33
+}
32 34
 
33 35
 
34 36
 /*
Please login to merge, or discard this patch.
htdocs/admin/system/dbtable.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@  discard block
 block discarded – undo
28 28
 
29 29
 $langs->load("admin");
30 30
 
31
-if (!$user->admin)
31
+if (!$user->admin) {
32 32
 	accessforbidden();
33
+}
33 34
 
34 35
 $table = GETPOST('table', 'alpha');
35 36
 
@@ -71,9 +72,11 @@  discard block
 block discarded – undo
71 72
 		}
72 73
 	}
73 74
 
74
-	if ($base == 1)	// mysql
75
+	if ($base == 1) {
76
+		// mysql
75 77
 	{
76 78
 		$link = array();
79
+	}
77 80
 		$cons = explode(";", $row[14]);
78 81
 		if (!empty($cons))
79 82
 		{
Please login to merge, or discard this patch.
htdocs/admin/system/constall.php 1 patch
Braces   +30 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,8 +28,9 @@  discard block
 block discarded – undo
28 28
 $langs->loadLangs(array("install", "user", "admin"));
29 29
 
30 30
 
31
-if (!$user->admin)
31
+if (!$user->admin) {
32 32
   accessforbidden();
33
+}
33 34
 
34 35
 
35 36
 /*
@@ -150,8 +151,12 @@  discard block
 block discarded – undo
150 151
 {
151 152
 	$ignore = 0;
152 153
 
153
-	if ($key == 'dolibarr_main_url_root_alt' && empty(${$key})) $ignore = 1;
154
-	if ($key == 'dolibarr_main_document_root_alt' && empty(${$key})) $ignore = 1;
154
+	if ($key == 'dolibarr_main_url_root_alt' && empty(${$key})) {
155
+		$ignore = 1;
156
+	}
157
+	if ($key == 'dolibarr_main_document_root_alt' && empty(${$key})) {
158
+		$ignore = 1;
159
+	}
155 160
 
156 161
 	if (empty($ignore))
157 162
 	{
@@ -180,10 +185,16 @@  discard block
 block discarded – undo
180 185
 			print '<td>'.$newkey.'</td>';
181 186
 			// Value
182 187
 			print "<td>";
183
-			if ($newkey == 'dolibarr_main_db_pass') print preg_replace('/./i', '*', ${$newkey});
184
-			elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/', ${$newkey})) print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
185
-			else print ${$newkey};
186
-			if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
188
+			if ($newkey == 'dolibarr_main_db_pass') {
189
+				print preg_replace('/./i', '*', ${$newkey});
190
+			} elseif ($newkey == 'dolibarr_main_url_root' && preg_match('/__auto__/', ${$newkey})) {
191
+				print ${$newkey}.' => '.constant('DOL_MAIN_URL_ROOT');
192
+			} else {
193
+				print ${$newkey};
194
+			}
195
+			if ($newkey == 'dolibarr_main_url_root' && ${$newkey} != DOL_MAIN_URL_ROOT) {
196
+				print ' (currently overwritten by autodetected value: '.DOL_MAIN_URL_ROOT.')';
197
+			}
187 198
 			print "</td>";
188 199
 		}
189 200
 		print "</tr>\n";
@@ -202,7 +213,10 @@  discard block
 block discarded – undo
202 213
 print '<tr class="liste_titre">';
203 214
 print '<td>'.$langs->trans("Parameter").'</td>';
204 215
 print '<td>'.$langs->trans("Value").'</td>';
205
-if (empty($conf->multicompany->enabled) || !$user->entity) print '<td>'.$langs->trans("Entity").'</td>'; // If superadmin or multicompany disabled
216
+if (empty($conf->multicompany->enabled) || !$user->entity) {
217
+	print '<td>'.$langs->trans("Entity").'</td>';
218
+}
219
+// If superadmin or multicompany disabled
206 220
 print "</tr>\n";
207 221
 
208 222
 $sql = "SELECT";
@@ -219,8 +233,10 @@  discard block
 block discarded – undo
219 233
 	$sql .= " WHERE entity IN (0,".$conf->entity.")";
220 234
 } else {
221 235
 	// If multicompany mode, superadmin (user->entity=0) can see everything, admin are limited to their entities.
222
-	if ($user->entity) $sql .= " WHERE entity IN (".$user->entity.",".$conf->entity.")";
223
-}
236
+	if ($user->entity) {
237
+		$sql .= " WHERE entity IN (".$user->entity.",".$conf->entity.")";
238
+	}
239
+	}
224 240
 $sql .= " ORDER BY entity, name ASC";
225 241
 $resql = $db->query($sql);
226 242
 if ($resql)
@@ -235,7 +251,10 @@  discard block
 block discarded – undo
235 251
 		print '<tr class="oddeven">';
236 252
 		print '<td>'.$obj->name.'</td>'."\n";
237 253
 		print '<td>'.$obj->value.'</td>'."\n";
238
-		if (empty($conf->multicompany->enabled) || !$user->entity) print '<td>'.$obj->entity.'</td>'."\n"; // If superadmin or multicompany disabled
254
+		if (empty($conf->multicompany->enabled) || !$user->entity) {
255
+			print '<td>'.$obj->entity.'</td>'."\n";
256
+		}
257
+		// If superadmin or multicompany disabled
239 258
 		print "</tr>\n";
240 259
 
241 260
 		$i++;
Please login to merge, or discard this patch.
htdocs/admin/system/xdebug.php 1 patch
Braces   +11 added lines, -5 removed lines patch added patch discarded remove patch
@@ -24,8 +24,9 @@  discard block
 block discarded – undo
24 24
 
25 25
 $langs->load("admin");
26 26
 
27
-if (!$user->admin)
28
-accessforbidden();
27
+if (!$user->admin) {
28
+	accessforbidden();
29
+}
29 30
 
30 31
 
31 32
 /*
@@ -58,8 +59,11 @@  discard block
 block discarded – undo
58 59
 	print 'xdebug.remote_host = '.$address."<br>\n";
59 60
 	print 'xdebug.remote_port = '.$port."<br>\n";
60 61
 	print "* Profiler setup ";
61
-	if (function_exists('xdebug_get_profiler_filename')) print xdebug_get_profiler_filename() ? "(currently on into file ".xdebug_get_profiler_filename().")" : "(currently off)";
62
-	else print "(currenlty not available)";
62
+	if (function_exists('xdebug_get_profiler_filename')) {
63
+		print xdebug_get_profiler_filename() ? "(currently on into file ".xdebug_get_profiler_filename().")" : "(currently off)";
64
+	} else {
65
+		print "(currenlty not available)";
66
+	}
63 67
 	print ":<br>\n";
64 68
 	print 'xdebug.profiler_enable = '.ini_get('xdebug.profiler_enable')."<br>\n";
65 69
 	print 'xdebug.profiler_enable_trigger = '.ini_get('xdebug.profiler_enable_trigger')."<br>\n";
@@ -76,7 +80,9 @@  discard block
 block discarded – undo
76 80
 
77 81
 	print "<strong>Test debugger server (Eclipse for example):</strong><br>\n";
78 82
 	$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
79
-	if (empty($socket)) die('Unable to prepare a socket');
83
+	if (empty($socket)) {
84
+		die('Unable to prepare a socket');
85
+	}
80 86
 	//socket_bind($sock, $address, $port) or die('Unable to bind on address='.$address.' port='.$port);
81 87
 	//socket_listen($sock);
82 88
 	//$client = socket_accept($sock);
Please login to merge, or discard this patch.
htdocs/admin/system/database.php 1 patch
Braces   +21 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,9 @@  discard block
 block discarded – undo
27 27
 
28 28
 $langs->load("admin");
29 29
 
30
-if (!$user->admin) accessforbidden();
30
+if (!$user->admin) {
31
+	accessforbidden();
32
+}
31 33
 
32 34
 
33 35
 
@@ -95,8 +97,12 @@  discard block
 block discarded – undo
95 97
 		}
96 98
 
97 99
 		$listtouse = array();
98
-		if ($listname == 'listofvars') $listtouse = $listofvars;
99
-		if ($listname == 'listofstatus') $listtouse = $listofstatus;
100
+		if ($listname == 'listofvars') {
101
+			$listtouse = $listofvars;
102
+		}
103
+		if ($listname == 'listofstatus') {
104
+			$listtouse = $listofstatus;
105
+		}
100 106
 
101 107
 		foreach ($listtouse as $param => $paramval)
102 108
 		{
@@ -108,14 +114,22 @@  discard block
 block discarded – undo
108 114
 			$show = 0; $text = '';
109 115
 			foreach ($arraytest as $key => $val)
110 116
 			{
111
-				if ($key != $param) continue;
117
+				if ($key != $param) {
118
+					continue;
119
+				}
112 120
 				$val2 = ${$val['var']};
113 121
 				$text = 'Should be in line with value of param <b>'.$val['var'].'</b> thas is <b>'.($val2 ? $val2 : "'' (=".$val['valifempty'].")").'</b>';
114 122
 				$show = 1;
115 123
 			}
116
-			if ($show == 0) print $paramval;
117
-			if ($show == 1) print $form->textwithpicto($paramval, $text);
118
-			if ($show == 2) print $form->textwithpicto($paramval, $text, 1, 'warning');
124
+			if ($show == 0) {
125
+				print $paramval;
126
+			}
127
+			if ($show == 1) {
128
+				print $form->textwithpicto($paramval, $text);
129
+			}
130
+			if ($show == 2) {
131
+				print $form->textwithpicto($paramval, $text, 1, 'warning');
132
+			}
119 133
 			print '</td>';
120 134
 			print '</tr>'."\n";
121 135
 		}
Please login to merge, or discard this patch.
htdocs/admin/ldap_members.php 1 patch
Braces   +98 added lines, -33 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@  discard block
 block discarded – undo
36 36
 // Load translation files required by the page
37 37
 $langs->loadLangs(array('admin', 'errors'));
38 38
 
39
-if (!$user->admin)
39
+if (!$user->admin) {
40 40
   accessforbidden();
41
+}
41 42
 
42 43
 $action = GETPOST('action', 'aZ09');
43 44
 
@@ -51,45 +52,109 @@  discard block
 block discarded – undo
51 52
 
52 53
 	$db->begin();
53 54
 
54
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_DN', GETPOST("user"), 'chaine', 0, '', $conf->entity)) $error++;
55
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) $error++;
56
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FILTER', GETPOST("filterconnection"), 'chaine', 0, '', $conf->entity)) $error++;
55
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_DN', GETPOST("user"), 'chaine', 0, '', $conf->entity)) {
56
+		$error++;
57
+	}
58
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_OBJECT_CLASS', GETPOST("objectclass"), 'chaine', 0, '', $conf->entity)) {
59
+		$error++;
60
+	}
61
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FILTER', GETPOST("filterconnection"), 'chaine', 0, '', $conf->entity)) {
62
+		$error++;
63
+	}
57 64
 	// Members
58
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) $error++;
59
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_LOGIN', GETPOST("fieldlogin"), 'chaine', 0, '', $conf->entity)) $error++;
60
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_LOGIN_SAMBA', GETPOST("fieldloginsamba"), 'chaine', 0, '', $conf->entity)) $error++;
61
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PASSWORD', GETPOST("fieldpassword"), 'chaine', 0, '', $conf->entity)) $error++;
62
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PASSWORD_CRYPTED', GETPOST("fieldpasswordcrypted"), 'chaine', 0, '', $conf->entity)) $error++;
63
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_NAME', GETPOST("fieldname"), 'chaine', 0, '', $conf->entity)) $error++;
64
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FIRSTNAME', GETPOST("fieldfirstname"), 'chaine', 0, '', $conf->entity)) $error++;
65
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MAIL', GETPOST("fieldmail"), 'chaine', 0, '', $conf->entity)) $error++;
66
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE', GETPOST("fieldphone"), 'chaine', 0, '', $conf->entity)) $error++;
67
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE_PERSO', GETPOST("fieldphoneperso"), 'chaine', 0, '', $conf->entity)) $error++;
68
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MOBILE', GETPOST("fieldmobile"), 'chaine', 0, '', $conf->entity)) $error++;
69
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_SKYPE', GETPOST("fieldskype"), 'chaine', 0, '', $conf->entity)) $error++;
70
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FAX', GETPOST("fieldfax"), 'chaine', 0, '', $conf->entity)) $error++;
71
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_COMPANY', GETPOST("fieldcompany"), 'chaine', 0, '', $conf->entity)) $error++;
72
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ADDRESS', GETPOST("fieldaddress"), 'chaine', 0, '', $conf->entity)) $error++;
73
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ZIP', GETPOST("fieldzip"), 'chaine', 0, '', $conf->entity)) $error++;
74
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_TOWN', GETPOST("fieldtown"), 'chaine', 0, '', $conf->entity)) $error++;
75
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_COUNTRY', GETPOST("fieldcountry"), 'chaine', 0, '', $conf->entity)) $error++;
76
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_DESCRIPTION', GETPOST("fielddescription"), 'chaine', 0, '', $conf->entity)) $error++;
77
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_NOTE_PUBLIC', GETPOST("fieldnotepublic"), 'chaine', 0, '', $conf->entity)) $error++;
78
-	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_BIRTHDATE', GETPOST("fieldbirthdate"), 'chaine', 0, '', $conf->entity)) $error++;
79
-	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_STATUS', GETPOST("fieldstatus"), 'chaine', 0, '', $conf->entity)) $error++;
80
-	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION', GETPOST("fieldendlastsubscription"), 'chaine', 0, '', $conf->entity)) $error++;
65
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FULLNAME', GETPOST("fieldfullname"), 'chaine', 0, '', $conf->entity)) {
66
+		$error++;
67
+	}
68
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_LOGIN', GETPOST("fieldlogin"), 'chaine', 0, '', $conf->entity)) {
69
+		$error++;
70
+	}
71
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_LOGIN_SAMBA', GETPOST("fieldloginsamba"), 'chaine', 0, '', $conf->entity)) {
72
+		$error++;
73
+	}
74
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PASSWORD', GETPOST("fieldpassword"), 'chaine', 0, '', $conf->entity)) {
75
+		$error++;
76
+	}
77
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PASSWORD_CRYPTED', GETPOST("fieldpasswordcrypted"), 'chaine', 0, '', $conf->entity)) {
78
+		$error++;
79
+	}
80
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_NAME', GETPOST("fieldname"), 'chaine', 0, '', $conf->entity)) {
81
+		$error++;
82
+	}
83
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FIRSTNAME', GETPOST("fieldfirstname"), 'chaine', 0, '', $conf->entity)) {
84
+		$error++;
85
+	}
86
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MAIL', GETPOST("fieldmail"), 'chaine', 0, '', $conf->entity)) {
87
+		$error++;
88
+	}
89
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE', GETPOST("fieldphone"), 'chaine', 0, '', $conf->entity)) {
90
+		$error++;
91
+	}
92
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_PHONE_PERSO', GETPOST("fieldphoneperso"), 'chaine', 0, '', $conf->entity)) {
93
+		$error++;
94
+	}
95
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_MOBILE', GETPOST("fieldmobile"), 'chaine', 0, '', $conf->entity)) {
96
+		$error++;
97
+	}
98
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_SKYPE', GETPOST("fieldskype"), 'chaine', 0, '', $conf->entity)) {
99
+		$error++;
100
+	}
101
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_FAX', GETPOST("fieldfax"), 'chaine', 0, '', $conf->entity)) {
102
+		$error++;
103
+	}
104
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_COMPANY', GETPOST("fieldcompany"), 'chaine', 0, '', $conf->entity)) {
105
+		$error++;
106
+	}
107
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ADDRESS', GETPOST("fieldaddress"), 'chaine', 0, '', $conf->entity)) {
108
+		$error++;
109
+	}
110
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_ZIP', GETPOST("fieldzip"), 'chaine', 0, '', $conf->entity)) {
111
+		$error++;
112
+	}
113
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_TOWN', GETPOST("fieldtown"), 'chaine', 0, '', $conf->entity)) {
114
+		$error++;
115
+	}
116
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_COUNTRY', GETPOST("fieldcountry"), 'chaine', 0, '', $conf->entity)) {
117
+		$error++;
118
+	}
119
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_DESCRIPTION', GETPOST("fielddescription"), 'chaine', 0, '', $conf->entity)) {
120
+		$error++;
121
+	}
122
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_NOTE_PUBLIC', GETPOST("fieldnotepublic"), 'chaine', 0, '', $conf->entity)) {
123
+		$error++;
124
+	}
125
+	if (!dolibarr_set_const($db, 'LDAP_MEMBER_FIELD_BIRTHDATE', GETPOST("fieldbirthdate"), 'chaine', 0, '', $conf->entity)) {
126
+		$error++;
127
+	}
128
+	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_STATUS', GETPOST("fieldstatus"), 'chaine', 0, '', $conf->entity)) {
129
+		$error++;
130
+	}
131
+	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_END_LASTSUBSCRIPTION', GETPOST("fieldendlastsubscription"), 'chaine', 0, '', $conf->entity)) {
132
+		$error++;
133
+	}
81 134
 
82 135
 	// Subscriptions
83
-	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE', GETPOST("fieldfirstsubscriptiondate"), 'chaine', 0, '', $conf->entity)) $error++;
84
-	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT', GETPOST("fieldfirstsubscriptionamount"), 'chaine', 0, '', $conf->entity)) $error++;
85
-	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE', GETPOST("fieldlastsubscriptiondate"), 'chaine', 0, '', $conf->entity)) $error++;
86
-	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT', GETPOST("fieldlastsubscriptionamount"), 'chaine', 0, '', $conf->entity)) $error++;
136
+	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_DATE', GETPOST("fieldfirstsubscriptiondate"), 'chaine', 0, '', $conf->entity)) {
137
+		$error++;
138
+	}
139
+	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_FIRSTSUBSCRIPTION_AMOUNT', GETPOST("fieldfirstsubscriptionamount"), 'chaine', 0, '', $conf->entity)) {
140
+		$error++;
141
+	}
142
+	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_DATE', GETPOST("fieldlastsubscriptiondate"), 'chaine', 0, '', $conf->entity)) {
143
+		$error++;
144
+	}
145
+	if (!dolibarr_set_const($db, 'LDAP_FIELD_MEMBER_LASTSUBSCRIPTION_AMOUNT', GETPOST("fieldlastsubscriptionamount"), 'chaine', 0, '', $conf->entity)) {
146
+		$error++;
147
+	}
87 148
 
88 149
 	// This one must be after the others
89 150
 	$valkey = '';
90 151
 	$key = GETPOST("key");
91
-	if ($key) $valkey = $conf->global->$key;
92
-	if (!dolibarr_set_const($db, 'LDAP_KEY_MEMBERS', $valkey, 'chaine', 0, '', $conf->entity)) $error++;
152
+	if ($key) {
153
+		$valkey = $conf->global->$key;
154
+	}
155
+	if (!dolibarr_set_const($db, 'LDAP_KEY_MEMBERS', $valkey, 'chaine', 0, '', $conf->entity)) {
156
+		$error++;
157
+	}
93 158
 
94 159
 	if (!$error)
95 160
 	{
Please login to merge, or discard this patch.