Passed
Branch develop (66e4de)
by Laurent
33:03
created
htdocs/societe/canvas/individual/tpl/card_create.tpl.php 1 patch
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,10 @@
 block discarded – undo
169 169
 	<td colspan="3"><?php echo $this->control->tpl['yn_assujtva']; ?></td>
170 170
 </tr>
171 171
 
172
-<?php if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
172
+<?php if (!empty($this->control->tpl['localtax'])) {
173
+	echo $this->control->tpl['localtax'];
174
+}
175
+?>
173 176
 
174 177
 <?php if ($user->rights->societe->client->voir) { ?>
175 178
 <tr>
Please login to merge, or discard this patch.
htdocs/societe/canvas/company/tpl/card_edit.tpl.php 1 patch
Braces   +20 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,7 +34,10 @@  discard block
 block discarded – undo
34 34
 <?php echo $this->control->tpl['error']; ?>
35 35
 
36 36
 <?php echo $this->control->tpl['ajax_selectcountry']; ?>
37
-<?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?>
37
+<?php if ($this->control->tpl['js_checkVatPopup']) {
38
+	echo $this->control->tpl['js_checkVatPopup'];
39
+}
40
+?>
38 41
 
39 42
 <form action="<?php echo $_SERVER["PHP_SELF"].'?socid='.$this->control->tpl['id']; ?>" method="POST" name="formsoc">
40 43
 <input type="hidden" name="canvas" value="<?php echo $canvas ?>">
@@ -165,15 +168,23 @@  discard block
 block discarded – undo
165 168
 <?php
166 169
 for ($i = 1; $i <= 4; $i++) {
167 170
 	if ($this->control->tpl['langprofid'.$i] != '-') {
168
-		if ($i == 1 || $i == 3) echo '<tr>';
171
+		if ($i == 1 || $i == 3) {
172
+			echo '<tr>';
173
+		}
169 174
 		echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>';
170 175
 		echo '<td>'.$this->control->tpl['showprofid'.$i].'</td>';
171
-		if ($i == 2 || $i == 4) echo '</tr>';
176
+		if ($i == 2 || $i == 4) {
177
+			echo '</tr>';
178
+		}
172 179
 	} else {
173
-		if ($i == 1 || $i == 3) echo '<tr>';
180
+		if ($i == 1 || $i == 3) {
181
+			echo '<tr>';
182
+		}
174 183
 		echo '<td>&nbsp;</td>';
175 184
 		echo '<td>&nbsp;</td>';
176
-		if ($i == 2 || $i == 4) echo '</tr>';
185
+		if ($i == 2 || $i == 4) {
186
+			echo '</tr>';
187
+		}
177 188
 	}
178 189
 }
179 190
 ?>
@@ -209,7 +220,10 @@  discard block
 block discarded – undo
209 220
 </tr>
210 221
 <?php }
211 222
 
212
-if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
223
+if (!empty($this->control->tpl['localtax'])) {
224
+	echo $this->control->tpl['localtax'];
225
+}
226
+?>
213 227
 
214 228
 </table>
215 229
 <br>
Please login to merge, or discard this patch.
htdocs/societe/canvas/company/tpl/card_view.tpl.php 1 patch
Braces   +38 added lines, -12 removed lines patch added patch discarded remove patch
@@ -34,9 +34,18 @@  discard block
 block discarded – undo
34 34
 
35 35
 ?>
36 36
 
37
-<?php if ($this->control->tpl['error']) echo $this->control->tpl['error']; ?>
38
-<?php if ($this->control->tpl['action_delete']) echo $this->control->tpl['action_delete']; ?>
39
-<?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?>
37
+<?php if ($this->control->tpl['error']) {
38
+	echo $this->control->tpl['error'];
39
+}
40
+?>
41
+<?php if ($this->control->tpl['action_delete']) {
42
+	echo $this->control->tpl['action_delete'];
43
+}
44
+?>
45
+<?php if ($this->control->tpl['js_checkVatPopup']) {
46
+	echo $this->control->tpl['js_checkVatPopup'];
47
+}
48
+?>
40 49
 
41 50
 <table class="border allwidth">
42 51
 
@@ -120,20 +129,31 @@  discard block
 block discarded – undo
120 129
 <?php
