Completed
Branch develop (05c624)
by
unknown
25:12
created
htdocs/fourn/class/fournisseur.product.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	/**
149 149
 	 * @var ?float
150 150
 	 */
151
-	public $fourn_charges;	// when getDolGlobalString('PRODUCT_CHARGES') is set
151
+	public $fourn_charges; // when getDolGlobalString('PRODUCT_CHARGES') is set
152 152
 
153 153
 
154 154
 	/* Properties found into product_fournisseur_price */
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	/**
187 187
 	 * @var float|int
188 188
 	 */
189
-	public $fourn_unitprice_with_discount;	// not saved into database
189
+	public $fourn_unitprice_with_discount; // not saved into database
190 190
 	/**
191 191
 	 * @var string
192 192
 	 */
@@ -532,7 +532,7 @@  discard block
 block discarded – undo
532 532
 			}
533 533
 			$sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price";
534 534
 			$sql .= " SET fk_user = ".((int) $user->id)." ,";
535
-			$sql .= " datec = '".$this->db->idate($now)."' ,";	// Note: Even if this is an update, we update the creation date as the log of each change is tracked into product_fournisseur_log.
535
+			$sql .= " datec = '".$this->db->idate($now)."' ,"; // Note: Even if this is an update, we update the creation date as the log of each change is tracked into product_fournisseur_log.
536 536
 			$sql .= " ref_fourn = '".$this->db->escape($ref_fourn)."',";
537 537
 			$sql .= " desc_fourn = '".$this->db->escape($desc_fourn)."',";
538 538
 			$sql .= " price = ".((float) $buyprice).",";
@@ -754,8 +754,8 @@  discard block
 block discarded – undo
754 754
 
755 755
 				$this->fk_product				= $obj->fk_product;
756 756
 				$this->product_id				= $obj->fk_product;
757
-				$this->product_ref				= $obj->product_ref;
758
-				$this->status					= $obj->status;
757
+				$this->product_ref = $obj->product_ref;
758
+				$this->status = $obj->status;
759 759
 				$this->status_buy				= $obj->status_buy;
760 760
 				$this->fourn_id					= $obj->fk_soc;
761 761
 				$this->fourn_ref				= $obj->ref_fourn; // deprecated
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
 						$this->fourn_unitprice_with_discount = $fourn_unitprice_with_discount;
1044 1044
 						$this->fourn_charges            = $record["charges"]; // when getDolGlobalString('PRODUCT_CHARGES') is set
1045 1045
 						$this->fourn_tva_tx             = $record["tva_tx"];
1046
-						$this->fourn_id                 = $record["fourn_id"];	// thirdparty id
1046
+						$this->fourn_id                 = $record["fourn_id"]; // thirdparty id
1047 1047
 						$this->fourn_name               = $record["supplier_name"];
1048 1048
 						$this->delivery_time_days = $record["delivery_time_days"];
1049 1049
 						// False positive @phan-suppress-next-line PhanTypeMismatchProperty
@@ -1448,7 +1448,7 @@  discard block
 block discarded – undo
1448 1448
 		}
1449 1449
 
1450 1450
 		global $action;
1451
-		$hookmanager->initHooks(array($this->element . 'dao'));
1451
+		$hookmanager->initHooks(array($this->element.'dao'));
1452 1452
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
1453 1453
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
1454 1454
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/core/modules/modEventOrganization.class.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -232,82 +232,82 @@  discard block
 block discarded – undo
232 232
 		/* END MODULEBUILDER TOPMENU */
233 233
 		/* BEGIN MODULEBUILDER LEFTMENU CONFERENCEORBOOTH*/
234 234
 		$this->menu[$r++] = array(
235
-			'fk_menu' => 'fk_mainmenu=project',	    // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
236
-			'type' => 'left',			                // This is a Left menu entry
235
+			'fk_menu' => 'fk_mainmenu=project', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
236
+			'type' => 'left', // This is a Left menu entry
237 237
 			'titre' => 'EventOrganizationMenuLeft',
238 238
 			'prefix' => img_picto('', 'eventorganization', 'class="paddingright pictofixedwidth"'),
239 239
 			'mainmenu' => 'project',
240 240
 			'leftmenu' => 'eventorganization',
241 241
 			'url' => '',
242
-			'langs' => 'eventorganization',	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
242
+			'langs' => 'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
243 243
 			'position' => 1000 + $r,
244
-			'enabled' => 'isModEnabled("eventorganization")',  // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
245
-			'perms' => '$user->hasRight("project", "read")',			                // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
244
+			'enabled' => 'isModEnabled("eventorganization")', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
245
+			'perms' => '$user->hasRight("project", "read")', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
246 246
 			'target' => '',
247
-			'user' => 2,				                // 0=Menu for internal users, 1=external users, 2=both
247
+			'user' => 2, // 0=Menu for internal users, 1=external users, 2=both
248 248
 		);
