Completed
Branch develop (68d67a)
by
unknown
16:20
created
htdocs/bookcal/class/availabilities.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 	/**
102 102
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
103 103
 	 */
104
-	public $fields=array(
104
+	public $fields = array(
105 105
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>2, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
106 106
 		'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>0, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'help'=>"Help text", 'showoncombobox'=>'2', 'validate'=>'1',),
107 107
 		'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3, 'validate'=>'1',),
@@ -887,7 +887,7 @@  discard block
 block discarded – undo
887 887
 				$this->date_creation     = $this->db->jdate($obj->datec);
888 888
 				$this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem);
889 889
 				if (!empty($obj->datev)) {
890
-					$this->date_validation   = empty($obj->datev) ? '' : $this->db->jdate($obj->datev);
890
+					$this->date_validation = empty($obj->datev) ? '' : $this->db->jdate($obj->datev);
891 891
 				}
892 892
 			}
893 893
 
Please login to merge, or discard this patch.
htdocs/core/class/commondocgenerator.class.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
 	public $posxlabel;
154 154
 	public $posxup;
155 155
 	public $posxref;
156
-	public $posxpicture;	// For picture
157
-	public $posxdesc;		// For description
156
+	public $posxpicture; // For picture
157
+	public $posxdesc; // For description
158 158
 	public $posxqty;
159 159
 	public $posxpuht;
160 160
 	public $posxtva;
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 			'myuser_email'=>$user->email,
207 207
 			'myuser_logo'=>$logotouse,
208 208
 			'myuser_job'=>$user->job,
209
-			'myuser_web'=>'',	// url not exist in $user object
209
+			'myuser_web'=>'', // url not exist in $user object
210 210
 			'myuser_birth'=>dol_print_date($user->birth, 'day', 'gmt'),
211 211
 			'myuser_dateemployment'=>dol_print_date($user->dateemployment, 'day', 'tzuser'),
212 212
 			'myuser_dateemploymentend'=>dol_print_date($user->dateemploymentend, 'day', 'tzuser'),
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 
523 523
 		if (get_class($object) == 'CommandeFournisseur') {
524 524
 			/* @var $object CommandeFournisseur*/
525
-			$object->date_validation =  $object->date_valid;
525
+			$object->date_validation = $object->date_valid;
526 526
 			$object->date_commande = $object->date;
527 527
 		}
528 528
 		$resarray = array(
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 			$resarray[$array_key.'_bank_bic'] = (empty($bank_account) ? '' : $bank_account->bic);
609 609
 			$resarray[$array_key.'_bank_label'] = (empty($bank_account) ? '' : $bank_account->label);
610 610
 			$resarray[$array_key.'_bank_number'] = (empty($bank_account) ? '' : $bank_account->number);
611
-			$resarray[$array_key.'_bank_proprio'] =(empty($bank_account) ? '' : $bank_account->proprio);
611
+			$resarray[$array_key.'_bank_proprio'] = (empty($bank_account) ? '' : $bank_account->proprio);
612 612
 		}
613 613
 
