Passed
Branch develop (92bdcd)
by Laurent
32:39
created
htdocs/admin/system/index.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -94,10 +94,10 @@
 block discarded – undo
94 94
 {
95 95
 	// Check option standard_conforming_strings is on
96 96
 	$paramarray = $db->getServerParametersValues('standard_conforming_strings');
97
-    //	if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1)
98
-    //	{
99
-    //		$langs->load("errors");
100
-    //	}
97
+	//	if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1)
98
+	//	{
99
+	//		$langs->load("errors");
100
+	//	}
101 101
 }
102 102
 print '<br>';
103 103
 
Please login to merge, or discard this 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->loadLangs(array("admin", "user", "install"));
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/web.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@  discard block
 block discarded – undo
26 26
 
27 27
 $langs->load("admin");
28 28
 
29
-if (!$user->admin) accessforbidden();
29
+if (!$user->admin) {
30
+	accessforbidden();
31
+}
30 32
 
31 33
 
32 34
 /*
@@ -63,10 +65,12 @@  discard block
 block discarded – undo
63 65
 // Web user group real (detected by 'id' external command)
64 66
 $arrayout = array(); $varout = 0;
65 67
 exec('id', $arrayout, $varout);
66
-if (empty($varout))	// Test command is ok. Work only on Linux OS.
68
+if (empty($varout)) {
69
+	// Test command is ok. Work only on Linux OS.
67 70
 {
68 71
 	print '<tr><td>'.$langs->trans("WebUserGroup")." (real, 'id' command)</td><td>".join(',', $arrayout)."</td></tr>\n";
69 72
 }
73
+}
70 74
 print '</table>';
71 75
 print '</div>';
72 76
 
Please login to merge, or discard this patch.
htdocs/bom/tpl/objectline_view.tpl.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,11 +44,21 @@
 block discarded – undo
44 44
 
45 45
 global $forceall, $senderissupplier, $inputalsopricewithtax, $outputalsopricetotalwithtax;
46 46
 
47
-if (empty($dateSelector)) $dateSelector = 0;
48
-if (empty($forceall)) $forceall = 0;
49
-if (empty($senderissupplier)) $senderissupplier = 0;
50
-if (empty($inputalsopricewithtax)) $inputalsopricewithtax = 0;
51
-if (empty($outputalsopricetotalwithtax)) $outputalsopricetotalwithtax = 0;
47
+if (empty($dateSelector)) {
48
+	$dateSelector = 0;
49
+}
50
+if (empty($forceall)) {
51
+	$forceall = 0;
52
+}
53
+if (empty($senderissupplier)) {
54
+	$senderissupplier = 0;
55
+}
56
+if (empty($inputalsopricewithtax)) {
57
+	$inputalsopricewithtax = 0;
58
+}
59
+if (empty($outputalsopricetotalwithtax)) {
60
+	$outputalsopricetotalwithtax = 0;
61
+}
52 62
 
53 63
 // add html5 elements
54 64
 $domData  = ' data-element="'.$line->element.'"';
Please login to merge, or discard this patch.
htdocs/bom/tpl/objectline_edit.tpl.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,9 @@
 block discarded – undo
41 41
 
42 42
 global $forceall;
43 43
 
44
-if (empty($forceall)) $forceall = 0;
44
+if (empty($forceall)) {
45
+	$forceall = 0;
46
+}
45 47
 
46 48
 
47 49
 // Define colspan for the button 'Add'
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
 if (is_object($hookmanager))
83 83
 {
84 84
 	$fk_parent_line = (GETPOST('fk_parent_line') ? GETPOST('fk_parent_line') : $line->fk_parent_line);
85
-    $parameters = array('line'=>$line, 'fk_parent_line'=>$fk_parent_line, 'var'=>$var, 'dateSelector'=>$dateSelector, 'seller'=>$seller, 'buyer'=>$buyer);
86
-    $reshook = $hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action);
85
+	$parameters = array('line'=>$line, 'fk_parent_line'=>$fk_parent_line, 'var'=>$var, 'dateSelector'=>$dateSelector, 'seller'=>$seller, 'buyer'=>$buyer);
86
+	$reshook = $hookmanager->executeHooks('formEditProductOptions', $parameters, $this, $action);
87 87
 }
88 88
 
89 89
 print '</td>';
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 
111 111
 if ($conf->global->PRODUCT_USE_UNITS)
112 112
 {
113
-    $coldisplay++;
113
+	$coldisplay++;
114 114
 	print '<td class="nobottom linecoluseunit left">';
115 115
 	// print $form->selectUnits($line->fk_unit, "units");
116 116
 	print '</td>';
Please login to merge, or discard this patch.
htdocs/bom/bom_note.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,9 @@
 block discarded – undo
53 53
 
54 54
 // Load object
55 55
 include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once  // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
56
-if ($id > 0 || !empty($ref)) $upload_dir = $conf->bom->multidir_output[$object->entity]."/".$object->id;
56
+if ($id > 0 || !empty($ref)) {
57
+	$upload_dir = $conf->bom->multidir_output[$object->entity]."/".$object->id;
58
+}
57 59
 
58 60
 $permissionnote = 1;
59 61
 //$permissionnote=$user->rights->bom->creer;	// Used by the include of actions_setnotes.inc.php
Please login to merge, or discard this patch.
htdocs/compta/facture/info.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,9 +77,10 @@
 block discarded – undo
77 77
 	$morehtmlref .= '<br>'.$langs->trans('Project').' ';
78 78
 	if ($user->rights->facture->creer)
79 79
 	{
80
-		if ($action != 'classify')
81
-			//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
80
+		if ($action != 'classify') {
81
+					//$morehtmlref.='<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&amp;id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> : ';
82 82
 			$morehtmlref .= ' : ';
83
+		}
83 84
 		if ($action == 'classify') {
84 85
 			//$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1);
85 86
 			$morehtmlref .= '<form method="post" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">';
Please login to merge, or discard this patch.
htdocs/theme/eldy/timeline.inc.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,10 @@
 block discarded – undo
8 8
  *           Please visit http://opensource.org/licenses/MIT for more information
9 9
  */
