Passed
Branch develop (66e4de)
by Laurent
33:03
created
htdocs/bom/tpl/objectline_edit.tpl.php 1 patch
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.
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/accountancy/admin/categories.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,8 +62,9 @@
 block discarded – undo
62 62
 if (!empty($selectcpt)) {
63 63
 	$cpts = array();
64 64
 	foreach ($selectcpt as $selectedoption) {
65
-		if (!array_key_exists($selectedoption, $cpts))
66
-			$cpts[$selectedoption] = "'".$selectedoption."'";
65
+		if (!array_key_exists($selectedoption, $cpts)) {
66
+					$cpts[$selectedoption] = "'".$selectedoption."'";
67
+		}
67 68
 	}
68 69
 
69 70
 	$return = $accountingcategory->updateAccAcc($cat_id, $cpts);
Please login to merge, or discard this patch.
htdocs/accountancy/admin/fiscalyear.php 1 patch
Braces   +17 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,17 +36,25 @@  discard block
 block discarded – undo
36 36
 $offset = $limit * $page;
37 37
 $pageprev = $page - 1;
38 38
 $pagenext = $page + 1;
39
-if (!$sortfield) $sortfield = "f.rowid"; // Set here default search field
40
-if (!$sortorder) $sortorder = "ASC";
39
+if (!$sortfield) {
40
+	$sortfield = "f.rowid";
41
+}
42
+// Set here default search field
43
+if (!$sortorder) {
44
+	$sortorder = "ASC";
45
+}
41 46
 
42 47
 // Load translation files required by the page
43 48
 $langs->loadLangs(array("admin", "compta"));
44 49
 
45 50
 // Security check
46
-if ($user->socid > 0)
51
+if ($user->socid > 0) {
47 52
 	accessforbidden();
48
-if (!$user->rights->accounting->fiscalyear->write)              // If we can read accounting records, we should be able to see fiscal year.
53
+}
54
+if (!$user->rights->accounting->fiscalyear->write) {
55
+	// If we can read accounting records, we should be able to see fiscal year.
49 56
 	accessforbidden();
57
+}
50 58
 
51 59
 $error = 0;
52 60
 
@@ -58,8 +66,9 @@  discard block
 block discarded – undo
58 66
 $statut2label = array(
59 67
 		''
60 68
 );
61
-foreach ($tmpstatut2label as $key => $val)
69
+foreach ($tmpstatut2label as $key => $val) {
62 70
 	$statut2label[$key] = $langs->trans($val);
71
+}
63 72
 
64 73
 $errors = array();
65 74
 
@@ -95,9 +104,11 @@  discard block
 block discarded – undo
95 104
 {
96 105
 	$result = $db->query($sql);
97 106
 	$nbtotalofrecords = $db->num_rows($result);
98
-	if (($page * $limit) > $nbtotalofrecords)	// if total resultset is smaller then paging size (filtering), goto and load page 0
107
+	if (($page * $limit) > $nbtotalofrecords) {
108
+		// if total resultset is smaller then paging size (filtering), goto and load page 0
99 109
 	{
100 110
 		$page = 0;
111
+	}
101 112
 		$offset = 0;
102 113
 	}
103 114
 }
Please login to merge, or discard this patch.
htdocs/install/index.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,4 +65,6 @@
 block discarded – undo
65 65
 print '<br><br><span class="opacitymedium">'.$langs->trans("SomeTranslationAreUncomplete").'</span>';
66 66
 
67 67
 // If there's no error, we display the next step button
68
-if ($err == 0) pFooter(0);
68
+if ($err == 0) {
69
+	pFooter(0);
70
+}
Please login to merge, or discard this patch.
htdocs/user/agenda_extsites.php 1 patch
Braces   +16 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,9 @@  discard block
 block discarded – undo
41 41
 $actionsave = GETPOST('save', 'alpha');
42 42
 $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'useragenda'; // To manage different context of search
43 43
 
44
-if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB = 5;
44
+if (empty($conf->global->AGENDA_EXT_NB)) {
45
+	$conf->global->AGENDA_EXT_NB = 5;
46
+}
45 47
 $MAXAGENDA = $conf->global->AGENDA_EXT_NB;
46 48
 
47 49
 // List of available colors
@@ -55,14 +57,17 @@  discard block
 block discarded – undo
55 57
 
56 58
 // Security check
57 59
 $socid = 0;
58
-if ($user->socid > 0) $socid = $user->socid;
60
+if ($user->socid > 0) {
61
+	$socid = $user->socid;
62
+}
59 63
 $feature2 = (($socid && $user->rights->user->self->creer) ? '' : 'user');
60 64
 
61 65
 $result = restrictedArea($user, 'user', $id, 'user&user', $feature2);
62 66
 
63 67
 // If user is not user that read and no permission to read other users, we stop
64
-if (($object->id != $user->id) && (!$user->rights->user->user->lire))
68
+if (($object->id != $user->id) && (!$user->rights->user->user->lire)) {
65 69
   accessforbidden();
70
+}
66 71
 
67 72
 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
68 73
 $hookmanager->initHooks(array('usercard', 'useragenda', 'globalcard'));
@@ -73,7 +78,9 @@  discard block
 block discarded – undo
73 78
 
74 79
 $parameters = array('id'=>$socid);
75 80
 $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
76
-if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
81
+if ($reshook < 0) {
82
+	setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
83
+}
77 84
 
78 85
 if (empty($reshook)) {
79 86
 	if ($actionsave) {
@@ -168,7 +175,11 @@  discard block
 block discarded – undo
168 175
 print "<br>\n";
169 176
 
170 177
 $selectedvalue = $conf->global->AGENDA_DISABLE_EXT;
171
-if ($selectedvalue == 1) $selectedvalue = 0; else $selectedvalue = 1;
178
+if ($selectedvalue == 1) {
179
+	$selectedvalue = 0;
180
+} else {
181
+	$selectedvalue = 1;
182
+}
172 183
 
173 184
 
174 185
 print '<div class="div-table-responsive">';
Please login to merge, or discard this patch.
htdocs/ticket/tpl/linkedobjectblock.tpl.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,11 +43,16 @@
 block discarded – undo
43 43
 	$ilink++;
44 44
 
45 45
 	$trclass = 'oddeven';
46
-	if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass .= ' liste_sub_total';
46
+	if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) {
47
+		$trclass .= ' liste_sub_total';
48
+	}
47 49
 	?>
48 50
     <tr class="<?php echo $trclass; ?>" >
49 51
         <td class="linkedcol-element" ><?php echo $langs->trans("Ticket"); ?>
50
-        <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines"  data-element="'.$objectlink->element.'"  data-id="'.$objectlink->id.'"  > <i class="fa fa-indent"></i> </a'; ?>
52
+        <?php if (!empty($showImportButton) && $conf->global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) {
53
+	print '<a class="objectlinked_importbtn" href="'.$objectlink->getNomUrl(0, '', 0, 1).'&amp;action=selectlines"  data-element="'.$objectlink->element.'"  data-id="'.$objectlink->id.'"  > <i class="fa fa-indent"></i> </a';
54
+}
55
+?>
51 56
         </td>
52 57
         <td class="linkedcol-name nowraponall" ><?php echo $objectlink->getNomUrl(1); ?></td>
53 58
     	<td class="linkedcol-ref center"><?php echo $objectlink->ref_client; ?></td>
Please login to merge, or discard this patch.