121 130
 for ($i = 1; $i <= 4; $i++) {
122 131
 	if ($this->control->tpl['langprofid'.$i] != '-') {
123
-		if ($i == 1 || $i == 3) echo '<tr>';
132
+		if ($i == 1 || $i == 3) {
133
+			echo '<tr>';
134
+		}
124 135
 		echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>';
125 136
 		echo '<td>'.$this->control->tpl['profid'.$i];
126 137
 		if ($this->control->tpl['profid'.$i]) {
127
-			if ($this->control->tpl['checkprofid'.$i] > 0) echo ' &nbsp; '.$this->control->tpl['urlprofid'.$i];
128
-			else echo ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
138
+			if ($this->control->tpl['checkprofid'.$i] > 0) {
139
+				echo ' &nbsp; '.$this->control->tpl['urlprofid'.$i];
140
+			} else {
141
+				echo ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>';
142
+			}
129 143
 		}
130 144
 		echo '</td>';
131
-		if ($i == 2 || $i == 4) echo '</tr>';
145
+		if ($i == 2 || $i == 4) {
146
+			echo '</tr>';
147
+		}
132 148
 	} else {
133
-		if ($i == 1 || $i == 3) echo '<tr>';
149
+		if ($i == 1 || $i == 3) {
150
+			echo '<tr>';
151
+		}
134 152
 		echo '<td>&nbsp;</td>';
135 153
 		echo '<td>&nbsp;</td>';
136
-		if ($i == 2 || $i == 4) echo '</tr>';
154
+		if ($i == 2 || $i == 4) {
155
+			echo '</tr>';
156
+		}
137 157
 	}
138 158
 }
139 159
 ?>
@@ -145,14 +165,20 @@  discard block
 block discarded – undo
145 165
 	<td><?php echo $this->control->tpl['tva_intra']; ?></td>
146 166
 </tr>
147 167
 
148
-<?php if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
168
+<?php if (!empty($this->control->tpl['localtax'])) {
169
+	echo $this->control->tpl['localtax'];
170
+}
171
+?>
149 172
 
150 173
 <tr>
151 174
 	<td><?php echo $langs->trans('Capital'); ?></td>
152 175
 	<td colspan="3">
153 176
 	<?php
154
-	if ($this->control->tpl['capital']) echo $this->control->tpl['capital'].' '.$langs->trans("Currency".$conf->currency);
155
-	else echo '&nbsp;';
177
+	if ($this->control->tpl['capital']) {
178
+		echo $this->control->tpl['capital'].' '.$langs->trans("Currency".$conf->currency);
179
+	} else {
180
+		echo '&nbsp;';
181
+	}
156 182
 	?>
157 183
 	</td>
158 184
 </tr>
Please login to merge, or discard this patch.
htdocs/societe/canvas/company/tpl/card_create.tpl.php 1 patch
Braces   +20 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,7 +43,10 @@  discard block
 block discarded – undo
43 43
 	<?php echo $this->control->tpl['ajax_selectcountry']; ?>
44 44
 <?php } ?>
45 45
 
46
-<?php if ($this->control->tpl['js_checkVatPopup']) echo $this->control->tpl['js_checkVatPopup']; ?>
46
+<?php if ($this->control->tpl['js_checkVatPopup']) {
47
+	echo $this->control->tpl['js_checkVatPopup'];
48
+}
49
+?>
47 50
 
48 51
 <form action="<?php echo $_SERVER["PHP_SELF"]; ?>" method="POST" name="formsoc">
49 52
 
@@ -155,15 +158,23 @@  discard block
 block discarded – undo
155 158
 <?php
156 159
 for ($i = 1; $i <= 4; $i++) {
157 160
 	if ($this->control->tpl['langprofid'.$i] != '-') {
158
-		if ($i == 1 || $i == 3) echo '<tr>';
161
+		if ($i == 1 || $i == 3) {
162
+			echo '<tr>';
163
+		}
159 164
 		echo '<td>'.$this->control->tpl['langprofid'.$i].'</td>';
160 165
 		echo '<td>'.$this->control->tpl['showprofid'.$i].'</td>';
161
-		if ($i == 2 || $i == 4) echo '</tr>';
166
+		if ($i == 2 || $i == 4) {
167
+			echo '</tr>';
168
+		}
162 169
 	} else {
163
-		if ($i == 1 || $i == 3) echo '<tr>';
170
+		if ($i == 1 || $i == 3) {
171
+			echo '<tr>';
172
+		}
164 173
 		echo '<td>&nbsp;</td>';
165 174
 		echo '<td>&nbsp;</td>';
166
-		if ($i == 2 || $i == 4) echo '</tr>';
175
+		if ($i == 2 || $i == 4) {
176
+			echo '</tr>';
177
+		}
167 178
 	}
168 179
 }
169 180
 ?>
@@ -194,7 +205,10 @@  discard block
 block discarded – undo
194 205
 	<td class="nowrap"><?php echo $this->control->tpl['tva_intra']; ?></td>
195 206
 </tr>
196 207
 
197
-<?php if (!empty($this->control->tpl['localtax'])) echo $this->control->tpl['localtax']; ?>
208
+<?php if (!empty($this->control->tpl['localtax'])) {
209
+	echo $this->control->tpl['localtax'];
210
+}
211
+?>
198 212
 