249 249
 		$this->menu[$r++] = array(
250
-			'fk_menu' => 'fk_mainmenu=project,fk_leftmenu=eventorganization',	    // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
251
-			'type' => 'left',			                // This is a Left menu entry
250
+			'fk_menu' => 'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
251
+			'type' => 'left', // This is a Left menu entry
252 252
 			'titre' => 'New',
253 253
 			'url' => '/projet/card.php?leftmenu=projects&action=create&usage_organize_event=1&usage_opportunity=0',
254
-			'langs' => 'eventorganization@eventorganization',	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
254
+			'langs' => 'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
255 255
 			'position' => 1000 + $r,
256
-			'enabled' => 'isModEnabled("eventorganization")',  // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
257
-			'perms' => '$user->hasRight("project", "write")',			                // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
256
+			'enabled' => 'isModEnabled("eventorganization")', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
257
+			'perms' => '$user->hasRight("project", "write")', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
258 258
 			'target' => '',
259
-			'user' => 2,				                // 0=Menu for internal users, 1=external users, 2=both
259
+			'user' => 2, // 0=Menu for internal users, 1=external users, 2=both
260 260
 		);
261 261
 		$this->menu[$r++] = array(
262
-			'fk_menu' => 'fk_mainmenu=project,fk_leftmenu=eventorganization',	    // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
263
-			'type' => 'left',			                // This is a Left menu entry
262
+			'fk_menu' => 'fk_mainmenu=project,fk_leftmenu=eventorganization', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
263
+			'type' => 'left', // This is a Left menu entry
264 264
 			'titre' => 'List',
265 265
 			'url' => '/projet/list.php?search_usage_event_organization=1&search_status=99&mainmenu=project&contextpage=organizedevents',
266
-			'langs' => 'eventorganization@eventorganization',	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
266
+			'langs' => 'eventorganization@eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
267 267
 			'position' => 1000 + $r,
268
-			'enabled' => 'isModEnabled("eventorganization")',  // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
269
-			'perms' => '$user->hasRight("project", "write")',			                // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
268
+			'enabled' => 'isModEnabled("eventorganization")', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
269
+			'perms' => '$user->hasRight("project", "write")', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
270 270
 			'target' => '',
271
-			'user' => 2,				                // 0=Menu for internal users, 1=external users, 2=both
271
+			'user' => 2, // 0=Menu for internal users, 1=external users, 2=both
272 272
 		);
273 273
 		$this->menu[$r++] = array(
274
-			'fk_menu' => 'fk_mainmenu=project',	    // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
275
-			'type' => 'left',			                // This is a Left menu entry
274
+			'fk_menu' => 'fk_mainmenu=project', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
275
+			'type' => 'left', // This is a Left menu entry
276 276
 			'titre' => 'ConferenceOrBooth',
277 277
 			'prefix' => img_picto('', 'conferenceorbooth', 'class="paddingright pictofixedwidth"'),
278 278
 			'mainmenu' => 'project',
279 279
 			'leftmenu' => 'eventorganizationconforbooth',
280 280
 			'url' => '',
281
-			'langs' => 'eventorganization',	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
281
+			'langs' => 'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
282 282
 			'position' => 1000 + $r,
283
-			'enabled' => 'isModEnabled("eventorganization")',  // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
284
-			'perms' => '$user->hasRight("project", "read")',			                // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
283
+			'enabled' => 'isModEnabled("eventorganization")', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
284
+			'perms' => '$user->hasRight("project", "read")', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
285 285
 			'target' => '',
286
-			'user' => 2,				                // 0=Menu for internal users, 1=external users, 2=both
286
+			'user' => 2, // 0=Menu for internal users, 1=external users, 2=both
287 287
 		);