614 614
 		if (method_exists($object, 'getTotalDiscount') && in_array(get_class($object), array('Propal', 'Proposal', 'Commande', 'Facture', 'SupplierProposal', 'CommandeFournisseur', 'FactureFournisseur'))) {
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 			$resarray[$array_key.'_project_date_start'] = dol_print_date($object->project->date_start, 'day');
632 632
 			$resarray[$array_key.'_project_date_end'] = dol_print_date($object->project->date_end, 'day');
633 633
 		} else { // empty replacement
634
-			$resarray[$array_key.'_project_ref'] ='';
634
+			$resarray[$array_key.'_project_ref'] = '';
635 635
 			$resarray[$array_key.'_project_title'] = '';
636 636
 			$resarray[$array_key.'_project_description'] = '';
637 637
 			$resarray[$array_key.'_project_date_start'] = '';
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
 
1464 1464
 		if (!empty($fields)) {
1465 1465
 			// Sort extrafields by rank
1466
-			uasort($fields, function ($a, $b) {
1466
+			uasort($fields, function($a, $b) {
1467 1467
 				return  ($a->rank > $b->rank) ? 1 : -1;
1468 1468
 			});
1469 1469
 
Please login to merge, or discard this patch.
htdocs/core/modules/modBookCal.class.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -259,32 +259,32 @@  discard block
 block discarded – undo
259 259
 		$r = 0;
260 260
 		// Add here entries to declare new permissions
261 261
 		/* BEGIN MODULEBUILDER PERMISSIONS */
262
-		$this->rights[$r][0] = $this->numero . sprintf('%02d', (0 * 10) + 1);
262
+		$this->rights[$r][0] = $this->numero.sprintf('%02d', (0 * 10) + 1);
263 263
 		$this->rights[$r][1] = 'Read objects of BookCal';
264 264
 		$this->rights[$r][4] = 'availabilities';
265 265
 		$this->rights[$r][5] = 'read';
266 266
 		$r++;
267
-		$this->rights[$r][0] = $this->numero . sprintf('%02d', (0 * 10) + 2);
267
+		$this->rights[$r][0] = $this->numero.sprintf('%02d', (0 * 10) + 2);
268 268
 		$this->rights[$r][1] = 'Create/Update objects of BookCal';
269 269
 		$this->rights[$r][4] = 'availabilities';
270 270
 		$this->rights[$r][5] = 'write';
271 271
 		$r++;
272
-		$this->rights[$r][0] = $this->numero . sprintf('%02d', (0 * 10) + 3);
272
+		$this->rights[$r][0] = $this->numero.sprintf('%02d', (0 * 10) + 3);
273 273
 		$this->rights[$r][1] = 'Delete objects of BookCal';
274 274
 		$this->rights[$r][4] = 'availabilities';
275 275
 		$this->rights[$r][5] = 'delete';
276 276
 		$r++;
277
-		$this->rights[$r][0] = $this->numero . sprintf('%02d', (1 * 10) + 1);
277
+		$this->rights[$r][0] = $this->numero.sprintf('%02d', (1 * 10) + 1);
278 278
 		$this->rights[$r][1] = 'Read Calendar object of BookCal';
279 279
 		$this->rights[$r][4] = 'calendar';
280 280
 		$this->rights[$r][5] = 'read';
281 281
 		$r++;
282
-		$this->rights[$r][0] = $this->numero . sprintf('%02d', (1 * 10) + 2);
282
+		$this->rights[$r][0] = $this->numero.sprintf('%02d', (1 * 10) + 2);
283 283
 		$this->rights[$r][1] = 'Create/Update Calendar object of BookCal';
284 284
 		$this->rights[$r][4] = 'calendar';
285 285
 		$this->rights[$r][5] = 'write';
286 286
 		$r++;
287
-		$this->rights[$r][0] = $this->numero . sprintf('%02d', (1 * 10) + 3);
287
+		$this->rights[$r][0] = $this->numero.sprintf('%02d', (1 * 10) + 3);
288 288
 		$this->rights[$r][1] = 'Delete Calendar object of BookCal';
289 289
 		$this->rights[$r][4] = 'calendar';
290 290
 		$this->rights[$r][5] = 'delete';
@@ -324,13 +324,13 @@  discard block
 block discarded – undo
324 324
 			'leftmenu'=> 'bookcal',
325 325
 			'url'=> '/bookcal/bookcalindex.php',
326 326
 			'langs'=> 'bookcal',
327
-			'position'=> 1100+$r,
327
+			'position'=> 1100 + $r,
328 328
 			'enabled'=> '1',
329 329
 			'perms'=> '$user->rights->bookcal->calendar->read',
330 330
 			'user'=> 0
331 331
 		);
332 332
 
333
-		$this->menu[$r++]=array(
333
+		$this->menu[$r++] = array(
334 334
 			// '' 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
335 335
 			'fk_menu'=>'fk_mainmenu=agenda,fk_leftmenu=bookcal',
336 336
 			// This is a Left menu entry
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 			'url'=>'/bookcal/calendar_list.php',
342 342
 			// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
343 343
 			'langs'=>'bookcal',
344
-			'position'=>1100+$r,
344
+			'position'=>1100 + $r,
345 345
 			// Define condition to show or hide menu entry. Use '$conf->bookcal->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
346 346
 			'enabled'=>'$conf->bookcal->enabled',
347 347
 			// Use 'perms'=>'$user->rights->bookcal->level1->level2' if you want your menu with a permission rules
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 			// 0=Menu for internal users, 1=external users, 2=both
351 351
 			'user'=>2,
352 352
 		);
353
-		$this->menu[$r++]=array(
353
+		$this->menu[$r++] = array(
354 354
 			// '' 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
355 355
 			'fk_menu'=>'fk_mainmenu=agenda,fk_leftmenu=bookcal_calendar_list',
356 356
 			// This is a Left menu entry
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 			'url'=>'/bookcal/calendar_card.php?action=create',
362 362
 			// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
363 363
 			'langs'=>'bookcal',
364
-			'position'=>1100+$r,
364
+			'position'=>1100 + $r,
365 365
 			// Define condition to show or hide menu entry. Use '$conf->bookcal->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
366 366
 			'enabled'=>'$conf->bookcal->enabled',
367 367
 			// Use 'perms'=>'$user->rights->bookcal->level1->level2' if you want your menu with a permission rules
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 		);
419 419
 		*/
420 420
 
421
-		$this->menu[$r++]=array(
421
+		$this->menu[$r++] = array(
422 422
 			// '' 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
423 423
 			'fk_menu'=>'fk_mainmenu=agenda,fk_leftmenu=bookcal',
424 424
 			// This is a Left menu entry
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
 			'url'=>'/bookcal/availabilities_list.php',
430 430
 			// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
431 431
 			'langs'=>'bookcal',
432
-			'position'=>1200+$r,
432
+			'position'=>1200 + $r,
433 433
 			// Define condition to show or hide menu entry. Use '$conf->bookcal->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
434 434
 			'enabled'=>'$conf->bookcal->enabled',
435 435
 			// Use 'perms'=>'$user->rights->bookcal->level1->level2' if you want your menu with a permission rules
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 			// 0=Menu for internal users, 1=external users, 2=both
439 439
 			'user'=>2,
440 440
 		);
441
-		$this->menu[$r++]=array(
441
+		$this->menu[$r++] = array(
442 442
 			// '' 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
443 443
 			'fk_menu'=>'fk_mainmenu=agenda,fk_leftmenu=bookcal_availabilities',
444 444
 			// This is a Left menu entry
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 			'url'=>'/bookcal/availabilities_card.php?action=create',
450 450
 			// Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
451 451
 			'langs'=>'bookcal',
452
-			'position'=>1200+$r,
452
+			'position'=>1200 + $r,
453 453
 			// Define condition to show or hide menu entry. Use '$conf->bookcal->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
454 454
 			'enabled'=>'$conf->bookcal->enabled',
455 455
 			// Use 'perms'=>'$user->rights->bookcal->level1->level2' if you want your menu with a permission rules
Please login to merge, or discard this patch.
htdocs/expedition/card.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
 			$stockLocation = "ent1".$i."_0";
274 274
 			$qty = "qtyl".$i;
275 275
 
276
-			$is_batch_or_serial=0;
276
+			$is_batch_or_serial = 0;
277 277
 			if (!empty($objectsrc->lines[$i]->fk_product)) {
278 278
 				$resultFetch = $product->fetch($objectsrc->lines[$i]->fk_product, '', '', '', 1, 1, 1);
279 279
 				if ($resultFetch < 0) {
@@ -299,9 +299,9 @@  discard block
 block discarded – undo
299 299
 						//var_dump($sub_qty[$j]['id_batch']);
300 300
 
301 301
 						//var_dump($qty);var_dump($batch);var_dump($sub_qty[$j]['q']);var_dump($sub_qty[$j]['id_batch']);
302
-						if ($is_batch_or_serial==2 && $sub_qty[$j]['q']>1) {
302
+						if ($is_batch_or_serial == 2 && $sub_qty[$j]['q'] > 1) {
303 303
 							setEventMessages($langs->trans("TooManyQtyForSerialNumber", $product->ref, ''), null, 'errors');
304
-							$totalqty=0;
304
+							$totalqty = 0;
305 305
 							break 2;
306 306
 						}
307 307
 						$j++;
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 
351 351
 			// check qty shipped not greater than ordered
352 352
 			if (getDolGlobalInt("MAIN_DONT_SHIP_MORE_THAN_ORDERED") && $subtotalqty > $objectsrc->lines[$i]->qty) {
353
-				setEventMessages($langs->trans("ErrorTooMuchShipped", $i+1), null, 'errors');
353
+				setEventMessages($langs->trans("ErrorTooMuchShipped", $i + 1), null, 'errors');
354 354
 				$error++;
355 355
 				continue;
356 356
 			}
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
 									setEventMessages($line->error, $line->errors, 'errors');
679 679
 									$error++;
680 680
 								} else {
681
-									$update_done=true;
681
+									$update_done = true;
682 682
 								}
683 683
 							} else {
684 684
 								setEventMessages($lotStock->error, $lotStock->errors, 'errors');
@@ -722,7 +722,7 @@  discard block
 block discarded – undo
722 722
 										setEventMessages($line->error, $line->errors, 'errors');
723 723
 										$error++;
724 724
 									} else {
725
-										$update_done=true;
725
+										$update_done = true;
726 726
 									}
727 727
 								} else {
728 728
 									setEventMessages($line->error, $line->errors, 'errors');
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
 									setEventMessages($object->error, $object->errors, 'errors');
742 742
 									$error++;
743 743
 								} else {
744
-									$update_done=true;
744
+									$update_done = true;
745 745
 								}
746 746
 							}
747 747
 						} else {
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
 											setEventMessages($line->error, $line->errors, 'errors');
781 781
 											$error++;
782 782
 										} else {
783
-											$update_done=true;
783
+											$update_done = true;
784 784
 										}
785 785
 									}
786 786
 									unset($_POST[$stockLocation]);
@@ -796,7 +796,7 @@  discard block
 block discarded – undo
796 796
 								setEventMessages($line->error, $line->errors, 'errors');
797 797
 								$error++;
798 798
 							} else {
799
-								$update_done=true;
799
+								$update_done = true;
800 800
 							}
801 801
 							unset($_POST[$qty]);
802 802
 						}
@@ -810,7 +810,7 @@  discard block
 block discarded – undo
810 810
 							setEventMessages($line->error, $line->errors, 'errors');
811 811
 							$error++;
812 812
 						} else {
813
-							$update_done=true;
813
+							$update_done = true;
814 814
 						}
815 815
 						unset($_POST[$qty]);
816 816
 					}
@@ -1546,7 +1546,7 @@  discard block
 block discarded – undo
1546 1546
 							$nbofsuggested = 0;
1547 1547
 							foreach ($product->stock_warehouse as $warehouse_id => $stock_warehouse) {
1548 1548
 								if (($stock_warehouse->real > 0) && (count($stock_warehouse->detail_batch))) {
1549
-									$nbofsuggested+=count($stock_warehouse->detail_batch);
1549
+									$nbofsuggested += count($stock_warehouse->detail_batch);
1550 1550
 								}
1551 1551
 							}
1552 1552
 
@@ -1587,11 +1587,11 @@  discard block
 block discarded – undo
1587 1587
 											$tooltipClass = ' classfortooltip';
1588 1588
 											$tooltipTitle = $langs->trans('StockQuantitiesAlreadyAllocatedOnPreviousLines').' : '.$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
1589 1589
 										} else {
1590
-											$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0 ;
1590
+											$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = 0;
1591 1591
 										}