199 213
 <?php if ($user->rights->societe->client->voir) { ?>
200 214
 <tr>
Please login to merge, or discard this patch.
htdocs/bom/tpl/objectline_title.tpl.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,9 @@
 block discarded – undo
46 46
 print '<tr class="liste_titre nodrag nodrop">';
47 47
 
48 48
 // Adds a line numbering column
49
-if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) print '<td class="linecolnum center">&nbsp;</td>';
49
+if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
50
+	print '<td class="linecolnum center">&nbsp;</td>';
51
+}
50 52
 
51 53
 // Description
52 54
 print '<td class="linecoldescription">'.$langs->trans('Description').'</td>';
Please login to merge, or discard this patch.
htdocs/variants/ajax/getCombinations.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -16,11 +16,21 @@
 block discarded – undo
16 16
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17 17
  */
18 18
 
19
-if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1');
20
-if (!defined('NOREQUIREMENU'))  define('NOREQUIREMENU', '1');
21
-if (!defined('NOREQUIREHTML'))  define('NOREQUIREHTML', '1');
22
-if (!defined('NOREQUIREAJAX'))  define('NOREQUIREAJAX', '1');
23
-if (!defined('NOREQUIRESOC'))   define('NOREQUIRESOC', '1');
19
+if (!defined('NOTOKENRENEWAL')) {
20
+	define('NOTOKENRENEWAL', '1');
21
+}
22
+if (!defined('NOREQUIREMENU')) {
23
+	define('NOREQUIREMENU', '1');
24
+}
25
+if (!defined('NOREQUIREHTML')) {
26
+	define('NOREQUIREHTML', '1');
27
+}
28
+if (!defined('NOREQUIREAJAX')) {
29
+	define('NOREQUIREAJAX', '1');
30
+}
31
+if (!defined('NOREQUIRESOC')) {
32
+	define('NOREQUIRESOC', '1');
33
+}
24 34
 
25 35
 require '../../main.inc.php';
26 36
 require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
Please login to merge, or discard this patch.
htdocs/core/lib/asset.lib.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -102,16 +102,24 @@
 block discarded – undo
102 102
 	$nbLinks = Link::count($db, $object->element, $object->id);
103 103
 	$head[$h][0] = DOL_URL_ROOT.'/asset/document.php?id='.$object->id;
104 104
 	$head[$h][1] = $langs->trans('Documents');
105
-	if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
105
+	if (($nbFiles + $nbLinks) > 0) {
106
+		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.($nbFiles + $nbLinks).'</span>';
107
+	}
106 108
 	$head[$h][2] = 'documents';
107 109
 	$h++;
108 110
 
109 111
 	$nbNote = 0;
110
-	if (!empty($object->note_private)) $nbNote++;
111
-	if (!empty($object->note_public)) $nbNote++;
112
+	if (!empty($object->note_private)) {
113
+		$nbNote++;
114
+	}
115
+	if (!empty($object->note_public)) {
116
+		$nbNote++;
117
+	}
112 118
 	$head[$h][0] = DOL_URL_ROOT.'/asset/note.php?id='.$object->id;
113 119
 	$head[$h][1] = $langs->trans("Notes");
114
-	if ($nbNote > 0) $head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
120
+	if ($nbNote > 0) {
121
+		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
122
+	}
115 123
 	$head[$h][2] = 'note';
116 124
 	$h++;
117 125
 
Please login to merge, or discard this patch.
htdocs/core/lib/prelevement.lib.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -78,8 +78,14 @@
 block discarded – undo
78 78
 function prelevement_check_config()
79 79
 {
80 80
 	global $conf;
81
-	if (empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) return -1;
82
-	if (empty($conf->global->PRELEVEMENT_ICS)) return -1;
83
-	if (empty($conf->global->PRELEVEMENT_USER)) return -1;
81
+	if (empty($conf->global->PRELEVEMENT_ID_BANKACCOUNT)) {
82
+		return -1;
83
+	}
84
+	if (empty($conf->global->PRELEVEMENT_ICS)) {
85
+		return -1;
86
+	}
87
+	if (empty($conf->global->PRELEVEMENT_USER)) {
88
+		return -1;
89
+	}
84 90
 	return 0;
85 91
 }
Please login to merge, or discard this patch.
htdocs/core/lib/expedition.lib.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,9 @@
 block discarded – undo
35 35
 function expedition_prepare_head(Expedition $object)
36 36
 {
37 37
 	global $langs, $conf, $user;
38
-	if (!empty($conf->expedition->enabled)) $langs->load("sendings");
38
+	if (!empty($conf->expedition->enabled)) {
39
+		$langs->load("sendings");
40
+	}
39 41
 	$langs->load("orders");
40 42
 
41 43
 	$h = 0;
Please login to merge, or discard this patch.