288 288
 		$this->menu[$r++] = array(
289
-			'fk_menu' => 'fk_mainmenu=project,fk_leftmenu=eventorganizationconforbooth',	    // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
290
-			'type' => 'left',			                // This is a Left menu entry
289
+			'fk_menu' => 'fk_mainmenu=project,fk_leftmenu=eventorganizationconforbooth', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
290
+			'type' => 'left', // This is a Left menu entry
291 291
 			'titre' => 'New',
292 292
 			'url' => '/eventorganization/conferenceorbooth_card.php?leftmenu=projects&action=create',
293
-			'langs' => 'eventorganization',	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
293
+			'langs' => 'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
294 294
 			'position' => 1000 + $r,
295
-			'enabled' => 'isModEnabled("eventorganization")',  // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
296
-			'perms' => '$user->hasRight("project", "write")',			                // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
295
+			'enabled' => 'isModEnabled("eventorganization")', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
296
+			'perms' => '$user->hasRight("project", "write")', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
297 297
 			'target' => '',
298
-			'user' => 2,				                // 0=Menu for internal users, 1=external users, 2=both
298
+			'user' => 2, // 0=Menu for internal users, 1=external users, 2=both
299 299
 		);
300 300
 		$this->menu[$r++] = array(
301
-			'fk_menu' => 'fk_mainmenu=project,fk_leftmenu=eventorganizationconforbooth',	    // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
302
-			'type' => 'left',			                // This is a Left menu entry
301
+			'fk_menu' => 'fk_mainmenu=project,fk_leftmenu=eventorganizationconforbooth', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
302
+			'type' => 'left', // This is a Left menu entry
303 303
 			'titre' => 'List',
304 304
 			'url' => '/eventorganization/conferenceorbooth_list.php?mainmenu=project',
305
-			'langs' => 'eventorganization',	        // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
305
+			'langs' => 'eventorganization', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
306 306
 			'position' => 1000 + $r,
307
-			'enabled' => 'isModEnabled("eventorganization")',  // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
308
-			'perms' => '$user->hasRight("project", "read")',			                // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
307
+			'enabled' => 'isModEnabled("eventorganization")', // Define condition to show or hide menu entry. Use '$conf->eventorganization->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
308
+			'perms' => '$user->hasRight("project", "read")', // Use 'perms'=>'$user->rights->eventorganization->level1->level2' if you want your menu with a permission rules
309 309
 			'target' => '',
310
-			'user' => 2,				                // 0=Menu for internal users, 1=external users, 2=both
310
+			'user' => 2, // 0=Menu for internal users, 1=external users, 2=both
311 311
 		);
312 312
 		/* END MODULEBUILDER LEFTMENU CONFERENCEORBOOTH */
313 313
 
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 		/* BEGIN MODULEBUILDER EXPORT CONFERENCEORBOOTHATTENDEES */
318 318
 		$langs->load("eventorganization");
319 319
 		$this->export_code[$r] = $this->rights_class.'_'.$r;
320
-		$this->export_label[$r] = 'ListOfAttendeesOfEvent';	// Translation key (used only if key ExportDataset_xxx_z not found)
320
+		$this->export_label[$r] = 'ListOfAttendeesOfEvent'; // Translation key (used only if key ExportDataset_xxx_z not found)
321 321
 		$this->export_icon[$r] = $this->picto;
322 322
 		// Define $this->export_fields_array, $this->export_TypeFields_array and $this->export_entities_array
323 323
 		$keyforclass = 'ConferenceOrBoothAttendee';
@@ -325,8 +325,8 @@  discard block
 block discarded – undo
325 325
 		$keyforelement = 'conferenceorboothattendee';
326 326
 		include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php';
327 327
 		$this->export_entities_array[$r]['t.fk_invoice'] = 'invoice';
328
-		unset($this->export_fields_array[$r]['t.fk_project']);	// Remove field so we can add it at end just after
329
-		unset($this->export_fields_array[$r]['t.fk_soc']);	// Remove field so we can add it at end just after
328
+		unset($this->export_fields_array[$r]['t.fk_project']); // Remove field so we can add it at end just after
329
+		unset($this->export_fields_array[$r]['t.fk_soc']); // Remove field so we can add it at end just after
330 330
 		$this->export_fields_array[$r]['t.fk_invoice'] = 'InvoiceId';
