Completed
Branch develop (f5af02)
by
unknown
17:35
created
dev/initdata/import-products.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -28,27 +28,27 @@  discard block
 block discarded – undo
28 28
 // Test si mode batch
29 29
 $sapi_type = php_sapi_name();
30 30
 $script_file = basename(__FILE__);
31
-$path=dirname(__FILE__).'/';
31
+$path = dirname(__FILE__).'/';
32 32
 if (substr($sapi_type, 0, 3) == 'cgi') {
33 33
 	echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
34 34
 	exit;
35 35
 }
36 36
 
37 37
 // Recupere root dolibarr
38
-$path=preg_replace('/import-products.php/i', '', $_SERVER["PHP_SELF"]);
38
+$path = preg_replace('/import-products.php/i', '', $_SERVER["PHP_SELF"]);
39 39
 require $path."../../htdocs/master.inc.php";
40 40
 include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
41 41
 include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
42 42
 
43
-$delimiter=',';
44
-$enclosure='"';
45
-$linelength=10000;
46
-$escape='/';
43
+$delimiter = ',';
44
+$enclosure = '"';
45
+$linelength = 10000;
46
+$escape = '/';
47 47
 
48 48
 // Global variables
49
-$version=DOL_VERSION;
50
-$confirmed=1;
51
-$error=0;
49
+$version = DOL_VERSION;
50
+$confirmed = 1;
51
+$error = 0;
52 52
 
53 53
 