10 10
 
11
-if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
11
+if (!defined('ISLOADEDBYSTEELSHEET')) {
12
+	die('Must be call by steelsheet');
13
+}
14
+?>
12 15
 /* <style type="text/css" > */
13 16
 
14 17
 
Please login to merge, or discard this patch.
htdocs/expedition/document.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@
 block discarded – undo
100 100
 		$filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1);
101 101
 		$totalsize = 0;
102 102
 		foreach ($filearray as $key => $file) {
103
-		    $totalsize += $file['size'];
103
+			$totalsize += $file['size'];
104 104
 		}
105 105
 
106 106
 		// Shipment card
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,12 @@
 block discarded – undo
61 61
 $offset = $limit * $page;
62 62
 $pageprev = $page - 1;
63 63
 $pagenext = $page + 1;
64
-if (!$sortorder) $sortorder = "ASC";
65
-if (!$sortfield) $sortfield = "name";
64
+if (!$sortorder) {
65
+	$sortorder = "ASC";
66
+}
67
+if (!$sortfield) {
68
+	$sortfield = "name";
69
+}
66 70
 
67 71
 $object = new Expedition($db);
68 72
 
Please login to merge, or discard this patch.
htdocs/salaries/card.php 2 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 	$fuser->fetch(GETPOST("fk_user", "int"));
109 109
 	$object->salary = $fuser->salary;
110 110
 
111
-    // Fill array 'array_options' with data from add form
112
-    $ret = $extrafields->setOptionalsFromPost(null, $object);
113
-    if ($ret < 0) $error++;
111
+	// Fill array 'array_options' with data from add form
112
+	$ret = $extrafields->setOptionalsFromPost(null, $object);
113
+	if ($ret < 0) $error++;
114 114
 
115 115
 	if (empty($datep) || empty($datev) || empty($datesp) || empty($dateep))
116 116
 	{
@@ -340,14 +340,14 @@  discard block
 block discarded – undo
340 340
 		print '<td><input name="num_payment" id="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n";
341 341
 	}
342 342
 
343
-    // Other attributes
344
-    $parameters = array();
345
-    $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
346
-    print $hookmanager->resPrint;
347
-    if (empty($reshook))
348
-    {
349
-        print $object->showOptionals($extrafields, 'edit');
350
-    }
343
+	// Other attributes
344
+	$parameters = array();
345
+	$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
346
+	print $hookmanager->resPrint;
347
+	if (empty($reshook))
348
+	{
349
+		print $object->showOptionals($extrafields, 'edit');
350
+	}
351 351
 
352 352
 	print '</table>';
