Completed
Branch develop (b61ff7)
by
unknown
23:00
created
htdocs/comm/propal/agenda.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -23,12 +23,12 @@  discard block
 block discarded – undo
23 23
  *  \brief      Tab of events on Proposal
24 24
  */
25 25
 require '../../main.inc.php';
26
-require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
27
-require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
28
-require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php';
29
-require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php';
30
-require_once DOL_DOCUMENT_ROOT . '/core/lib/propal.lib.php';
31
-require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
26
+require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
27
+require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
28
+require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
29
+require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
30
+require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php';
31
+require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
32 32
 
33 33
 /**
34 34
  * @var Conf $conf
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 $ref = GETPOST('ref', 'alpha');
47 47
 $action = GETPOST('action', 'aZ09');
48 48
 $cancel = GETPOST('cancel', 'alpha');
49
-$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search
49
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
50 50
 $backtopage = GETPOST('backtopage', 'alpha');
51 51
 
52 52
 if (GETPOST('actioncode', 'array')) {
@@ -81,15 +81,15 @@  discard block
 block discarded – undo
81 81
 // Initialize a technical objects
82 82
 $object = new Propal($db);
83 83
 $extrafields = new ExtraFields($db);
84
-$diroutputmassaction = $conf->propal->multidir_output[$conf->entity] . '/temp/massgeneration/' . $user->id;
84
+$diroutputmassaction = $conf->propal->multidir_output[$conf->entity].'/temp/massgeneration/'.$user->id;
85 85
 $hookmanager->initHooks(array('propalagenda', 'globalcard')); // Note that conf->hooks_modules contains array
86 86
 // Fetch optionals attributes and labels
87 87
 $extrafields->fetch_name_optionals_label($object->table_element);
88 88
 
89 89
 // Load object
90
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
90
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
91 91
 if ($id > 0 || !empty($ref)) {
92
-	$upload_dir = $conf->propal->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity] . "/" . $object->id;
92
+	$upload_dir = $conf->propal->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity]."/".$object->id;
93 93
 }
94 94
 
95 95
 $permissiontoread = $user->hasRight("propal", "lire");
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 if (empty($reshook)) {
117 117
 	// Cancel
118 118
 	if (GETPOST('cancel', 'alpha') && !empty($backtopage)) {
119
-		header("Location: " . $backtopage);
119
+		header("Location: ".$backtopage);
120 120
 		exit;
121 121
 	}
122 122
 
@@ -150,14 +150,14 @@  discard block
 block discarded – undo
150 150
 
151 151
 	// Object card
152 152
 	// ------------------------------------------------------------
153
-	$linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>';
153
+	$linkback = '<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
154 154
 
155 155
 	$morehtmlref = '<div class="refidno">';
156 156
 	// Ref customer
157 157
 	$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_customer, $object, 0, 'string', '', 0, 1);
158 158
 	$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_customer, $object, 0, 'string', '', null, null, '', 1);
159 159
 	// Thirdparty
160
-	$morehtmlref .= '<br>' . $object->thirdparty->getNomUrl(1);
160
+	$morehtmlref .= '<br>'.$object->thirdparty->getNomUrl(1);
161 161
 	// Project
162 162
 	if (isModEnabled('project')) {
163 163
 		$langs->load("projects");
@@ -165,16 +165,16 @@  discard block
 block discarded – undo
165 165
 		if (0) {	// @phpstan-ignore-line
166 166
 			$morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"');
167 167
 			if ($action != 'classify') {
168
-				$morehtmlref .= '<a class="editfielda" href="' . dolBuildUrl($_SERVER['PHP_SELF'], ['action' => 'classify', 'id' => $object->id], true) . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> ';
168
+				$morehtmlref .= '<a class="editfielda" href="'.dolBuildUrl($_SERVER['PHP_SELF'], ['action' => 'classify', 'id' => $object->id], true).'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
169 169
 			}
170
-			$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
170
+			$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
171 171
 		} else {
172 172
 			if (!empty($object->fk_project)) {
173 173
 				$proj = new Project($db);
174 174
 				$proj->fetch($object->fk_project);
175 175
 				$morehtmlref .= $proj->getNomUrl(1);
176 176
 				if ($proj->title) {
177
-					$morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>';
177
+					$morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>';
178 178
 				}
179 179
 			}
180 180
 		}
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
 	$query = [
205 205
 		'action' => 'create',
206
-		'origin' => ($object->element . (property_exists($object, 'module') && !empty($object->module) ? '@' . $object->module : '')),
206
+		'origin' => ($object->element.(property_exists($object, 'module') && !empty($object->module) ? '@'.$object->module : '')),
207 207
 		'originid' => $object->id,
208 208
 		'backtopage' => dolBuildUrl($_SERVER['PHP_SELF'], ['id' => $object->id]),
209 209
 	];
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 		//$out.=img_picto($langs->trans("AddAnAction"),'filenew');
221 221
 		//$out.="</a>";
222 222
 	}
223
-	$url = dolBuildUrl(DOL_URL_ROOT . '/comm/action/card.php', $query);
223
+	$url = dolBuildUrl(DOL_URL_ROOT.'/comm/action/card.php', $query);
224 224
 
225 225
 	$morehtmlright = '';
226 226
 
@@ -230,10 +230,10 @@  discard block
 block discarded – undo
230 230
 	//$messagingUrl = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id;
231 231
 	//$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2);
232 232
 
233
-	$messagingUrl = dolBuildUrl(DOL_URL_ROOT . '/comm/propal/messaging.php', ['id' => $object->id]);
233
+	$messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/comm/propal/messaging.php', ['id' => $object->id]);
234 234
 	$morehtmlright .= dolGetButtonTitle($langs->trans('ShowAsConversation'), '', 'fa fa-comments imgforviewmode', $messagingUrl, '', 1);
235 235
 
236
-	$messagingUrl = dolBuildUrl(DOL_URL_ROOT . '/comm/propal/agenda.php', ['id' => $object->id]);
236
+	$messagingUrl = dolBuildUrl(DOL_URL_ROOT.'/comm/propal/agenda.php', ['id' => $object->id]);
237 237
 	$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 2);
238 238
 
239 239
 
@@ -248,20 +248,20 @@  discard block
 block discarded – undo
248 248
 	if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $user->hasRight('agenda', 'allactions', 'read'))) {
249 249
 		print '<br>';
250 250
 
251
-		$param = '&id=' . $object->id . (!empty($socid) ? '&socid=' . $socid : '');
251
+		$param = '&id='.$object->id.(!empty($socid) ? '&socid='.$socid : '');
252 252
 		if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
253
-			$param .= '&contextpage=' . urlencode($contextpage);
253
+			$param .= '&contextpage='.urlencode($contextpage);
254 254
 		}
255 255
 		if ($limit > 0 && $limit != $conf->liste_limit) {
256
-			$param .= '&limit=' . ((int) $limit);
256
+			$param .= '&limit='.((int) $limit);
257 257
 		}
258 258
 
259 259
 		// Try to know count of actioncomm from cache
260
-		require_once DOL_DOCUMENT_ROOT . '/core/lib/memory.lib.php';
261
-		$cachekey = 'count_events_propal_' . $object->id;
260
+		require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
261
+		$cachekey = 'count_events_propal_'.$object->id;
262 262
 		$nbEvent = dol_getcache($cachekey);
263 263
 
264
-		print_barre_liste($langs->trans("ActionsOnPropal") . (is_numeric($nbEvent) ? '<span class="opacitymedium colorblack paddingleft">(' . $nbEvent . ')</span>' : ''), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0);
264
+		print_barre_liste($langs->trans("ActionsOnPropal").(is_numeric($nbEvent) ? '<span class="opacitymedium colorblack paddingleft">('.$nbEvent.')</span>' : ''), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0);
265 265
 		//print_barre_liste($langs->trans("ActionsOnPropal"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1);
266 266
 
267 267
 		// List of all actions
Please login to merge, or discard this patch.
htdocs/mrp/mo_agenda.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 $langs->loadLangs(array("mrp", "other"));
49 49
 
50 50
 // Get parameters
51
-$id 		= GETPOSTINT('id');
51
+$id = GETPOSTINT('id');
52 52
 $ref        = GETPOST('ref', 'alpha');
53
-$action 	= GETPOST('action', 'aZ09');
53
+$action = GETPOST('action', 'aZ09');
54 54
 $cancel     = GETPOST('cancel');
55 55
 $backtopage = GETPOST('backtopage', 'alpha');
56 56
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'moagenda'; // To manage different context of search
@@ -72,10 +72,10 @@  discard block
 block discarded – undo
72 72
 $search_rowid = GETPOST('search_rowid');
73 73
 $search_agenda_label = GETPOST('search_agenda_label');
74 74
 
75
-$limit 		= GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
75
+$limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
76 76
 $sortfield	= GETPOST('sortfield', 'aZ09comma');
77 77
 $sortorder	= GETPOST('sortorder', 'aZ09comma');
78
-$page 		= GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
78
+$page = GETPOSTISSET('pageplusone') ? (GETPOSTINT('pageplusone') - 1) : GETPOSTINT("page");
79 79
 if (empty($page) || $page == -1) {
80 80
 	$page = 0;
81 81
 }     // If $page is not defined, or '' or -1
Please login to merge, or discard this patch.
htdocs/intracommreport/card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,14 +57,14 @@
 block discarded – undo
57 57
 // Get parameters
58 58
 $id = GETPOSTINT('id');
59 59
 $ref = GETPOST('ref', 'alpha');
60
-$lineid   = GETPOSTINT('lineid');
60
+$lineid = GETPOSTINT('lineid');
61 61
 
62 62
 $action = GETPOST('action', 'aZ09');
63 63
 $confirm = GETPOST('confirm', 'alpha');
64 64
 $cancel = GETPOST('cancel');
65 65
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
66
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
67
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
66
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
67
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
68 68
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
69 69
 
70 70
 // Initialize a technical objects
Please login to merge, or discard this patch.
htdocs/asset/depreciation_options.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 // Load Dolibarr environment
27 27
 require '../main.inc.php';
28
-require_once DOL_DOCUMENT_ROOT . '/core/lib/asset.lib.php';
29
-require_once DOL_DOCUMENT_ROOT . '/asset/class/asset.class.php';
30
-require_once DOL_DOCUMENT_ROOT . '/asset/class/assetdepreciationoptions.class.php';
28
+require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
29
+require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
30
+require_once DOL_DOCUMENT_ROOT.'/asset/class/assetdepreciationoptions.class.php';
31 31
 
32 32
 /**
33 33
  * @var Conf $conf
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 $action = GETPOST('action', 'aZ09');
47 47
 $cancel = GETPOST('cancel', 'alpha');
48 48
 $backtopage = GETPOST('backtopage', 'alpha');
49
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
49
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
50 50
 
51 51
 // Initialize a technical objects
52 52
 $object = new Asset($db);
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
 $extrafields->fetch_name_optionals_label($object->table_element);
59 59
 
60 60
 // Load object
61
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
61
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'. Include fetch and fetch_thirdparty but not fetch_optionals
62 62
 if ($id > 0 || !empty($ref)) {
63
-	$upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1] . "/" . $object->id;
63
+	$upload_dir = $conf->asset->multidir_output[isset($object->entity) ? $object->entity : 1]."/".$object->id;
64 64
 }
65 65
 
66 66
 $permissiontoadd = $user->hasRight('asset', 'write'); // Used by the include of actions_addupdatedelete.inc.php
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 			$action = 'edit';
130 130
 		} else {
131 131
 			setEventMessage($langs->trans('RecordSaved'));
132
-			header("Location: " . $_SERVER["PHP_SELF"] . '?id=' . $object->id);
132
+			header("Location: ".$_SERVER["PHP_SELF"].'?id='.$object->id);
133 133
 			exit;
134 134
 		}
135 135
 	}
@@ -165,29 +165,29 @@  discard block
 block discarded – undo
165 165
 	print '<br>';
166 166
 
167 167
 	if ($action == 'edit') {
168
-		print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '">';
169
-		print '<input type="hidden" name="token" value="' . newToken() . '">';
168
+		print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'">';
169
+		print '<input type="hidden" name="token" value="'.newToken().'">';
170 170
 		print '<input type="hidden" name="action" value="update">';
171 171
 		if ($backtopage) {
172
-			print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
172
+			print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
173 173
 		}
174 174
 		if ($backtopageforcancel) {
175
-			print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">';
175
+			print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">';
176 176
 		}
177 177
 
178
-		include DOL_DOCUMENT_ROOT . '/asset/tpl/depreciation_options_edit.tpl.php';
178
+		include DOL_DOCUMENT_ROOT.'/asset/tpl/depreciation_options_edit.tpl.php';
179 179
 
180 180
 		print $form->buttonsSaveCancel();
181 181
 
182 182
 		print '</form>';
183 183
 	} else {
184
-		include DOL_DOCUMENT_ROOT . '/asset/tpl/depreciation_options_view.tpl.php';
184
+		include DOL_DOCUMENT_ROOT.'/asset/tpl/depreciation_options_view.tpl.php';
185 185
 	}
186 186
 
187 187
 	print dol_get_fiche_end();
188 188
 
189 189
 	if ($action != 'edit') {
190
-		print '<div class="tabsAction">' . "\n";
190
+		print '<div class="tabsAction">'."\n";
191 191
 		$parameters = array();
192 192
 		$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
193 193
 		if ($reshook < 0) {
@@ -196,10 +196,10 @@  discard block
 block discarded – undo
196 196
 
197 197
 		if (empty($reshook)) {
198 198
 			if ($object->status == $object::STATUS_DRAFT/* && !empty($object->enabled_modes)*/) {
199
-				print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=edit&token=' . newToken(), '', $permissiontoadd);
199
+				print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
200 200
 			}