54 54
 /*
@@ -62,43 +62,43 @@  discard block
 block discarded – undo
62 62
 $mode = $argv[1];
63 63
 $filepath = $argv[2];
64 64
 $filepatherr = $filepath.'.err';
65
-$defaultlang = empty($argv[3])?'en_US':$argv[3];
66
-$startlinenb = empty($argv[4])?1:$argv[4];
67
-$endlinenb = empty($argv[5])?0:$argv[5];
65
+$defaultlang = empty($argv[3]) ? 'en_US' : $argv[3];
66
+$startlinenb = empty($argv[4]) ? 1 : $argv[4];
67
+$endlinenb = empty($argv[5]) ? 0 : $argv[5];
68 68
 
69
-if (empty($mode) || ! in_array($mode, array('test','confirm','confirmforced')) || empty($filepath)) {
69
+if (empty($mode) || !in_array($mode, array('test', 'confirm', 'confirmforced')) || empty($filepath)) {
70 70
 	print "Usage:  $script_file (test|confirm|confirmforced) filepath.csv [defaultlang] [startlinenb] [endlinenb]\n";
71 71
 	print "Usage:  $script_file test myfilepath.csv fr_FR 2 1002\n";
72 72
 	print "\n";
73 73
 	exit(-1);
74 74
 }
75
-if (! file_exists($filepath)) {
75
+if (!file_exists($filepath)) {
76 76
 	print "Error: File ".$filepath." not found.\n";
77 77
 	print "\n";
78 78
 	exit(-1);
79 79
 }
80 80
 
81
-$ret=$user->fetch('', 'admin');
82
-if (! $ret > 0) {
81
+$ret = $user->fetch('', 'admin');
82
+if (!$ret > 0) {
83 83
 	print 'A user with login "admin" and all permissions must be created to use this script.'."\n";
84 84
 	exit;
85 85
 }
86 86
 $user->getrights();
87 87
 
88 88
 // Ask confirmation
89
-if (! $confirmed) {
89
+if (!$confirmed) {
90 90
 	print "Hit Enter to continue or CTRL+C to stop...\n";
91 91
 	$input = trim(fgets(STDIN));
92 92
 }
93 93
 
94 94
 // Open input and output files
95 95
 $fhandle = fopen($filepath, 'r');
96
-if (! $fhandle) {
96
+if (!$fhandle) {
97 97
 	print 'Error: Failed to open file '.$filepath."\n";
98 98
 	exit(1);
99 99
 }
100 100
 $fhandleerr = fopen($filepatherr, 'w');
101
-if (! $fhandleerr) {
101
+if (!$fhandleerr) {
102 102
 	print 'Error: Failed to open file '.$filepatherr."\n";
103 103
 	exit(1);
104 104
 }
@@ -108,11 +108,11 @@  discard block
 block discarded – undo
108 108
 
109 109
 $db->begin();
110 110
 
111
-$i=0;
111
+$i = 0;
112 112
 $nboflines++;
113
-while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) {
113
+while ($fields = fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) {
114 114
 	$i++;
115
-	$errorrecord=0;
115
+	$errorrecord = 0;
116 116
 
117 117
 	if ($startlinenb && $i < $startlinenb) {
118 118
 		continue;
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 	$produit->volume = price2num($fields[8]);
135 135
 	$produit->volume_unit = 0;
136 136
 	$produit->weight = price2num($fields[9]);
137
-	$produit->weight_units = 0;          // -3 = g
137
+	$produit->weight_units = 0; // -3 = g
138 138
 
139 139
 	$produit->customcode = $fields[10];
140 140
 	$produit->barcode = $fields[1];
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 	$produit->cost_price = price2num($fields[16]);
156 156
 
157 157
 	// Extrafields
158
-	$produit->array_options['options_ecotaxdeee']=price2num($fields[17]);
158
+	$produit->array_options['options_ecotaxdeee'] = price2num($fields[17]);
159 159
 
160
-	$ret=$produit->create($user);
160
+	$ret = $produit->create($user);
161 161
 	if ($ret < 0) {
162 162
 		print " - Error in create result code = ".$ret." - ".$produit->errorsToString();
163 163
 		$errorrecord++;
@@ -168,9 +168,9 @@  discard block
 block discarded – undo
168 168
 	dol_syslog("Add prices");
169 169
 
170 170
 	// If we use price level, insert price for each level
171
-	if (! $errorrecord && 1) {
172
-		$ret1=$produit->updatePrice($produit->price_ttc, $produit->price_base_type, $user, $produit->tva_tx, $produit->price_min, 1, $produit->tva_npr, 0, 0, array());
173
-		$ret2=$produit->updatePrice(price2num($fields[14]), 'HT', $user, $produit->tva_tx, $produit->price_min, 2, $produit->tva_npr, 0, 0, array());
171
+	if (!$errorrecord && 1) {
172
+		$ret1 = $produit->updatePrice($produit->price_ttc, $produit->price_base_type, $user, $produit->tva_tx, $produit->price_min, 1, $produit->tva_npr, 0, 0, array());
173
+		$ret2 = $produit->updatePrice(price2num($fields[14]), 'HT', $user, $produit->tva_tx, $produit->price_min, 2, $produit->tva_npr, 0, 0, array());
174 174
 		if ($ret1 < 0 || $ret2 < 0) {
175 175
 			print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString();
176 176
 			$errorrecord++;
@@ -182,11 +182,11 @@  discard block
 block discarded – undo
182 182
 	dol_syslog("Add multilangs");
183 183
 
184 184
 	// Add alternative languages
185
-	if (! $errorrecord && 1) {
186
-		$produit->multilangs['fr_FR']=array('label'=>$produit->label, 'description'=>$produit->description, 'note'=>$produit->note_private);
187
-		$produit->multilangs['en_US']=array('label'=>$fields[3], 'description'=>$produit->description, 'note'=>$produit->note_private);
185
+	if (!$errorrecord && 1) {
186
+		$produit->multilangs['fr_FR'] = array('label'=>$produit->label, 'description'=>$produit->description, 'note'=>$produit->note_private);
187
+		$produit->multilangs['en_US'] = array('label'=>$fields[3], 'description'=>$produit->description, 'note'=>$produit->note_private);
188 188
 
189
-		$ret=$produit->setMultiLangs($user);
189
+		$ret = $produit->setMultiLangs($user);
190 190
 		if ($ret < 0) {
191 191
 			print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString();
192 192
 			$errorrecord++;
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 
200 200
 	if ($errorrecord) {
201 201
 		fwrite($fhandleerr, 'Error on record nb '.$i." - ".$produit->errorsToString()."\n");
202
-		$error++;    // $errorrecord will be reset
202
+		$error++; // $errorrecord will be reset
203 203
 	}
204 204
 }
205 205
 
Please login to merge, or discard this patch.
htdocs/ticket/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 	accessforbidden();
92 92
 }
93 93
 
94
-$permissiontoadd = $user->rights->ticket->write;	// Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
94
+$permissiontoadd = $user->rights->ticket->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
95 95
 
96 96
 
97 97
 /*
Please login to merge, or discard this patch.
htdocs/ticket/list.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
 			if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
928 928
 				print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
929 929
 			} elseif (strpos($val['type'], 'integer:') === 0) {
930
-				print $object->showInputField($val, $key, !empty($search[$key])?$search[$key]:"", '', '', 'search_', 'maxwidth150', 1);
930
+				print $object->showInputField($val, $key, !empty($search[$key]) ? $search[$key] : "", '', '', 'search_', 'maxwidth150', 1);
931 931
 			} elseif (!preg_match('/^(date|timestamp)/', $val['type'])) {
932 932
 				print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag(empty($search[$key]) ? '' : $search[$key]).'">';
933 933
 			}
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
 	} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
973 973
 		$cssforfield .= ($cssforfield ? ' ' : '').'right';
974 974
 	}
975
-	$cssforfield = preg_replace('/small\s*/', '', $cssforfield);	// the 'small' css must not be used for the title label
975
+	$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
976 976
 	if (!empty($arrayfields['t.'.$key]['checked'])) {
977 977
 		print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n";
978 978
 		$totalarray['nbfield']++;
@@ -1143,20 +1143,20 @@  discard block
 block discarded – undo
1143 1143
 					print $object->showOutputField($val, $key, $obj->$key, '');
1144 1144
 
1145 1145
 					// display a warning on untreated tickets
1146
-					$is_open = ($object->status != Ticket::STATUS_CLOSED && $object->status != Ticket::STATUS_CANCELED );
1146
+					$is_open = ($object->status != Ticket::STATUS_CLOSED && $object->status != Ticket::STATUS_CANCELED);
1147 1147
 					$should_show_warning = (!empty($conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) || !empty($conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE));
1148 1148
 					if ($is_open && $should_show_warning) {
1149 1149
 						$date_last_msg_sent = (int) $object->date_last_msg_sent;
1150
-						$hour_diff = ($now - $date_last_msg_sent) / 3600 ;
1150
+						$hour_diff = ($now - $date_last_msg_sent) / 3600;
1151 1151
 
1152 1152
 						if (!empty($conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE && $date_last_msg_sent == 0)) {
1153
-							$creation_date =  $object->datec;
1154
-							$hour_diff_creation = ($now - $creation_date) / 3600 ;
1153
+							$creation_date = $object->datec;
1154
+							$hour_diff_creation = ($now - $creation_date) / 3600;
1155 1155
 							if ($hour_diff_creation > $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE) {
1156
-								print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayForFirstResponseTooLong', $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE), 'warning', 'style="color: red;"', false, 0, 0, '', '');
1156
+								print " ".img_picto($langs->trans('Late').' : '.$langs->trans('TicketsDelayForFirstResponseTooLong', $conf->global->TICKET_DELAY_BEFORE_FIRST_RESPONSE), 'warning', 'style="color: red;"', false, 0, 0, '', '');
1157 1157
 							}
1158 1158
 						} elseif (!empty($conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) && $hour_diff > $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE) {
1159
-							print " " . img_picto($langs->trans('Late') . ' : ' . $langs->trans('TicketsDelayFromLastResponseTooLong', $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE), 'warning');
1159
+							print " ".img_picto($langs->trans('Late').' : '.$langs->trans('TicketsDelayFromLastResponseTooLong', $conf->global->TICKET_DELAY_SINCE_LAST_RESPONSE), 'warning');
1160 1160
 						}
1161 1161
 					}
1162 1162
 				} else {	// Example: key=fk_soc, obj->key=123 val=array('type'=>'integer', ...
@@ -1246,7 +1246,7 @@  discard block
 block discarded – undo
1246 1246
 
1247 1247
 print '</table>'."\n";
1248 1248
 print '</div>'."\n";
1249
-print '</div>'."\n";	// end div-responsive-inside
1249
+print '</div>'."\n"; // end div-responsive-inside
1250 1250
 
1251 1251
 print '</form>'."\n";
1252 1252
 
Please login to merge, or discard this patch.
htdocs/salaries/class/paymentsalary.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 							}
564 564
 							if ($result <= 0) {
565 565
 								$this->error = $this->db->lasterror();
566
-								dol_syslog(get_class($this) . '::addPaymentToBank ' . $this->error);
566
+								dol_syslog(get_class($this).'::addPaymentToBank '.$this->error);
567 567
 								$error++;
568 568
 							}