331 331
 		$this->export_fields_array[$r]['t.fk_project'] = 'ProjectId';
332 332
 		$this->export_fields_array[$r]['p.ref'] = 'ProjectRef';
@@ -358,16 +358,16 @@  discard block
 block discarded – undo
358 358
 		/* BEGIN MODULEBUILDER EXPORT CONFERENCEORBOOTH */
359 359
 		$langs->load("eventorganization");
360 360
 		$this->export_code[$r] = $this->rights_class.'_'.$r;
361
-		$this->export_label[$r] = 'ListOfConfOrBoothOfEvent';	// Translation key (used only if key ExportDataset_xxx_z not found)
361
+		$this->export_label[$r] = 'ListOfConfOrBoothOfEvent'; // Translation key (used only if key ExportDataset_xxx_z not found)
362 362
 		$this->export_icon[$r] = 'conferenceorbooth';
363 363
 		// Define $this->export_fields_array, $this->export_TypeFields_array and $this->export_entities_array
364 364
 		$keyforclass = 'ConferenceOrBooth';
365 365
 		$keyforclassfile = '/eventorganization/class/conferenceorbooth.class.php';
366 366
 		$keyforelement = 'conferenceorbooth';
367 367
 		include DOL_DOCUMENT_ROOT.'/core/commonfieldsinexport.inc.php';
368
-		unset($this->export_fields_array[$r]['t.fk_action']);	// Remove field so we can add it at end just after
369
-		unset($this->export_fields_array[$r]['t.fk_project']);	// Remove field so we can add it at end just after
370
-		unset($this->export_fields_array[$r]['t.fk_soc']);	// Remove field so we can add it at end just after
368
+		unset($this->export_fields_array[$r]['t.fk_action']); // Remove field so we can add it at end just after
369
+		unset($this->export_fields_array[$r]['t.fk_project']); // Remove field so we can add it at end just after
370
+		unset($this->export_fields_array[$r]['t.fk_soc']); // Remove field so we can add it at end just after
371 371
 		$this->export_fields_array[$r]['t.fk_action'] = 'ConferenceOrBoothFormatID';
372 372
 		$this->export_fields_array[$r]['ca.code'] = 'ConferenceOrBoothFormatCode';
373 373
 		$this->export_fields_array[$r]['ca.libelle'] = 'ConferenceOrBoothFormatLabel';
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
 	const KEY_ID = 0;
145 145
 	const KEY_LABEL = 1;
146
-	const KEY_TYPE = 2;	// deprecated
146
+	const KEY_TYPE = 2; // deprecated
147 147
 	const KEY_DEFAULT = 3;
148 148
 	const KEY_FIRST_LEVEL = 4;
149 149
 	const KEY_SECOND_LEVEL = 5;
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
 				$moduleNameInConf = 'supplier_proposal';
730 730
 			}
731 731
 
732
-			unset($conf->modules[$moduleNameInConf]);	// Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used)
732
+			unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used)
733 733
 
734 734
 			return 1;
735 735
 		} else {
@@ -825,7 +825,7 @@  discard block
 block discarded – undo
825 825
 		$pathoffile = $this->getDescLongReadmeFound();
826 826
 
827 827
 		if ($pathoffile) {     // Mostly for external modules
828
-			$content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024);	// Max size loaded 1Mb
828
+			$content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024); // Max size loaded 1Mb
829 829
 
830 830
 			if ((float) DOL_VERSION >= 6.0) {  // @phpstan-ignore-line
831 831
 				@include_once DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php';
@@ -1589,7 +1589,7 @@  discard block
 block discarded – undo
1589 1589
 
1590 1590
 				$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def";
1591 1591
 				$sql .= " WHERE file = '".$this->db->escape($file)."'";
1592
-				$sql .= " AND entity = ".$conf->entity;		// Do not use getEntity here, we want to delete only in current company
1592
+				$sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company
1593 1593
 
1594 1594
 				dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG);
1595 1595
 				$resql = $this->db->query($sql);
@@ -1612,9 +1612,9 @@  discard block
 block discarded – undo
1612 1612
 	public function insert_cronjobs()