201 201
 		}
202
-		print '</div>' . "\n";
202
+		print '</div>'."\n";
203 203
 	}
204 204
 }
205 205
 
Please login to merge, or discard this patch.
htdocs/core/tpl/subtotal_edit.tpl.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 echo '<tr class="oddeven tredited">';
58 58
 
59 59
 if (getDolGlobalString('MAIN_VIEW_LINE_NUMBER')) {
60
-	echo '<td class="linecolnum center">' . ($i + 1) . '</td>';
60
+	echo '<td class="linecolnum center">'.($i + 1).'</td>';
61 61
 }
62 62
 
63 63
 // Base colspan if there is no module activated to display line correctly
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 	if (!$situationinvoicelinewithparent) {
127 127
 		print '<input type="text" name="line_desc" class="marginrightonly" id="line_desc" value="';
128
-		print GETPOSTISSET('product_desc') ? GETPOST('product_desc', 'restricthtml') : $line->description . '"';
128
+		print GETPOSTISSET('product_desc') ? GETPOST('product_desc', 'restricthtml') : $line->description.'"';
129 129
 		$disabled = 0;
130 130
 		if ($line_type == 'subtotal') {
131 131
 			print ' readonly="readonly"';
@@ -135,19 +135,19 @@  discard block
 block discarded – undo
135 135
 		$depth_array = $this->getPossibleLevels($langs);
136 136
 		print $form->selectarray('line_depth', $depth_array, abs($line->qty), 0, 0, 0, '', 0, 0, $disabled);
137 137
 		if ($disabled) {
138
-			print '<input type="hidden" name="line_depth" value="' . $line->qty . '">';
138
+			print '<input type="hidden" name="line_depth" value="'.$line->qty.'">';
139 139
 		}
140 140
 		print '<div><ul class="ecmjqft">';
141 141
 		foreach ($line_options as $key => $value) {
142 142
 			if (in_array($line_type, $value['type'])) {
143
-				print '<li><label for="' . $key . '">' . $langs->trans($value['trans_key']) . '</label>';
144
-				print '<input style="float: left;margin-top: 9px;" id="' . $key . '" type="checkbox" name="' . $key . '" value="' . $value['value'] . '" ';
143
+				print '<li><label for="'.$key.'">'.$langs->trans($value['trans_key']).'</label>';
144
+				print '<input style="float: left;margin-top: 9px;" id="'.$key.'" type="checkbox" name="'.$key.'" value="'.$value['value'].'" ';
145 145
 				print $value['checked'] ? 'checked' : '';
146 146
 				print '></li>';
147 147
 			}
148 148
 		}
149 149
 		print '</ul></div></td>';
150
-		print '<td colspan="' . $colspan . '" class="right"></td>';
150
+		print '<td colspan="'.$colspan.'" class="right"></td>';
151 151
 	} else {
152 152
 		print '<input type="text" readonly name="line_desc" id="line_desc" value="';
153 153
 		print GETPOSTISSET('product_desc') ? GETPOST('product_desc', 'restricthtml') : $line->description;
Please login to merge, or discard this patch.
htdocs/core/modules/DolibarrModules.class.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
 	public const KEY_ID = 0;
145 145
 	public const KEY_LABEL = 1;
146
-	public const KEY_TYPE = 2;	// deprecated
146
+	public const KEY_TYPE = 2; // deprecated
147 147
 	public const KEY_DEFAULT = 3;
148 148
 	public const KEY_FIRST_LEVEL = 4;
149 149
 	public const KEY_SECOND_LEVEL = 5;
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 				$moduleNameInConf = 'supplier_proposal';
735 735
 			}
736 736
 
737
-			unset($conf->modules[$moduleNameInConf]);	// Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used)
737
+			unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used)
738 738
 