569 569
 						}
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
 				$label = $langs->trans("SalaryPayment");
779 779
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
780 780
 			}
781
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
781
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
782 782
 			$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
783 783
 		} else {
784 784
 			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
Please login to merge, or discard this patch.
htdocs/salaries/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 // Output page
350 350
 // --------------------------------------------------------------------
351 351
 
352
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');	// Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
352
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
353 353
 
354 354
 $arrayofselected = is_array($toselect) ? $toselect : array();
355 355
 
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 	$userstatic->login = $obj->login;
638 638
 	$userstatic->email = $obj->email;
639 639
 	$userstatic->socid = $obj->fk_soc;
640
-	$userstatic->statut = $obj->status;		// deprecated
640
+	$userstatic->statut = $obj->status; // deprecated
641 641
 	$userstatic->status = $obj->status;
642 642
 	$userstatic->photo = $obj->photo;
643 643
 
Please login to merge, or discard this patch.
htdocs/holiday/view_log.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
 
40 40
 $action             = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
41 41
 $massaction         = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
42
-$mode      = GETPOST('mode', 'alpha');
42
+$mode = GETPOST('mode', 'alpha');
43 43
 $show_files         = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
44 44
 $confirm            = GETPOST('confirm', 'alpha'); // Result of a confirmation
45 45
 $cancel             = GETPOST('cancel', 'alpha'); // We click on a Cancel button
Please login to merge, or discard this patch.
htdocs/holiday/card_group.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 $action 		= GETPOST('action', 'aZ09');
47 47
 $cancel 		= GETPOST('cancel', 'alpha');
48 48
 $confirm 		= GETPOST('confirm', 'alpha');
49
-$id 			= GETPOST('id', 'int');
50
-$ref 			= GETPOST('ref', 'alpha');
49
+$id = GETPOST('id', 'int');
50
+$ref = GETPOST('ref', 'alpha');
51 51
 $fuserid 		= (GETPOST('fuserid', 'int') ?GETPOST('fuserid', 'int') : $user->id);
52
-$users 			=  (GETPOST('users', 'array') ?GETPOST('users', 'array') : array($user->id));
52
+$users 			= (GETPOST('users', 'array') ?GETPOST('users', 'array') : array($user->id));
53 53
 $groups 		= GETPOST('groups', 'array');
54 54
 $socid 			= GETPOST('socid', 'int');
55
-$autoValidation 	= GETPOST('autoValidation', 'int');
56
-$AutoSendMail   = GETPOST('AutoSendMail', 'int');
55
+$autoValidation = GETPOST('autoValidation', 'int');
56
+$AutoSendMail = GETPOST('AutoSendMail', 'int');
57 57
 // Load translation files required by the page
58 58
 $langs->loadLangs(array("other", "holiday", "mails", "trips"));
59 59
 
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
 		}