1592 1592
 										$alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)] = $deliverableQty + $alreadyQtyBatchSetted[$line->fk_product][$dbatch->batch][intval($warehouse_id)];
1593 1593
 
1594
-										print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ?'oddeven' : '').'><td colspan="3"></td><td class="center">';
1594
+										print '<!-- subj='.$subj.'/'.$nbofsuggested.' --><tr '.((($subj + 1) == $nbofsuggested) ? 'oddeven' : '').'><td colspan="3"></td><td class="center">';
1595 1595
 										print '<input class="qtyl '.$tooltipClass.'" title="'.$tooltipTitle.'" name="'.$inputName.'" id="'.$inputName.'" type="text" size="4" value="'.$deliverableQty.'">';
1596 1596
 										print '</td>';
1597 1597
 
@@ -2351,7 +2351,7 @@  discard block
 block discarded – undo
2351 2351
 							// only show lot numbers from src warehouse when shipping from multiple warehouses
2352 2352
 							$line->fetch($detail_batch->fk_expeditiondet);
2353 2353
 						}
2354
-						$entrepot_id = !empty($detail_batch->entrepot_id)?$detail_batch->entrepot_id:$lines[$i]->entrepot_id;
2354
+						$entrepot_id = !empty($detail_batch->entrepot_id) ? $detail_batch->entrepot_id : $lines[$i]->entrepot_id;
2355 2355
 						print '<td>'.$formproduct->selectLotStock($detail_batch->fk_origin_stock, 'batchl'.$detail_batch->fk_expeditiondet.'_'.$detail_batch->fk_origin_stock, '', 1, 0, $lines[$i]->fk_product, $entrepot_id).'</td>';