739 739
 			return 1;
740 740
 		} else {
@@ -830,7 +830,7 @@  discard block
 block discarded – undo
830 830
 		$pathoffile = $this->getDescLongReadmeFound();
831 831
 
832 832
 		if ($pathoffile) {     // Mostly for external modules
833
-			$content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024);	// Max size loaded 1Mb
833
+			$content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024); // Max size loaded 1Mb
834 834
 
835 835
 			if ((float) DOL_VERSION >= 6.0) {  // @phpstan-ignore-line
836 836
 				@include_once DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php';
@@ -1594,7 +1594,7 @@  discard block
 block discarded – undo
1594 1594
 
1595 1595
 				$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def";
1596 1596
 				$sql .= " WHERE file = '".$this->db->escape($file)."'";
1597
-				$sql .= " AND entity = ".$conf->entity;		// Do not use getEntity here, we want to delete only in current company
1597
+				$sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company
1598 1598
 
1599 1599
 				dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG);
1600 1600
 				$resql = $this->db->query($sql);
@@ -1617,9 +1617,9 @@  discard block
 block discarded – undo
1617 1617
 	public function insert_cronjobs()
1618 1618
 	{
1619 1619
 		// phpcs:enable
1620
-		include_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
1621
-		include_once DOL_DOCUMENT_ROOT . '/cron/class/cronjob.class.php';
1622
-		include_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
1620
+		include_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
1621
+		include_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
1622
+		include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
1623 1623
 
1624 1624
 		global $conf, $user;
1625 1625
 
@@ -1630,7 +1630,7 @@  discard block
 block discarded – undo
1630 1630
 		$err = 0;
1631 1631
 
1632 1632
 		if (is_array($this->cronjobs)) {
1633
-			dol_syslog(get_class($this) . "::insert_cronjobs", LOG_DEBUG);
1633
+			dol_syslog(get_class($this)."::insert_cronjobs", LOG_DEBUG);
1634 1634
 
1635 1635
 			foreach ($this->cronjobs as $key => $value) {
1636 1636
 				$now = dol_now();
@@ -1657,7 +1657,7 @@  discard block
 block discarded – undo
1657 1657
 				$test = isset($value['test']) ? $value['test'] : ''; // Line must be enabled or not (so visible or not)
1658 1658
 
1659 1659
 				// Search if cron entry already present
1660
-				$sql = "SELECT count(*) as nb FROM " . MAIN_DB_PREFIX . "cronjob";
1660
+				$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."cronjob";
1661 1661
 				//$sql .= " WHERE module_name = '" . $this->db->escape(empty($this->rights_class) ? strtolower($this->name) : $this->rights_class) . "'";
1662 1662
 				$sql .= " WHERE label = '".$this->db->escape($label)."'";
1663 1663
 				/* unique key is on label,entity so no need for this test
@@ -1677,7 +1677,7 @@  discard block
 block discarded – undo
1677 1677
 					$sql .= " AND params = '" . $this->db->escape($params) . "'";
1678 1678
 				}
1679 1679
 				*/
1680
-				$sql .= " AND entity = " . ((int) $entity); // Must be exact entity
1680
+				$sql .= " AND entity = ".((int) $entity); // Must be exact entity
1681 1681
 
1682 1682
 				$result = $this->db->query($sql);
1683 1683
 				if (!$result) {
@@ -1997,9 +1997,9 @@  discard block
 block discarded – undo
1997 1997
 
1998 1998
 				// If the module is active
1999 1999
 				foreach ($this->rights as $key => $value) {
2000
-					$r_id = $this->rights[$key][self::KEY_ID];	// permission id in llx_rights_def (not unique because primary key is couple id-entity)
2000
+					$r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity)
2001 2001
 					$r_label = $this->rights[$key][self::KEY_LABEL];
2002
-					$r_type	= $this->rights[$key][self::KEY_TYPE] ?? 'w';	// TODO deprecated
2002
+					$r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated
2003 2003
 					$r_default = $this->rights[$key][self::KEY_DEFAULT] ?? 0;
2004 2004
 					$r_perms = $this->rights[$key][self::KEY_FIRST_LEVEL] ?? '';
2005 2005
 					$r_subperms = $this->rights[$key][self::KEY_SECOND_LEVEL] ?? '';
@@ -2027,7 +2027,7 @@  discard block
 block discarded – undo
2027 2027
 					}
2028 2028
 
2029 2029
 					// condition to show or hide a user right (default: 1) (eg isModEnabled('anothermodule') or ($conf->global->MAIN_FEATURES_LEVEL > 0) or etc..)
2030
-					$r_enabled	= $this->rights[$key][self::KEY_ENABLED] ?? '1';
2030
+					$r_enabled = $this->rights[$key][self::KEY_ENABLED] ?? '1';
2031 2031
 
2032 2032
 					// Search if perm already present
2033 2033
 					$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."rights_def";
@@ -2044,10 +2044,10 @@  discard block
 block discarded – undo
2044 2044
 							$sql .= ", libelle";
2045 2045
 							$sql .= ", module";
2046 2046
 							$sql .= ", module_origin";
2047
-							$sql .= ", module_position";		// Not that module_position can be fixed eynamically when accessing page user/perms.php
2047
+							$sql .= ", module_position"; // Not that module_position can be fixed eynamically when accessing page user/perms.php
2048 2048
 							$sql .= ", family";
2049 2049
 							$sql .= ", family_position";
2050
-							$sql .= ", type";	// Not used yet
2050
+							$sql .= ", type"; // Not used yet
2051 2051
 							$sql .= ", bydefault";
2052 2052
 							$sql .= ", perms";
2053 2053
 							$sql .= ", subperms";
@@ -2061,7 +2061,7 @@  discard block
 block discarded – undo
2061 2061
 							$sql .= ", '".$this->db->escape((string) $r_module_position)."'";
2062 2062
 							$sql .= ", '".$this->db->escape($r_family)."'";
2063 2063
 							$sql .= ", '".$this->db->escape((string) $r_family_position)."'";
2064
-							$sql .= ", '".$this->db->escape($r_type)."'";	// Not used yet
2064
+							$sql .= ", '".$this->db->escape($r_type)."'"; // Not used yet
2065 2065
 							$sql .= ", ".((int) $r_default);
2066 2066
 							$sql .= ", '".$this->db->escape($r_perms)."'";
2067 2067
 							$sql .= ", '".$this->db->escape($r_subperms)."'";
@@ -2283,7 +2283,7 @@  discard block
 block discarded – undo
2283 2283
 
2284 2284
 		$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu";
2285 2285
 		$sql .= " WHERE module = '".$this->db->escape($module)."'";
2286
-		$sql .= " AND menu_handler = 'all'";	// We delete only lines that were added manually or by the module activation. We keep entry added by menuhandler like 'auguria'
2286
+		$sql .= " AND menu_handler = 'all'"; // We delete only lines that were added manually or by the module activation. We keep entry added by menuhandler like 'auguria'
2287 2287
 		$sql .= " AND entity IN (0, ".$conf->entity.")";
2288 2288
 
2289 2289
 		dol_syslog(get_class($this)."::delete_menus", LOG_DEBUG);
@@ -2467,7 +2467,7 @@  discard block
 block discarded – undo
2467 2467
 						dol_delete_file($dest.'.zip');
2468 2468
 
2469 2469
 						// Compress it
2470
-						global $errormsg;	// Used by dol_compress_dir
2470
+						global $errormsg; // Used by dol_compress_dir
2471 2471
 						$errormsg = '';
2472 2472
 						$result = dol_compress_dir($src, $dest.'.zip', 'zip');
2473 2473
 						if ($result < 0) {
@@ -2667,36 +2667,36 @@  discard block
 block discarded – undo
2667 2667
 		}
2668 2668
 
2669 2669
 		if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) {
2670
-			$versionTitle =  $langs->trans("Version").' '.$this->getVersion(1);
2670
+			$versionTitle = $langs->trans("Version").' '.$this->getVersion(1);
2671 2671
 			if ($this->needUpdate) {
2672 2672
 				$versionTitle .= '<br>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion;
2673 2673
 			}
2674 2674
 
2675
-			$return .=  '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >';
2676
-			$return .=  $this->getVersion(1);
2677
-			$return .=  '</span>';
2675
+			$return .= '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >';
2676
+			$return .= $this->getVersion(1);
2677
+			$return .= '</span>';
2678 2678
 		}
2679 2679
 
2680
-		$return .=  '</div>
2680
+		$return .= '</div>
2681 2681
 	    <div class="info-box-content info-box-text-module'.(!getDolGlobalString($const_name) ? '' : ' info-box-module-enabled'.($versiontrans ? ' info-box-content-warning' : '')).'">
2682 2682
 	    <span class="info-box-title">'.$this->getName().'</span>
2683 2683
 	    <span class="info-box-desc twolinesmax opacitymedium" title="'.dol_escape_htmltag($this->getDesc()).'">'.nl2br($this->getDesc()).'</span>';
2684 2684
 
2685
-		$return .=  '<div class="valignmiddle inline-block info-box-more">';
2685
+		$return .= '<div class="valignmiddle inline-block info-box-more">';
2686 2686
 		//if ($versiontrans) print img_warning($langs->trans("Version").' '.$this->getVersion(1)).' ';
2687
-		$return .=  '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.((int) $this->numero).'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>';
2688
-		$return .=  '</div><br>';
2689
-
2690
-		$return .=  '<div class="valignmiddle inline-block info-box-actions">';
2691
-		$return .=  '<div class="valignmiddle inline-block info-box-setup">';
2692
-		$return .=  $codetoconfig;
2693
-		$return .=  '</div>';
2694
-		$return .=  '<div class="valignmiddle inline-block marginleftonly marginrightonly">';
2695
-		$return .=  $codeenabledisable;
2696
-		$return .=  '</div>';
2697
-		$return .=  '</div>';
2698
-
2699
-		$return .=  '
2687
+		$return .= '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.((int) $this->numero).'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>';
2688
+		$return .= '</div><br>';
2689
+
2690
+		$return .= '<div class="valignmiddle inline-block info-box-actions">';
2691
+		$return .= '<div class="valignmiddle inline-block info-box-setup">';
2692
+		$return .= $codetoconfig;
2693
+		$return .= '</div>';
2694
+		$return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">';
2695
+		$return .= $codeenabledisable;
2696
+		$return .= '</div>';
2697
+		$return .= '</div>';
2698
+
2699
+		$return .= '
2700 2700
 	    </div><!-- /.info-box-content -->
2701 2701
 	    </div><!-- /.info-box -->
2702 2702
 	    </div>';
@@ -2716,7 +2716,7 @@  discard block
 block discarded – undo
2716 2716
 	{
2717 2717
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
2718 2718
 		if (!empty($this->url_last_version)) {
2719
-			$lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0);	// Accept http or https links on external remote server only
2719
+			$lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
2720 2720
 			if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) {
2721 2721
 				// Security warning :  be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . -
2722 2722
 				$this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']);
@@ -2753,7 +2753,7 @@  discard block
 block discarded – undo
2753 2753
 		if (empty($conf->cache['noncompliantmodules'])) {
2754 2754
 			require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
2755 2755
 
2756
-			$result = getURLContent(self::URL_FOR_BLACKLISTED_MODULES, 'GET', '', 1, array(), array('http', 'https'), 0);	// Accept http or https links on external remote server only
2756
+			$result = getURLContent(self::URL_FOR_BLACKLISTED_MODULES, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
2757 2757
 			if (isset($result['content']) && $result['http_code'] == 200) {
2758 2758
 				$langs->load("errors");
2759 2759
 
Please login to merge, or discard this patch.
htdocs/webhook/triggerhistory_card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -69,14 +69,14 @@
 block discarded – undo
69 69
 // Get parameters
70 70
 $id = GETPOSTINT('id');
71 71
 $ref = GETPOST('ref', 'alpha');
72
-$lineid   = GETPOSTINT('lineid');
72
+$lineid = GETPOSTINT('lineid');
73 73
 
74 74
 $action = GETPOST('action', 'aZ09');
75 75
 $confirm = GETPOST('confirm', 'alpha');
76 76
 $cancel = GETPOST('cancel', 'alpha');
77 77
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
78
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
79
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
78
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
79
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
80 80
 $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
81 81
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
82 82
 
Please login to merge, or discard this patch.
htdocs/accountancy/admin/fiscalyear_card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@
 block discarded – undo
48 48
 $confirm = GETPOST('confirm', 'alpha');
49 49
 $cancel = GETPOST('cancel', 'alpha');
50 50
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
51
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
52
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
51
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
52
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
53 53
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
54 54
 
55 55
 $error = 0;
Please login to merge, or discard this patch.
htdocs/ai/admin/custom_prompt.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $action = GETPOST('action', 'aZ09');
48 48
 $backtopage = GETPOST('backtopage', 'alpha');
49 49
 $cancel = GETPOST('cancel', 'alpha');
50
-$modulepart = GETPOST('modulepart', 'aZ09');	// Used by actions_setmoduleoptions.inc.php
50
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
51 51
 
52 52
 $functioncode = GETPOST('functioncode', 'alpha');
53 53
 $pre_prompt = GETPOST('prePrompt');
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	if (preg_match('/^text/', $featurekey)) {
87 87
 		$newkey = 'textgeneration';
88 88
 	}
89
-	$item = $formSetup->newItem('AI_API_'.strtoupper($aiservice).'_MODEL_'.$feature["function"]);	// Name of constant must end with _KEY so it is encrypted when saved into database.
89
+	$item = $formSetup->newItem('AI_API_'.strtoupper($aiservice).'_MODEL_'.$feature["function"]); // Name of constant must end with _KEY so it is encrypted when saved into database.
90 90
 	if ($arrayofai[$aiservice][$newkey] != 'na') {
91 91
 		$item->nameText = $langs->trans("AI_API_MODEL_".$feature["function"]).' <span class="opacitymedium">('.$langs->trans("Default").' = '.$arrayofai[$aiservice][$newkey].')</span>';
92 92
 	} else {
@@ -400,9 +400,9 @@  discard block
 block discarded – undo
400 400
 
401 401
 			include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
402 402
 			$formmail = new FormMail($db);
403
-			$formmail->withaiprompt = 'html';		// set format
403
+			$formmail->withaiprompt = 'html'; // set format
404 404
 
405
-			$showlinktoai = $confkey;		// 'textgenerationemail', 'textgenerationwebpage', 'imagegeneration', ...
405
+			$showlinktoai = $confkey; // 'textgenerationemail', 'textgenerationwebpage', 'imagegeneration', ...
406 406
 			$showlinktoailabel = $langs->trans("ToTest");
407 407
 			$htmlname = $confkey;
408 408
 			$onlyenhancements = $confkey;
Please login to merge, or discard this patch.