164 164
 
165 165
 		if (!$error) {
166
-			$users 		=  GETPOST('users', 'array');
167
-			$groups 	=  GETPOST('groups', 'array');
166
+			$users 		= GETPOST('users', 'array');
167
+			$groups 	= GETPOST('groups', 'array');
168 168
 
169 169
 			$date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
170 170
 			$date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'));
@@ -264,9 +264,9 @@  discard block
 block discarded – undo
264 264
 				// usergroup  select
265 265
 				// better perf on single sql
266 266
 				/** GROUPS */
267
-				$sql = ' SELECT DISTINCT u.rowid,u.lastname,u.firstname from ' . MAIN_DB_PREFIX . 'user as  u';
268
-				$sql .= ' LEFT JOIN  ' . MAIN_DB_PREFIX . 'usergroup_user as ug on ug.fk_user = u.rowid  ';
269
-				$sql .= ' WHERE  fk_usergroup in (' .$db->sanitize(implode(',', $groups)) . ')';
267
+				$sql = ' SELECT DISTINCT u.rowid,u.lastname,u.firstname from '.MAIN_DB_PREFIX.'user as  u';
268
+				$sql .= ' LEFT JOIN  '.MAIN_DB_PREFIX.'usergroup_user as ug on ug.fk_user = u.rowid  ';
269
+				$sql .= ' WHERE  fk_usergroup in ('.$db->sanitize(implode(',', $groups)).')';
270 270
 				$resql = $db->query($sql);
271 271
 
272 272
 				if ($resql) {
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 						$result = $userError->fetch($u);
291 291
 
292 292
 						if ($result) {
293
-							setEventMessages($langs->trans("UseralreadyCPexist", $userError->firstname . ' '. $userError->lastname), null, 'errors');
293
+							setEventMessages($langs->trans("UseralreadyCPexist", $userError->firstname.' '.$userError->lastname), null, 'errors');
294 294
 						} else {
295 295
 							setEventMessages($langs->trans("ErrorUserFetch", $u), null, 'errors');
296 296
 						}
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 								$htemp->statut = Holiday::STATUS_VALIDATED;
328 328
 								$resultValidated = $htemp->update($approverid);
329 329
 
330
-								if ($resultValidated < 0 ) {
330
+								if ($resultValidated < 0) {
331 331
 									setEventMessages($object->error, $object->errors, 'errors');
332 332
 									$error++;
333 333
 								}
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 		print '<td>';
496 496
 		print img_picto($langs->trans("groups"), 'group', 'class="pictofixedwidth"');
497 497
 
498
-		$sql =' SELECT rowid, nom from '.MAIN_DB_PREFIX.'usergroup WHERE entity IN ('.getEntity('usergroup').')';
498
+		$sql = ' SELECT rowid, nom from '.MAIN_DB_PREFIX.'usergroup WHERE entity IN ('.getEntity('usergroup').')';
499 499
 		$resql = $db->query($sql);
500 500
 		$Tgroup = array();
501 501
 		while ($obj = $db->fetch_object($resql)) {
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 			}
525 525
 		}
526 526
 
527
-		print img_picto('', 'users') . $form->multiselectarray('users', $userlist, GETPOST('users', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
527
+		print img_picto('', 'users').$form->multiselectarray('users', $userlist, GETPOST('users', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0);
528 528
 		print '</td>';
529 529
 
530 530
 		// Type
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 					$objStd->error++;
701 701
 					$objStd->msg = $langs->trans('ErroremailTo');
702 702
 					$objStd->status = 'error';
703
-					$objStd->style="warnings";
703
+					$objStd->style = "warnings";
704 704
 					return $objStd;
705 705
 				}
706 706
 
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
 
727 727
 				// option to warn the validator in case of too short delay
728 728
 				if (empty($conf->global->HOLIDAY_HIDE_APPROVER_ABOUT_TOO_LOW_DELAY)) {
729
-					$delayForRequest = 0;		// TODO Set delay depending of holiday leave type
729
+					$delayForRequest = 0; // TODO Set delay depending of holiday leave type
730 730
 					if ($delayForRequest) {
731 731
 						$nowplusdelay = dol_time_plus_duree($now, $delayForRequest, 'd');
732 732
 
@@ -762,7 +762,7 @@  discard block
 block discarded – undo
762 762
 					$endhalfdaykey = "Afternoon";
763 763
 				}
764 764
 
765
-				$link = dol_buildpath("/holiday/card.php", 3) . '?id='.$object->id;
765
+				$link = dol_buildpath("/holiday/card.php", 3).'?id='.$object->id;
766 766
 
767 767
 				$message .= "<ul>";
768 768
 				$message .= "<li>".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."</li>\n";
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
 				if (!$result) {
782 782
 					$objStd->error++;
783 783
 					$objStd->msg = $langs->trans('ErroreSendmail');
784
-					$objStd->style="warnings";
784
+					$objStd->style = "warnings";
785 785
 					$objStd->status = 'error';
786 786
 				} else {
787 787
 					$objStd->msg = $langs->trans('mailSended');
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
 				$objStd->error++;
793 793
 				$objStd->msg = $langs->trans('ErroreVerif');
794 794
 				$objStd->status = 'error';
795
-				$objStd->style="errors";
795
+				$objStd->style = "errors";
796 796
 				return $objStd;
797 797
 			}
798 798
 		}
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 		$objStd->error++;
801 801
 		$objStd->msg = $langs->trans('ErrorloadUserOnSendingMail');
802 802
 		$objStd->status = 'error';
803
-		$objStd->style="warnings";
803
+		$objStd->style = "warnings";
804 804
 		return $objStd;
805 805
 	}
806 806
 
Please login to merge, or discard this patch.
htdocs/holiday/card.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
 
504 504
 				// option to warn the validator in case of too short delay
505 505
 				if (empty($conf->global->HOLIDAY_HIDE_APPROVER_ABOUT_TOO_LOW_DELAY)) {
506
-					$delayForRequest = 0;		// TODO Set delay depending of holiday leave type
506
+					$delayForRequest = 0; // TODO Set delay depending of holiday leave type
507 507
 					if ($delayForRequest) {
508 508
 						$nowplusdelay = dol_time_plus_duree($now, $delayForRequest, 'd');
509 509
 
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 					$endhalfdaykey = "Afternoon";
540 540
 				}
541 541
 
542
-				$link = dol_buildpath("/holiday/card.php", 3) . '?id='.$object->id;
542
+				$link = dol_buildpath("/holiday/card.php", 3).'?id='.$object->id;
543 543
 
544 544
 				$message .= "<ul>";
545 545
 				$message .= "<li>".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."</li>\n";
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
 			$result = $object->fetch($id, $ref);
1207 1207
 
1208 1208
 			$approverexpected = new User($db);
1209
-			$approverexpected->fetch($object->fk_validator);	// Use that should be the approver
1209
+			$approverexpected->fetch($object->fk_validator); // Use that should be the approver
1210 1210
 
1211 1211
 			$userRequest = new User($db);
1212 1212
 			$userRequest->fetch($object->fk_user);
@@ -1437,7 +1437,7 @@  discard block
 block discarded – undo
1437 1437
 					print '</tr>';
1438 1438
 				} else {
1439 1439
 					print '<tr>';
1440
-					print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>';	// Will be approved by
1440
+					print '<td class="titlefield">'.$langs->trans('ReviewedByCP').'</td>'; // Will be approved by
1441 1441
 					print '<td>';
1442 1442
 					$include_users = $object->fetch_users_approver_holiday();
1443 1443
 					if (!in_array($object->fk_validator, $include_users)) {  // Add the current validator to the list to not lose it when editing.
Please login to merge, or discard this patch.
htdocs/delivery/class/delivery.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -795,7 +795,7 @@  discard block
 block discarded – undo
795 795
 		//}
796 796
 
797 797
 		$linkstart = '<a href="'.$url.'"';
798
-		$linkstart .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
798
+		$linkstart .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
799 799
 		$linkstart .= $dataparams.' class="'.$classfortooltip.'">';
800 800
 		$linkend = '</a>';
801 801
 
@@ -808,7 +808,7 @@  discard block
 block discarded – undo
808 808
 		$result .= $linkstart.$this->ref.$linkend;
809 809
 
810 810
 		global $action;
811
-		$hookmanager->initHooks(array($this->element . 'dao'));
811
+		$hookmanager->initHooks(array($this->element.'dao'));
812 812
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
813 813
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
814 814
 		if ($reshook > 0) {
@@ -853,7 +853,7 @@  discard block
 block discarded – undo
853 853
 				$line->label = $obj->custom_label;
854 854
 				$line->description	= $obj->description;
855 855
 				$line->fk_product 	= $obj->fk_product;
856
-				$line->qty_asked 	= $obj->qty_asked;
856
+				$line->qty_asked = $obj->qty_asked;
857 857
 				$line->qty_shipped	= $obj->qty_shipped;
858 858
 
859 859
 				$line->product_label	= $obj->product_label; // Product label
Please login to merge, or discard this patch.