2356 2356
 						print '</tr>';
2357 2357
 					}
@@ -2568,7 +2568,7 @@  discard block
 block discarded – undo
2568 2568
 				 || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->shipping_advance->validate))) {
2569 2569
 					print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=valid&token='.newToken().'&id='.$object->id, '');
2570 2570
 				} else {
2571
-					print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2571
+					print dolGetButtonAction($langs->trans('NotAllowed'), $langs->trans('Validate'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2572 2572
 				}
2573 2573
 			}
2574 2574
 
@@ -2590,7 +2590,7 @@  discard block
 block discarded – undo
2590 2590
 					if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->expedition->shipping_advance->send) {
2591 2591
 						print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
2592 2592
 					} else {
2593
-						print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2593
+						print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2594 2594
 					}
2595 2595
 				}
2596 2596
 			}
@@ -2616,7 +2616,7 @@  discard block
 block discarded – undo
2616 2616
 					if (!$object->billed && getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT') !== '0') {
2617 2617
 						print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, '');
2618 2618
 					}
2619
-					print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action='. $paramaction .'&token='.newToken().'&id='.$object->id, '');
2619
+					print dolGetButtonAction('', $langs->trans("Close"), 'default', $_SERVER["PHP_SELF"].'?action='.$paramaction.'&token='.newToken().'&id='.$object->id, '');
2620 2620
 				}