1613 1613
 	{
1614 1614
 		// phpcs:enable
1615
-		include_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
1616
-		include_once DOL_DOCUMENT_ROOT . '/cron/class/cronjob.class.php';
1617
-		include_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
1615
+		include_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
1616
+		include_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
1617
+		include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
1618 1618
 
1619 1619
 		global $conf, $user;
1620 1620
 
@@ -1625,7 +1625,7 @@  discard block
 block discarded – undo
1625 1625
 		$err = 0;
1626 1626
 
1627 1627
 		if (is_array($this->cronjobs)) {
1628
-			dol_syslog(get_class($this) . "::insert_cronjobs", LOG_DEBUG);
1628
+			dol_syslog(get_class($this)."::insert_cronjobs", LOG_DEBUG);
1629 1629
 
1630 1630
 			foreach ($this->cronjobs as $key => $value) {
1631 1631
 				$now = dol_now();
@@ -1652,7 +1652,7 @@  discard block
 block discarded – undo
1652 1652
 				$test = isset($value['test']) ? $value['test'] : ''; // Line must be enabled or not (so visible or not)
1653 1653
 
1654 1654
 				// Search if cron entry already present
1655
-				$sql = "SELECT count(*) as nb FROM " . MAIN_DB_PREFIX . "cronjob";
1655
+				$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."cronjob";
1656 1656
 				//$sql .= " WHERE module_name = '" . $this->db->escape(empty($this->rights_class) ? strtolower($this->name) : $this->rights_class) . "'";
1657 1657
 				$sql .= " WHERE label = '".$this->db->escape($label)."'";
1658 1658
 				/* unique key is on label,entity so no need for this test
@@ -1672,7 +1672,7 @@  discard block
 block discarded – undo
1672 1672
 					$sql .= " AND params = '" . $this->db->escape($params) . "'";
1673 1673
 				}
1674 1674
 				*/
1675
-				$sql .= " AND entity = " . ((int) $entity); // Must be exact entity
1675
+				$sql .= " AND entity = ".((int) $entity); // Must be exact entity
1676 1676
 
1677 1677
 				$result = $this->db->query($sql);
1678 1678
 				if (!$result) {
@@ -1992,9 +1992,9 @@  discard block
 block discarded – undo
1992 1992
 
1993 1993
 				// If the module is active
1994 1994
 				foreach ($this->rights as $key => $value) {
1995
-					$r_id = $this->rights[$key][self::KEY_ID];	// permission id in llx_rights_def (not unique because primary key is couple id-entity)
1995
+					$r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity)
1996 1996
 					$r_label = $this->rights[$key][self::KEY_LABEL];
1997
-					$r_type	= $this->rights[$key][self::KEY_TYPE] ?? 'w';	// TODO deprecated
1997
+					$r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated
1998 1998
 					$r_default = $this->rights[$key][self::KEY_DEFAULT] ?? 0;
1999 1999
 					$r_perms = $this->rights[$key][self::KEY_FIRST_LEVEL] ?? '';
2000 2000
 					$r_subperms = $this->rights[$key][self::KEY_SECOND_LEVEL] ?? '';
@@ -2022,7 +2022,7 @@  discard block
 block discarded – undo
2022 2022
 					}
2023 2023
 
2024 2024
 					// condition to show or hide a user right (default: 1) (eg isModEnabled('anothermodule') or ($conf->global->MAIN_FEATURES_LEVEL > 0) or etc..)
2025
-					$r_enabled	= $this->rights[$key][self::KEY_ENABLED] ?? '1';
2025
+					$r_enabled = $this->rights[$key][self::KEY_ENABLED] ?? '1';
2026 2026
 
2027 2027
 					// Search if perm already present
2028 2028
 					$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."rights_def";
@@ -2039,10 +2039,10 @@  discard block
 block discarded – undo
2039 2039
 							$sql .= ", libelle";
2040 2040
 							$sql .= ", module";
2041 2041
 							$sql .= ", module_origin";
2042
-							$sql .= ", module_position";		// Not that module_position can be fixed eynamically when accessing page user/perms.php
2042
+							$sql .= ", module_position"; // Not that module_position can be fixed eynamically when accessing page user/perms.php
2043 2043
 							$sql .= ", family";
2044 2044
 							$sql .= ", family_position";
2045
-							$sql .= ", type";	// Not used yet
2045
+							$sql .= ", type"; // Not used yet
2046 2046
 							$sql .= ", bydefault";
2047 2047
 							$sql .= ", perms";
2048 2048
 							$sql .= ", subperms";
@@ -2056,7 +2056,7 @@  discard block
 block discarded – undo
2056 2056
 							$sql .= ", '".$this->db->escape($r_module_position)."'";
2057 2057
 							$sql .= ", '".$this->db->escape($r_family)."'";
2058 2058
 							$sql .= ", '".$this->db->escape($r_family_position)."'";
2059
-							$sql .= ", '".$this->db->escape($r_type)."'";	// Not used yet
2059
+							$sql .= ", '".$this->db->escape($r_type)."'"; // Not used yet
2060 2060
 							$sql .= ", ".((int) $r_default);
2061 2061
 							$sql .= ", '".$this->db->escape($r_perms)."'";
2062 2062
 							$sql .= ", '".$this->db->escape($r_subperms)."'";
@@ -2278,7 +2278,7 @@  discard block
 block discarded – undo
2278 2278
 
2279 2279
 		$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu";
2280 2280
 		$sql .= " WHERE module = '".$this->db->escape($module)."'";
2281
-		$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'
2281
+		$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'
2282 2282
 		$sql .= " AND entity IN (0, ".$conf->entity.")";
2283 2283
 
2284 2284
 		dol_syslog(get_class($this)."::delete_menus", LOG_DEBUG);
@@ -2462,7 +2462,7 @@  discard block
 block discarded – undo
2462 2462
 						dol_delete_file($dest.'.zip');
2463 2463
 
2464 2464
 						// Compress it
2465
-						global $errormsg;	// Used by dol_compress_dir
2465
+						global $errormsg; // Used by dol_compress_dir
2466 2466
 						$errormsg = '';
2467 2467
 						$result = dol_compress_dir($src, $dest.'.zip', 'zip');
2468 2468
 						if ($result < 0) {
@@ -2662,36 +2662,36 @@  discard block
 block discarded – undo
2662 2662
 		}
2663 2663
 
2664 2664
 		if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) {
2665
-			$versionTitle =  $langs->trans("Version").' '.$this->getVersion(1);
2665
+			$versionTitle = $langs->trans("Version").' '.$this->getVersion(1);
2666 2666
 			if ($this->needUpdate) {
2667 2667
 				$versionTitle .= '<br>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion;
2668 2668
 			}
2669 2669
 
2670
-			$return .=  '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >';
2671
-			$return .=  $this->getVersion(1);
2672
-			$return .=  '</span>';
2670
+			$return .= '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >';
2671
+			$return .= $this->getVersion(1);
2672
+			$return .= '</span>';
2673 2673
 		}
2674 2674
 
2675
-		$return .=  '</div>
2675
+		$return .= '</div>
2676 2676
 	    <div class="info-box-content info-box-text-module'.(!getDolGlobalString($const_name) ? '' : ' info-box-module-enabled'.($versiontrans ? ' info-box-content-warning' : '')).'">
2677 2677
 	    <span class="info-box-title">'.$this->getName().'</span>
2678 2678
 	    <span class="info-box-desc twolinesmax opacitymedium" title="'.dol_escape_htmltag($this->getDesc()).'">'.nl2br($this->getDesc()).'</span>';
2679 2679
 
2680
-		$return .=  '<div class="valignmiddle inline-block info-box-more">';
2680
+		$return .= '<div class="valignmiddle inline-block info-box-more">';
2681 2681
 		//if ($versiontrans) print img_warning($langs->trans("Version").' '.$this->getVersion(1)).' ';
2682
-		$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>';
2683
-		$return .=  '</div><br>';
2684
-
2685
-		$return .=  '<div class="valignmiddle inline-block info-box-actions">';
2686
-		$return .=  '<div class="valignmiddle inline-block info-box-setup">';
2687
-		$return .=  $codetoconfig;
2688
-		$return .=  '</div>';
2689
-		$return .=  '<div class="valignmiddle inline-block marginleftonly marginrightonly">';
2690
-		$return .=  $codeenabledisable;
2691
-		$return .=  '</div>';
2692
-		$return .=  '</div>';
2693
-
2694
-		$return .=  '
2682
+		$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>';
2683
+		$return .= '</div><br>';
2684
+
2685
+		$return .= '<div class="valignmiddle inline-block info-box-actions">';
2686
+		$return .= '<div class="valignmiddle inline-block info-box-setup">';
2687
+		$return .= $codetoconfig;
2688
+		$return .= '</div>';
2689
+		$return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">';
2690
+		$return .= $codeenabledisable;
2691
+		$return .= '</div>';
2692
+		$return .= '</div>';
2693
+
2694
+		$return .= '
2695 2695
 	    </div><!-- /.info-box-content -->
2696 2696
 	    </div><!-- /.info-box -->
2697 2697
 	    </div>';
@@ -2711,7 +2711,7 @@  discard block
 block discarded – undo
2711 2711
 	{
2712 2712
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
2713 2713
 		if (!empty($this->url_last_version)) {
2714
-			$lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0);	// Accept http or https links on external remote server only
2714
+			$lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
2715 2715
 			if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) {
2716 2716
 				// 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 _ . -
2717 2717
 				$this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']);
@@ -2748,7 +2748,7 @@  discard block
 block discarded – undo
2748 2748
 		if (empty($conf->cache['noncompliantmodules'])) {
2749 2749
 			require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
2750 2750
 
2751
-			$result = getURLContent(self::URL_FOR_BLACKLISTED_MODULES, 'GET', '', 1, array(), array('http', 'https'), 0);	// Accept http or https links on external remote server only
2751
+			$result = getURLContent(self::URL_FOR_BLACKLISTED_MODULES, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
2752 2752
 			if (isset($result['content']) && $result['http_code'] == 200) {
2753 2753
 				$langs->load("errors");
2754 2754
 
Please login to merge, or discard this patch.
htdocs/core/modules/modBlockedLog.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -174,9 +174,9 @@  discard block
 block discarded – undo
174 174
 		$hmac_encoded_secret_key = getDolGlobalString('BLOCKEDLOG_HMAC_KEY');
175 175
 		if (empty($hmac_encoded_secret_key)) {
176 176
 			// Add key
177
-			$hmac_secret_key = 'BLOCKEDLOGHMAC'.getRandomPassword(true);		// This is using random_int for 32 chars
177
+			$hmac_secret_key = 'BLOCKEDLOGHMAC'.getRandomPassword(true); // This is using random_int for 32 chars
178 178
 
179
-			$result = dolibarr_set_const($this->db, 'BLOCKEDLOG_HMAC_KEY', $hmac_secret_key, 'chaine', 0, 'The secret key for HMAC used for blockedlog record', 0);	// Will encrypt the value using dolCrypt and store it.
179
+			$result = dolibarr_set_const($this->db, 'BLOCKEDLOG_HMAC_KEY', $hmac_secret_key, 'chaine', 0, 'The secret key for HMAC used for blockedlog record', 0); // Will encrypt the value using dolCrypt and store it.
180 180
 
181 181
 			if ($result < 0) {
182 182
 				dol_print_error($this->db);
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 			// Decode the HMAC key
189 189
 			$hmac_secret_key = dolDecrypt($hmac_encoded_secret_key);
190 190
 
191
-			if (! preg_match('/^BLOCKEDLOGHMAC/', $hmac_secret_key)) {
191
+			if (!preg_match('/^BLOCKEDLOGHMAC/', $hmac_secret_key)) {
192 192
 				$this->error = 'Error: Failed to decode the crypted value of the parameter BLOCKEDLOG_HMAC_KEY using the $dolibarr_main_crypt_key. A value was found in config parameters in database but decoding failed. May be the database data were restored onto another environment and the coding/decoding key $dolibarr_main_dolcrypt_key was not restored with the same value in conf.php file.';
193 193
 				$this->error .= 'Restore the value of $dolibarr_main_crypt_key that was used for encryption in database and restart the migration.';
194 194
 				$this->error .= 'If you don\'t use the Unalterable Log module, you can also remove the BLOCKEDLOG_HMAC_KEY entry from llx_const table. If you use the Unalterable Log, this is not possible because this will invalidate all past record.';
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
 
204 204
 		// We add an entry to show we enable module
205
-		require_once DOL_DOCUMENT_ROOT . '/blockedlog/class/blockedlog.class.php';
205
+		require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
206 206
 
207 207
 		$object = new stdClass();
208 208
 		$object->id = 0;
Please login to merge, or discard this patch.