353 353
 
@@ -464,8 +464,8 @@  discard block
 block discarded – undo
464 464
 		}
465 465
 	}
466 466
 
467
-    // Other attributes
468
-    include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
467
+	// Other attributes
468
+	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php';
469 469
 
470 470
 	print '</table>';
471 471
 
Please login to merge, or discard this patch.
Braces   +24 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,7 +39,9 @@  discard block
 block discarded – undo
39 39
 
40 40
 // Load translation files required by the page
41 41
 $langs->loadLangs(array("compta", "banks", "bills", "users", "salaries", "hrm"));
42
-if (!empty($conf->projet->enabled))	$langs->load("projects");
42
+if (!empty($conf->projet->enabled)) {
43
+	$langs->load("projects");
44
+}
43 45
 
44 46
 $id = GETPOST("id", 'int');
45 47
 $action = GETPOST('action', 'aZ09');
@@ -54,7 +56,9 @@  discard block
 block discarded – undo
54 56
 
55 57
 // Security check
56 58
 $socid = GETPOST("socid", "int");
57
-if ($user->socid) $socid = $user->socid;
59
+if ($user->socid) {
60
+	$socid = $user->socid;
61
+}
58 62
 $result = restrictedArea($user, 'salaries', '', '', '');
59 63
 
60 64
 $object = new PaymentSalary($db);
@@ -88,7 +92,9 @@  discard block
 block discarded – undo
88 92
 {
89 93
 	$error = 0;
90 94
 
91
-	if (empty($datev)) $datev = $datep;
95
+	if (empty($datev)) {
96
+		$datev = $datep;
97
+	}
92 98
 
93 99
 	$type_payment = dol_getIdFromCode($db, GETPOST("paymenttype", 'alpha'), 'c_paiement', 'code', 'id', 1);
94 100
 
@@ -113,7 +119,9 @@  discard block
 block discarded – undo
113 119
 
114 120
     // Fill array 'array_options' with data from add form
115 121
     $ret = $extrafields->setOptionalsFromPost(null, $object);
116
-    if ($ret < 0) $error++;
122
+    if ($ret < 0) {
123
+    	$error++;
124
+    }
117 125
 
118 126
 	if (empty($datep) || empty($datev) || empty($datesp) || empty($dateep))
119 127
 	{
@@ -183,7 +191,10 @@  discard block
 block discarded – undo
183 191
 			{
184 192
 				$accountline = new AccountLine($db);
185 193
 				$result = $accountline->fetch($object->fk_bank);
186
-				if ($result > 0) $result = $accountline->delete($user); // $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing)
194
+				if ($result > 0) {
195
+					$result = $accountline->delete($user);
196
+				}
197
+				// $result may be 0 if not found (when bank entry was deleted manually and fk_bank point to nothing)
187 198
 			}
188 199
 
189 200
 			if ($result >= 0)
@@ -213,7 +224,9 @@  discard block
 block discarded – undo
213 224
 llxHeader("", $langs->trans("SalaryPayment"));
214 225
 
215 226
 $form = new Form($db);
216
-if (!empty($conf->projet->enabled)) $formproject = new FormProjets($db);
227
+if (!empty($conf->projet->enabled)) {
228
+	$formproject = new FormProjets($db);
229
+}
217 230
 
218 231
 if ($id)
219 232
 {
@@ -247,9 +260,12 @@  discard block
 block discarded – undo
247 260
 	$datesp = dol_mktime(0, 0, 0, $datespmonth, $datespday, $datespyear);
248 261
 	$dateep = dol_mktime(23, 59, 59, $dateepmonth, $dateepday, $dateepyear);
249 262
 
250
-	if (empty($datesp) || empty($dateep)) // We define date_start and date_end
263
+	if (empty($datesp) || empty($dateep)) {
264
+		// We define date_start and date_end
251 265
 	{
252
-		$datesp = dol_get_first_day($pastmonthyear, $pastmonth, false); $dateep = dol_get_last_day($pastmonthyear, $pastmonth, false);
266
+		$datesp = dol_get_first_day($pastmonthyear, $pastmonth, false);
267
+	}
268
+	$dateep = dol_get_last_day($pastmonthyear, $pastmonth, false);
253 269
 	}
254 270
 
255 271
 	print '<form name="salary" action="'.$_SERVER["PHP_SELF"].'" method="post">';
Please login to merge, or discard this patch.