2621 2621
 			}
2622 2622
 
Please login to merge, or discard this patch.
htdocs/public/bookcal/booking.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 			$sql .= ") VALUES (";
257 257
 			$sql .= (int) $actioncomm->id;
258 258
 			$sql .= ", 'socpeople'";
259
-			$sql .= ", ". (int) $contact->id;
259
+			$sql .= ", ".(int) $contact->id;
260 260
 			$sql .= ", 0, 0, 0)";
261 261
 			$resql = $db->query($sql);
262 262
 			if (!$resql) {
@@ -481,8 +481,8 @@  discard block
 block discarded – undo
481 481
 		$hoursavailabilities_start = $availability->startHour;
482 482
 		$hoursavailabilities_end = $availability->endHour;
483 483
 		$hoursavailabilities_duration = $availability->duration;
484
-		for ($i=$hoursavailabilities_start; $i < $hoursavailabilities_end; $i++) {
485
-			for ($j=0; $j < 60 ; $j += $hoursavailabilities_duration) {
484
+		for ($i = $hoursavailabilities_start; $i < $hoursavailabilities_end; $i++) {
485
+			for ($j = 0; $j < 60; $j += $hoursavailabilities_duration) {
486 486
 				$timestring = ($i < 10 ? '0'.$i : $i).':'.($j < 10 ? '0'.$j : $j);
487 487
 				$timestringid = ($i < 10 ? '0'.$i : $i).''.($j < 10 ? '0'.$j : $j);
488 488
 				print '<span id="'.$timestringid.'" class="btnformbooking"><input type="submit" class="button" name="timebooking" value="'.$timestring.'"><br></span>';
Please login to merge, or discard this patch.
htdocs/comm/action/index.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	$conf->global->AGENDA_EXT_NB = 5;
50 50
 }
51 51
 $MAXAGENDA = $conf->global->AGENDA_EXT_NB;
52
-$DELAYFORCACHE = 300;	// 300 seconds
52
+$DELAYFORCACHE = 300; // 300 seconds
53 53
 
54 54
 $disabledefaultvalues = GETPOST('disabledefaultvalues', 'int');
55 55
 
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 
106 106
 $mode = GETPOST('mode', 'aZ09');
107 107
 if (empty($mode) && preg_match('/show_/', $action)) {
108
-	$mode = $action;	// For backward compatibility
108
+	$mode = $action; // For backward compatibility
109 109
 }
110 110
 $resourceid = GETPOST("search_resourceid", "int");
111 111
 $year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y");
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
 
538 538
 $viewmode .= '</div>';
539 539
 
540
-$viewmode .= '<span class="marginrightonly"></span>';	// To add a space before the navigation tools
540
+$viewmode .= '<span class="marginrightonly"></span>'; // To add a space before the navigation tools
541 541
 
542 542
 
543 543
 $newcardbutton = '';
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 	$newparam .= '&month='.((int) $month).'&year='.((int) $tmpforcreatebutton['year']).'&mode='.urlencode($mode);
549 549
 
550 550
 	//$param='month='.$monthshown.'&year='.$year;
551
-	$hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt').'0000';	// Set $hourminsec to '100000' to auto set hour to 10:00 at creation
551
+	$hourminsec = dol_print_date(dol_mktime(10, 0, 0, 1, 1, 1970, 'gmt'), '%H', 'gmt').'0000'; // Set $hourminsec to '100000' to auto set hour to 10:00 at creation
552 552
 
553 553
 	$newcardbutton .= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')));
554 554
 }
@@ -568,7 +568,7 @@  discard block
 block discarded – undo
568 568
 	$sql .= " WHERE bc.status = 1";
569 569
 	$sql .= " AND ba.status = 1";
570 570
 	if (!empty($filtert) && $filtert != -1) {
571
-		$sql .= " AND bc.visibility = ".(int) $filtert ;
571
+		$sql .= " AND bc.visibility = ".(int) $filtert;
572 572
 	}
573 573
 	$resql = $db->query($sql);
574 574
 	if ($resql) {
@@ -621,9 +621,9 @@  discard block
 block discarded – undo
621 621
 		// Holiday calendar
622 622
 		$s .= '
623 623
             <div class="nowrap inline-block minheight30"><input type="checkbox" id="check_holiday" name="check_holiday" value="1" class="check_holiday"' . ($check_holiday
624
-					? ' checked' : '') . '>
624
+					? ' checked' : '').'>
625 625
                 <label for="check_holiday">
626
-                    <span class="check_holiday_text">' . $langs->trans("Holidays") . '</span>
626
+                    <span class="check_holiday_text">' . $langs->trans("Holidays").'</span>
627 627
                 </label> &nbsp;
628 628
             </div>';
629 629
 	}
@@ -868,7 +868,7 @@  discard block
 block discarded – undo
868 868
 		// event->datep and event->datef must be GMT date.
869 869
 		if ($event->fulldayevent) {
870 870
 			$tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT');
871
-			$event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver');	// If saved in $tzforfullday = gmt, we must invert date to be in user tz
871
+			$event->datep = $db->jdate($obj->datep, $tzforfullday ? 'tzuser' : 'tzserver'); // If saved in $tzforfullday = gmt, we must invert date to be in user tz
872 872
 			$event->datef = $db->jdate($obj->datep2, $tzforfullday ? 'tzuser' : 'tzserver');
873 873
 		} else {
874 874
 			// Example: $obj->datep = '1970-01-01 01:00:00', jdate will return 0 if TZ of PHP server is Europe/Berlin (+1)
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
 		}
919 919
 
920 920
 		// Check values
921
-		if ($event->date_end_in_calendar < $firstdaytoshow || $event->date_start_in_calendar >= $lastdaytoshow)	{
921
+		if ($event->date_end_in_calendar < $firstdaytoshow || $event->date_start_in_calendar >= $lastdaytoshow) {
922 922
 			// This record is out of visible range
923 923
 		} else {
924 924
 			if ($event->date_start_in_calendar < $firstdaytoshow) {
@@ -945,8 +945,8 @@  discard block
 block discarded – undo
945 945
 
946 946
 			// Loop on each day covered by action to prepare an index to show on calendar
947 947
 			$loop = true; $j = 0;
948
-			$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt');	// $mois, $jour, $annee has been set for user tz
949
-			$daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt');	// $moisend, $jourend, $anneeend has been set for user tz
948
+			$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt'); // $mois, $jour, $annee has been set for user tz
949
+			$daykeyend = dol_mktime(0, 0, 0, $moisend, $jourend, $anneeend, 'gmt'); // $moisend, $jourend, $anneeend has been set for user tz
950 950
 			/*
951 951
 			 print 'GMT '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt').'<br>';
952 952
 			 print 'TZSERVER '.$event->date_start_in_calendar.' '.dol_print_date($event->date_start_in_calendar, 'dayhour', 'tzserver').'<br>';
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
 
1067 1067
 	if ($mode == 'show_day') {
1068 1068
 		// Request only leaves for the current selected day
1069
-		$sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin";	// date_debut and date_fin are date without time
1069
+		$sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time
1070 1070
 	} elseif ($mode == 'show_week') {
1071 1071
 		// Restrict on current month (we get more, but we will filter later)
1072 1072
 		$sql .= " AND date_debut < '".$db->idate(dol_get_last_day($year, $month))."'";
@@ -1456,7 +1456,7 @@  discard block
 block discarded – undo
1456 1456
 	$theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220));
1457 1457
 }
1458 1458
 
1459
-$massactionbutton ='';
1459
+$massactionbutton = '';
1460 1460
 
1461 1461
 print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1, 'object_action', 0, $nav.'<span class="marginleftonly"></span>'.$newcardbutton, '', $limit, 1, 0, 1, $viewmode);
1462 1462
 
@@ -1603,7 +1603,7 @@  discard block
 block discarded – undo
1603 1603
 
1604 1604
 	for ($iter_day = 0; $iter_day < 7; $iter_day++) {
1605 1605
 		// Show days of the current week
1606
-		$curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd');		// $firstdaytoshow is in timezone of server
1606
+		$curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); // $firstdaytoshow is in timezone of server
1607 1607
 		$tmpday = dol_print_date($curtime, '%d', 'tzuserrel');
1608 1608
 		$tmpmonth = dol_print_date($curtime, '%m', 'tzuserrel');
1609 1609
 		$tmpyear = dol_print_date($curtime, '%Y', 'tzuserrel');
@@ -1819,9 +1819,9 @@  discard block
 block discarded – undo
1819 1819
 	$tmpholiday = new Holiday($db);
1820 1820
 
1821 1821
 	foreach ($eventarray as $daykey => $notused) {		// daykey is the 'YYYYMMDD' to show according to user
1822
-		$annee = dol_print_date($daykey, '%Y', 'gmt');	// We use gmt because we want the value represented by string 'YYYYMMDD'
1823
-		$mois =  dol_print_date($daykey, '%m', 'gmt');	// We use gmt because we want the value represented by string 'YYYYMMDD'
1824
-		$jour =  dol_print_date($daykey, '%d', 'gmt');	// We use gmt because we want the value represented by string 'YYYYMMDD'
1822
+		$annee = dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD'
1823
+		$mois = dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD'
1824
+		$jour = dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD'
1825 1825
 
1826 1826
 		//print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' jour='.$jour.' mois='.$mois.' annee='.$annee."<br>\n";
1827 1827
 
@@ -2093,7 +2093,7 @@  discard block
 block discarded – undo
2093 2093
 						if ($event->type_code != 'ICALEVENT') {
2094 2094
 							$savlabel = $event->label ? $event->label : $event->libelle;
2095 2095
 							$event->label = $titletoshow;
2096
-							$event->libelle = $titletoshow;		// deprecatd
2096
+							$event->libelle = $titletoshow; // deprecatd
2097 2097
 							// Note: List of users are inside $event->userassigned. Link may be clickable depending on permissions of user.
2098 2098
 							$titletoshow = (($event->type_picto || $event->type_code) ? $event->getTypePicto() : '');
2099 2099
 							$titletoshow .= $event->getNomUrl(0, $maxnbofchar, 'cal_event cal_event_title', '', 0, 0);
Please login to merge, or discard this patch.