Passed
Branch develop (3f4b05)
by Laurent
95:01
created
htdocs/expensereport/class/expensereport.class.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 	// Paiement
127 127
 	public $user_paid_infos;
128 128
 
129
-	public $localtax1;	// for backward compatibility (real field should be total_localtax1 defined into CommonObject)
130
-	public $localtax2;	// for backward compatibility (real field should be total_localtax2 defined into CommonObject)
129
+	public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject)
130
+	public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject)
131 131
 
132 132
 	public $statuts = array();
133 133
 	public $statuts_short = array();
@@ -224,8 +224,8 @@  discard block
 block discarded – undo
224 224
 		$this->total_tva = 0;
225 225
 		$this->total_localtax1 = 0;
226 226
 		$this->total_localtax2 = 0;
227
-		$this->localtax1 = 0;	// For backward compatibility
228
-		$this->localtax2 = 0;	// For backward compatibility
227
+		$this->localtax1 = 0; // For backward compatibility
228
+		$this->localtax2 = 0; // For backward compatibility
229 229
 		$this->modepaymentid = 0;
230 230
 
231 231
 		// List of language codes for status
@@ -584,8 +584,8 @@  discard block
 block discarded – undo
584 584
 				$this->total_ht     = $obj->total_ht;
585 585
 				$this->total_tva    = $obj->total_tva;
586 586
 				$this->total_ttc    = $obj->total_ttc;
587
-				$this->localtax1    = $obj->total_localtax1;		// For backward compatibility
588
-				$this->localtax2    = $obj->total_localtax2;		// For backward compatibility
587
+				$this->localtax1    = $obj->total_localtax1; // For backward compatibility
588
+				$this->localtax2    = $obj->total_localtax2; // For backward compatibility
589 589
 				$this->total_localtax1 = $obj->total_localtax1;
590 590
 				$this->total_localtax2 = $obj->total_localtax2;
591 591
 
@@ -1066,7 +1066,7 @@  discard block
 block discarded – undo
1066 1066
 
1067 1067
 				$deplig->rule_warning_message = $objp->rule_warning_message;
1068 1068
 
1069
-				$deplig->rang               = $objp->rang;
1069
+				$deplig->rang = $objp->rang;
1070 1070
 
1071 1071
 				$this->lines[$i] = $deplig;
1072 1072
 
@@ -1718,7 +1718,7 @@  discard block
 block discarded – undo
1718 1718
 		$result .= $linkend;
1719 1719
 
1720 1720
 		global $action;
1721
-		$hookmanager->initHooks(array($this->element . 'dao'));
1721
+		$hookmanager->initHooks(array($this->element.'dao'));
1722 1722
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
1723 1723
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
1724 1724
 		if ($reshook > 0) {
@@ -1811,8 +1811,8 @@  discard block
 block discarded – undo
1811 1811
 			$this->line = new ExpenseReportLine($this->db);
1812 1812
 
1813 1813
 			// We don't know seller and buyer for expense reports
1814
-			$seller = $mysoc;			// We use same than current company (expense report are often done in same country)
1815
-			$seller->tva_assuj = 1;		// Most seller uses vat
1814
+			$seller = $mysoc; // We use same than current company (expense report are often done in same country)
1815
+			$seller->tva_assuj = 1; // Most seller uses vat
1816 1816
 			$buyer = new Societe($this->db);
1817 1817
 
1818 1818
 			$localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller);
@@ -1894,8 +1894,8 @@  discard block
 block discarded – undo
1894 1894
 
1895 1895
 		// We don't know seller and buyer for expense reports
1896 1896
 		if (!is_object($seller)) {
1897
-			$seller = $mysoc;			// We use same than current company (expense report are often done in same country)
1898
-			$seller->tva_assuj = 1;		// Most seller uses vat
1897
+			$seller = $mysoc; // We use same than current company (expense report are often done in same country)
1898
+			$seller->tva_assuj = 1; // Most seller uses vat
1899 1899
 		}
1900 1900
 
1901 1901
 		$expensereportrule = new ExpenseReportRule($db);
@@ -1979,8 +1979,8 @@  discard block
 block discarded – undo
1979 1979
 
1980 1980
 		// We don't know seller and buyer for expense reports
1981 1981
 		if (!is_object($seller)) {
1982
-			$seller = $mysoc;			// We use same than current company (expense report are often done in same country)
1983
-			$seller->tva_assuj = 1;		// Most seller uses vat
1982
+			$seller = $mysoc; // We use same than current company (expense report are often done in same country)
1983
+			$seller->tva_assuj = 1; // Most seller uses vat
1984 1984
 		}
1985 1985
 
1986 1986
 		$expenseik = new ExpenseReportIk($this->db);
@@ -2074,10 +2074,10 @@  discard block
 block discarded – undo
2074 2074
 			$type = 0; // TODO What if type is service ?
2075 2075
 
2076 2076
 			// We don't know seller and buyer for expense reports
2077
-			$seller = $mysoc;			// We use same than current company (expense report are often done in same country)
2078
-			$seller->tva_assuj = 1;		// Most seller uses vat
2079
-			$seller->localtax1_assuj = $mysoc->localtax1_assuj;		// We don't know, we reuse the state of company
2080
-			$seller->localtax2_assuj = $mysoc->localtax1_assuj;		// We don't know, we reuse the state of company
2077
+			$seller = $mysoc; // We use same than current company (expense report are often done in same country)
2078
+			$seller->tva_assuj = 1; // Most seller uses vat
2079
+			$seller->localtax1_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company
2080
+			$seller->localtax2_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company
2081 2081
 			$buyer = new Societe($this->db);
2082 2082
 
2083 2083
 			$localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller);
@@ -2191,7 +2191,7 @@  discard block
 block discarded – undo
2191 2191
 	 */
2192 2192
 	public function deleteline($rowid, $fuser = '', $notrigger = 0)
2193 2193
 	{
2194
-		$error=0;
2194
+		$error = 0;
2195 2195
 
2196 2196
 		$this->db->begin();
2197 2197
 
@@ -2210,7 +2210,7 @@  discard block
 block discarded – undo
2210 2210
 		dol_syslog(get_class($this)."::deleteline sql=".$sql);
2211 2211
 		$result = $this->db->query($sql);
2212 2212
 
2213
-		if (!$result || $error > 0 ) {
2213
+		if (!$result || $error > 0) {
2214 2214
 			$this->error = $this->db->error();
2215 2215
 			dol_syslog(get_class($this)."::deleteline  Error ".$this->error, LOG_ERR);
2216 2216
 			$this->db->rollback();
@@ -2617,10 +2617,10 @@  discard block
 block discarded – undo
2617 2617
 				$sql = " SELECT count(n.qty) as cumul FROM ".MAIN_DB_PREFIX."expensereport_det n";
2618 2618
 				$sql .= " LEFT JOIN  ".MAIN_DB_PREFIX."expensereport e ON e.rowid = n.fk_expensereport";
2619 2619
 				$sql .= " LEFT JOIN  ".MAIN_DB_PREFIX."c_type_fees tf ON tf.id = n.fk_c_type_fees";
2620
-				$sql.= " WHERE e.fk_user_author = ".(int) $this->fk_user_author;
2621
-				$sql.= " AND YEAR(n.date) = ".(int) $arrayDate['year'];
2622
-				$sql.= " AND tf.code = 'EX_KME' ";
2623
-				$sql.= " AND e.fk_statut = ".(int) ExpenseReport::STATUS_VALIDATED;
2620
+				$sql .= " WHERE e.fk_user_author = ".(int) $this->fk_user_author;
2621
+				$sql .= " AND YEAR(n.date) = ".(int) $arrayDate['year'];
2622
+				$sql .= " AND tf.code = 'EX_KME' ";
2623
+				$sql .= " AND e.fk_statut = ".(int) ExpenseReport::STATUS_VALIDATED;
2624 2624
 
2625 2625
 				$resql = $this->db->query($sql);
2626 2626
 
@@ -2643,7 +2643,7 @@  discard block
 block discarded – undo
2643 2643
 
2644 2644
 				for ($i = 0; $i < $num; $i++) {
2645 2645
 					if ($i < ($num - 1)) {
2646
-						if ($qty > $ranges[$i]->range_ik && $qty < $ranges[$i+1]->range_ik) {
2646
+						if ($qty > $ranges[$i]->range_ik && $qty < $ranges[$i + 1]->range_ik) {
2647 2647
 							$coef = $ranges[$i]->coef;
2648 2648
 							$offset = $ranges[$i]->offset;
2649 2649
 						}
@@ -2942,7 +2942,7 @@  discard block
 block discarded – undo
2942 2942
 		} elseif ($mode == 'mon' || $mode == 'EX_MON') {
2943 2943
 			$sql .= " AND DATE_FORMAT(d.date, '%Y-%m') = '".dol_print_date($this->date, '%Y-%m')."'"; // @todo DATE_FORMAT is forbidden
2944 2944
 		} elseif ($mode == 'year' || $mode == 'EX_YEA') {
2945
-			$sql .= " AND DATE_FORMAT(d.date, '%Y') = '".dol_print_date($this->date, '%Y')."'"; 	// @todo DATE_FORMAT is forbidden
2945
+			$sql .= " AND DATE_FORMAT(d.date, '%Y') = '".dol_print_date($this->date, '%Y')."'"; // @todo DATE_FORMAT is forbidden
2946 2946
 		}
2947 2947
 
2948 2948
 		dol_syslog('ExpenseReportLine::getExpAmount');
Please login to merge, or discard this patch.
htdocs/product/class/productbatch.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 
45 45
 	public $tms = '';
46 46
 	public $fk_product_stock;
47
-	public $sellby = '';	// dlc
48
-	public $eatby = '';		// dmd/dluo
47
+	public $sellby = ''; // dlc
48
+	public $eatby = ''; // dmd/dluo
49 49
 	public $batch = '';
50 50
 	public $qty;
51 51
 	public $warehouseid;
@@ -89,15 +89,15 @@  discard block
 block discarded – undo
89 89
 		// Insert request
90 90
 		$sql = "INSERT INTO ".$this->db->prefix()."product_batch (";
91 91
 		$sql .= "fk_product_stock,";
92
-		$sql .= "sellby,";				// no more used
93
-		$sql .= "eatby,";				// no more used
92
+		$sql .= "sellby,"; // no more used
93
+		$sql .= "eatby,"; // no more used
94 94
 		$sql .= "batch,";
95 95
 		$sql .= "qty,";
96 96
 		$sql .= "import_key";
97 97
 		$sql .= ") VALUES (";
98 98
 		$sql .= " ".(!isset($this->fk_product_stock) ? 'NULL' : $this->fk_product_stock).",";
99
-		$sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").",";		// no more used
100
-		$sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").",";			// no more used
99
+		$sql .= " ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'".$this->db->idate($this->sellby)."'").","; // no more used
100
+		$sql .= " ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'".$this->db->idate($this->eatby)."'").","; // no more used
101 101
 		$sql .= " ".(!isset($this->batch) ? 'NULL' : "'".$this->db->escape($this->batch)."'").",";
102 102
 		$sql .= " ".(!isset($this->qty) ? 'NULL' : $this->qty).",";
103 103
 		$sql .= " ".(!isset($this->import_key) ? 'NULL' : "'".$this->db->escape($this->import_key)."'");
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 		$sql .= " pl.eatby,";
149 149
 		$sql .= " pl.sellby";
150 150
 		$sql .= " FROM ".$this->db->prefix()."product_batch as t";
151
-		$sql .= " INNER JOIN ".$this->db->prefix()."product_stock w on t.fk_product_stock = w.rowid";	// llx_product_stock is a parent table so this link does NOT generate duplicate record
151
+		$sql .= " INNER JOIN ".$this->db->prefix()."product_stock w on t.fk_product_stock = w.rowid"; // llx_product_stock is a parent table so this link does NOT generate duplicate record
152 152
 		$sql .= " LEFT JOIN ".$this->db->prefix()."product_lot as pl on pl.fk_product = w.fk_product and pl.batch = t.batch";
153 153
 		$sql .= " WHERE t.rowid = ".((int) $id);
154 154
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
 		// TODO : use product lifo and fifo when product will implement it
467 467
 		if ($fk_product > 0) { $sql .= "pl.eatby ASC, pl.sellby ASC, "; }
468 468
 		$sql .= "t.eatby ASC, t.sellby ASC ";
469
-		$sql .= ", t.qty ".(!empty($conf->global->DO_NOT_TRY_TO_DEFRAGMENT_STOCKS_WAREHOUSE)?'DESC':'ASC'); // Note : qty ASC is important for expedition card, to avoid stock fragmentation
469
+		$sql .= ", t.qty ".(!empty($conf->global->DO_NOT_TRY_TO_DEFRAGMENT_STOCKS_WAREHOUSE) ? 'DESC' : 'ASC'); // Note : qty ASC is important for expedition card, to avoid stock fragmentation
470 470
 
471 471
 		dol_syslog("productbatch::findAll", LOG_DEBUG);
472 472
 		$resql = $dbs->query($sql);
Please login to merge, or discard this patch.
htdocs/theme/eldy/global.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
66 66
 	print "/* For dark mode */\n";
67 67
 	if ($conf->global->THEME_DARKMODEENABLED != 2) {
68
-		print "@media (prefers-color-scheme: dark) {";	// To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
68
+		print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
69 69
 	} else {
70 70
 		print "@media not print {";
71 71
 	}
@@ -5052,7 +5052,7 @@  discard block
 block discarded – undo
5052 5052
 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
5053 5053
 	print "/* For dark mode */\n";
5054 5054
 	if ($conf->global->THEME_DARKMODEENABLED != 2) {
5055
-		print "@media (prefers-color-scheme: dark) {";	// To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
5055
+		print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
5056 5056
 	} else {
5057 5057
 		print "@media not print {";
5058 5058
 	}
Please login to merge, or discard this patch.
htdocs/salaries/card.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 			$paiement = new PaymentSalary($db);
281 281
 			$paiement->chid         = $object->id;
282 282
 			$paiement->datepaye     = $datep;
283
-			$paiement->datev		= $datev;
283
+			$paiement->datev = $datev;
284 284
 			$paiement->amounts      = array($object->id=>$amount); // Tableau de montant
285 285
 			$paiement->paiementtype = $type_payment;
286 286
 			$paiement->num_payment  = GETPOST("num_payment", 'alphanohtml');
@@ -309,10 +309,10 @@  discard block
 block discarded – undo
309 309
 
310 310
 			if (GETPOST('saveandnew', 'alpha')) {
311 311
 				setEventMessages($langs->trans("RecordSaved"), null, 'mesgs');
312
-				header("Location: card.php?action=create&fk_project=" . urlencode($projectid) . "&accountid=" . urlencode($accountid) . '&paymenttype=' . urlencode(GETPOST('paymenttype', 'az09')) . '&datepday=' . GETPOST("datepday", 'int') . '&datepmonth=' . GETPOST("datepmonth", 'int') . '&datepyear=' . GETPOST("datepyear", 'int'));
312
+				header("Location: card.php?action=create&fk_project=".urlencode($projectid)."&accountid=".urlencode($accountid).'&paymenttype='.urlencode(GETPOST('paymenttype', 'az09')).'&datepday='.GETPOST("datepday", 'int').'&datepmonth='.GETPOST("datepmonth", 'int').'&datepyear='.GETPOST("datepyear", 'int'));
313 313
 				exit;
314 314
 			} else {
315
-				header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $object->id);
315
+				header("Location: ".$_SERVER['PHP_SELF'].'?id='.$object->id);
316 316
 				exit;
317 317
 			}
318 318
 		} else {
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 
584 584
 	// Auto create payment
585 585
 	print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>';
586
-	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_paiement) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n";	// Date payment
586
+	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.(empty($auto_create_paiement) ? '' : 'checked="checked"').' value="1"></td></tr>'."\n"; // Date payment
587 587
 
588 588
 	// Bank
589 589
 	if (isModEnabled("banque")) {
@@ -765,10 +765,10 @@  discard block
 block discarded – undo
765 765
 			$userstatic = new User($db);
766 766
 			$result = $userstatic->fetch($object->fk_user);
767 767
 			if ($result > 0) {
768
-				$morehtmlref .= '<br>' .$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1);
768
+				$morehtmlref .= '<br>'.$langs->trans('Employee').' : '.$userstatic->getNomUrl(-1);
769 769
 			}
770 770
 		} else {
771
-			$morehtmlref .= '<br>' . $form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1);
771
+			$morehtmlref .= '<br>'.$form->editfieldkey("Employee", 'fk_user', $object->label, $object, $user->rights->salaries->write, 'string', '', 0, 1);
772 772
 
773 773
 			if (!empty($object->fk_user)) {
774 774
 				$userstatic = new User($db);
@@ -834,7 +834,7 @@  discard block
 block discarded – undo
834 834
 		print "</td></tr>";
835 835
 	} else {
836 836
 		print "<tr>";
837
-		print '<td class="titlefield">' . $langs->trans("DateStartPeriod") . '</td><td>';
837
+		print '<td class="titlefield">'.$langs->trans("DateStartPeriod").'</td><td>';
838 838
 		print dol_print_date($object->datesp, 'day');
839 839
 		print '</td></tr>';
840 840
 	}
@@ -845,7 +845,7 @@  discard block
 block discarded – undo
845 845
 		print "</td></tr>";
846 846
 	} else {
847 847
 		print "<tr>";
848
-		print '<td>' . $langs->trans("DateEndPeriod") . '</td><td>';
848
+		print '<td>'.$langs->trans("DateEndPeriod").'</td><td>';
849 849
 		print dol_print_date($object->dateep, 'day');
850 850
 		print '</td></tr>';
851 851
 	}
@@ -860,9 +860,9 @@  discard block
 block discarded – undo
860 860
 	print '</td></tr>';*/
861 861
 
862 862
 	if ($action == 'edit') {
863
-		print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>';
863
+		print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>';
864 864
 	} else {
865
-		print '<tr><td>' . $langs->trans("Amount") . '</td><td><span class="amount">' . price($object->amount, 0, $langs, 1, -1, -1, $conf->currency) . '</span></td></tr>';
865
+		print '<tr><td>'.$langs->trans("Amount").'</td><td><span class="amount">'.price($object->amount, 0, $langs, 1, -1, -1, $conf->currency).'</span></td></tr>';
866 866
 	}
867 867
 
868 868
 	// Default mode of payment
@@ -1043,7 +1043,7 @@  discard block
 block discarded – undo
1043 1043
 
1044 1044
 		// Emit payment
1045 1045
 		if ($object->paye == 0 && ((price2num($object->amount) < 0 && $resteapayer < 0) || (price2num($object->amount) > 0 && $resteapayer > 0)) && $user->rights->salaries->write) {
1046
-			print dolGetButtonAction('', $langs->trans('DoPayment'), 'default', DOL_URL_ROOT.'/salaries/paiement_salary.php?action=create&token='.newToken().'&id='. $object->id, '');
1046
+			print dolGetButtonAction('', $langs->trans('DoPayment'), 'default', DOL_URL_ROOT.'/salaries/paiement_salary.php?action=create&token='.newToken().'&id='.$object->id, '');
1047 1047
 		}
1048 1048
 
1049 1049
 		// Classify 'paid'
@@ -1060,7 +1060,7 @@  discard block
 block discarded – undo
1060 1060
 		if (!empty($user->rights->salaries->delete) && empty($totalpaid)) {
1061 1061
 			print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
1062 1062
 		} else {
1063
-			print dolGetButtonAction($langs->trans('DisabledBecausePayments'), $langs->trans('Delete'),  'default', $_SERVER['PHP_SELF'].'#', '', false);
1063
+			print dolGetButtonAction($langs->trans('DisabledBecausePayments'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
1064 1064
 		}
1065 1065
 	}
1066 1066
 	print "</div>";
Please login to merge, or discard this patch.
htdocs/core/class/html.formticket.class.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
  *    \brief      File of class to generate the form for creating a new ticket.
26 26
  */
27 27
 
28
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
29
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php';
30
-require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
28
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
29
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
30
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
31 31
 
32 32
 if (!class_exists('FormCompany')) {
33 33
 	include DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
@@ -76,20 +76,20 @@  discard block
 block discarded – undo
76 76
 
77 77
 	public $backtopage;
78 78
 
79
-	public $ispublic;  // to show information or not into public form
79
+	public $ispublic; // to show information or not into public form
80 80
 
81 81
 	public $withtitletopic;
82 82
 	public $withtopicreadonly;
83 83
 	public $withreadid;
84 84
 
85
-	public $withcompany;  // to show company drop-down list
85
+	public $withcompany; // to show company drop-down list
86 86
 	public $withfromsocid;
87 87
 	public $withfromcontactid;
88 88
 	public $withnotifytiersatcreate;
89
-	public $withusercreate;  // to show name of creating user in form
89
+	public $withusercreate; // to show name of creating user in form
90 90
 	public $withcreatereadonly;
91 91
 
92
-	public $withref;  // to show ref field
92
+	public $withref; // to show ref field
93 93
 
94 94
 	public $withcancel;
95 95
 
@@ -128,14 +128,14 @@  discard block
 block discarded – undo
128 128
 		$this->withcompany = isModEnabled("societe");
129 129
 		$this->withfromsocid = 0;
130 130
 		$this->withfromcontactid = 0;
131
-		$this->withreadid=0;
131
+		$this->withreadid = 0;
132 132
 		//$this->withtitletopic='';
133 133
 		$this->withnotifytiersatcreate = 0;
134 134
 		$this->withusercreate = 1;
135 135
 		$this->withcreatereadonly = 1;
136 136
 		$this->withemail = 0;
137 137
 		$this->withref = 0;
138
-		$this->withextrafields = 0;  // to show extrafields or not
138
+		$this->withextrafields = 0; // to show extrafields or not
139 139
 		//$this->withtopicreadonly=0;
140 140
 	}
141 141
 
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
 				$html_contact_search  = '';
207 207
 				$html_contact_search .= '<tr id="contact_search_line">';
208 208
 				$html_contact_search .= '<td class="titlefield">';
209
-				$html_contact_search .= '<label for="contact"><span class="fieldrequired">' . $langs->trans('Contact') . '</span></label>';
209
+				$html_contact_search .= '<label for="contact"><span class="fieldrequired">'.$langs->trans('Contact').'</span></label>';
210 210
 				$html_contact_search .= '<input type="hidden" id="contact_id" name="contact_id" value="" />';
211 211
 				$html_contact_search .= '</td>';
212 212
 				$html_contact_search .= '<td id="contact_search_result"></td>';
@@ -214,26 +214,26 @@  discard block
 block discarded – undo
214 214
 				print $html_contact_search;
215 215
 				// contact lastname
216 216
 				$html_contact_lastname = '';
217
-				$html_contact_lastname .= '<tr id="contact_lastname_line" class="contact_field"><td class="titlefield"><label for="contact_lastname"><span class="fieldrequired">' . $langs->trans('Lastname') . '</span></label></td><td>';
218
-				$html_contact_lastname .= '<input type="text" id="contact_lastname" name="contact_lastname" value="' . dol_escape_htmltag(GETPOSTISSET('contact_lastname') ? GETPOST('contact_lastname', 'alphanohtml') : '') . '" />';
217
+				$html_contact_lastname .= '<tr id="contact_lastname_line" class="contact_field"><td class="titlefield"><label for="contact_lastname"><span class="fieldrequired">'.$langs->trans('Lastname').'</span></label></td><td>';
218
+				$html_contact_lastname .= '<input type="text" id="contact_lastname" name="contact_lastname" value="'.dol_escape_htmltag(GETPOSTISSET('contact_lastname') ? GETPOST('contact_lastname', 'alphanohtml') : '').'" />';
219 219
 				$html_contact_lastname .= '</td></tr>';
220 220
 				print $html_contact_lastname;
221 221
 				// contact firstname
222 222
 				$html_contact_firstname  = '';
223
-				$html_contact_firstname .= '<tr id="contact_firstname_line" class="contact_field"><td class="titlefield"><label for="contact_firstname"><span class="fieldrequired">' . $langs->trans('Firstname') . '</span></label></td><td>';
224
-				$html_contact_firstname .= '<input type="text" id="contact_firstname" name="contact_firstname" value="' . dol_escape_htmltag(GETPOSTISSET('contact_firstname') ? GETPOST('contact_firstname', 'alphanohtml') : '') . '" />';
223
+				$html_contact_firstname .= '<tr id="contact_firstname_line" class="contact_field"><td class="titlefield"><label for="contact_firstname"><span class="fieldrequired">'.$langs->trans('Firstname').'</span></label></td><td>';
224
+				$html_contact_firstname .= '<input type="text" id="contact_firstname" name="contact_firstname" value="'.dol_escape_htmltag(GETPOSTISSET('contact_firstname') ? GETPOST('contact_firstname', 'alphanohtml') : '').'" />';
225 225
 				$html_contact_firstname .= '</td></tr>';
226 226
 				print $html_contact_firstname;
227 227
 				// company name
228 228
 				$html_company_name  = '';
229
-				$html_company_name .= '<tr id="contact_company_name_line" class="contact_field"><td><label for="company_name"><span>' . $langs->trans('Company') . '</span></label></td><td>';
230
-				$html_company_name .= '<input type="text" id="company_name" name="company_name" value="' . dol_escape_htmltag(GETPOSTISSET('company_name') ? GETPOST('company_name', 'alphanohtml') : '') . '" />';
229
+				$html_company_name .= '<tr id="contact_company_name_line" class="contact_field"><td><label for="company_name"><span>'.$langs->trans('Company').'</span></label></td><td>';
230
+				$html_company_name .= '<input type="text" id="company_name" name="company_name" value="'.dol_escape_htmltag(GETPOSTISSET('company_name') ? GETPOST('company_name', 'alphanohtml') : '').'" />';
231 231
 				$html_company_name .= '</td></tr>';
232 232
 				print $html_company_name;
233 233
 				// contact phone
234 234
 				$html_contact_phone  = '';
235
-				$html_contact_phone .= '<tr id="contact_phone_line" class="contact_field"><td><label for="contact_phone"><span>' . $langs->trans('Phone') . '</span></label></td><td>';
236
-				$html_contact_phone .= '<input type="text" id="contact_phone" name="contact_phone" value="' . dol_escape_htmltag(GETPOSTISSET('contact_phone') ? GETPOST('contact_phone', 'alphanohtml') : '') . '" />';
235
+				$html_contact_phone .= '<tr id="contact_phone_line" class="contact_field"><td><label for="contact_phone"><span>'.$langs->trans('Phone').'</span></label></td><td>';
236
+				$html_contact_phone .= '<input type="text" id="contact_phone" name="contact_phone" value="'.dol_escape_htmltag(GETPOSTISSET('contact_phone') ? GETPOST('contact_phone', 'alphanohtml') : '').'" />';
237 237
 				$html_contact_phone .= '</td></tr>';
238 238
 				print $html_contact_phone;
239 239
 
@@ -501,7 +501,7 @@  discard block
 block discarded – undo
501 501
 				$maxfilesizearray = getMaxFileSizeArray();
502 502
 				$maxmin = $maxfilesizearray['maxmin'];
503 503
 				if ($maxmin > 0) {
504
-					$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
504
+					$out .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
505 505
 				}
506 506
 				$out .= '<input type="file" class="flat" id="addedfile" name="addedfile" value="'.$langs->trans("Upload").'" />';
507 507
 				$out .= ' ';
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
 		$selected = is_array($selected) ? $selected : (!empty($selected) ? array($selected) : array());
690 690
 		$ticketstat = new Ticket($this->db);
691 691
 
692
-		dol_syslog(get_class($this) . "::select_types_tickets " . implode(';', $selected) . ", " . $htmlname . ", " . $filtertype . ", " . $format . ", " . $multiselect, LOG_DEBUG);
692
+		dol_syslog(get_class($this)."::select_types_tickets ".implode(';', $selected).", ".$htmlname.", ".$filtertype.", ".$format.", ".$multiselect, LOG_DEBUG);
693 693
 
694 694
 		$filterarray = array();
695 695
 
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 
700 700
 		$ticketstat->loadCacheTypesTickets();
701 701
 
702
-		print '<select id="select'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.($multiselect?'[]':'').'"'.($multiselect?' multiple':'').'>';
702
+		print '<select id="select'.$htmlname.'" class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.($multiselect ? '[]' : '').'"'.($multiselect ? ' multiple' : '').'>';
703 703
 		if ($empty) {
704 704
 			print '<option value="">&nbsp;</option>';
705 705
 		}
@@ -876,11 +876,11 @@  discard block
 block discarded – undo
876 876
 			}
877 877
 
878 878
 			print ajax_combobox('select'.$htmlname);
879
-		} elseif ($htmlname!='') {
879
+		} elseif ($htmlname != '') {
880 880
 			$selectedgroups = array();
881 881
 			$groupvalue = "";
882
-			$groupticket=GETPOST($htmlname, 'aZ09');
883
-			$child_id=GETPOST($htmlname.'_child_id', 'aZ09')?GETPOST($htmlname.'_child_id', 'aZ09'):0;
882
+			$groupticket = GETPOST($htmlname, 'aZ09');
883
+			$child_id = GETPOST($htmlname.'_child_id', 'aZ09') ?GETPOST($htmlname.'_child_id', 'aZ09') : 0;
884 884
 			if (!empty($groupticket)) {
885 885
 				$tmpgroupticket = $groupticket;
886 886
 				$sql = "SELECT ctc.rowid, ctc.fk_parent, ctc.code FROM ".$this->db->prefix()."c_ticket_category as ctc WHERE ctc.code = '".$this->db->escape($tmpgroupticket)."'";
@@ -938,9 +938,9 @@  discard block
 block discarded – undo
938 938
 
939 939
 						$isparent = $obj->isparent;
940 940
 						if (is_array($selectedgroups)) {
941
-							$iselected = in_array($obj->code, $selectedgroups) ?'selected':'';
941
+							$iselected = in_array($obj->code, $selectedgroups) ? 'selected' : '';
942 942
 						} else {
943
-							$iselected = $groupticket == $obj->code ?'selected':'';
943
+							$iselected = $groupticket == $obj->code ? 'selected' : '';
944 944
 						}
945 945
 						$stringtoprint .= '<option '.$iselected.' class="'.$htmlname.dol_escape_htmltag($grouprowid).'" value="'.dol_escape_htmltag($groupvalue).'" data-html="'.dol_escape_htmltag($grouplabel).'">'.dol_escape_htmltag($grouplabel).'</option>';
946 946
 						if ($isparent == 'NOTPARENT') {
@@ -962,7 +962,7 @@  discard block
 block discarded – undo
962 962
 			}
963 963
 			$stringtoprint .= '</select>&nbsp;';
964 964
 
965
-			$levelid = 1;	// The first combobox
965
+			$levelid = 1; // The first combobox
966 966
 			while ($levelid <= $use_multilevel) {	// Loop to take the child of the combo
967 967
 				$tabscript = array();
968 968
 				$stringtoprint .= '<select id ="'.$htmlname.'_child_'.$levelid.'" class="maxwidth500 minwidth400 groupticketchild" child_id="'.$levelid.'">';
@@ -993,7 +993,7 @@  discard block
 block discarded – undo
993 993
 				if ($resql) {
994 994
 					$num_rows = $this->db->num_rows($resql);
995 995
 					$i = 0;
996
-					$arrayidused=array();
996
+					$arrayidused = array();
997 997
 					while ($i < $num_rows) {
998 998
 						$obj = $this->db->fetch_object($resql);
999 999
 						if ($obj) {
@@ -1016,13 +1016,13 @@  discard block
 block discarded – undo
1016 1016
 								$arraycodenotparent[] = $groupvalue;
1017 1017
 							}
1018 1018
 							if (is_array($selectedgroups)) {
1019
-								$iselected = in_array($obj->code, $selectedgroups) ?'selected':'';
1019
+								$iselected = in_array($obj->code, $selectedgroups) ? 'selected' : '';
1020 1020
 							} else {
1021
-								$iselected = $groupticket == $obj->code ?'selected':'';
1021
+								$iselected = $groupticket == $obj->code ? 'selected' : '';
1022 1022
 							}
1023 1023
 							$stringtoprint .= '<option '.$iselected.' class="'.$htmlname.'_'.dol_escape_htmltag($fatherid).'_child_'.$levelid.'" value="'.dol_escape_htmltag($groupvalue).'" data-html="'.dol_escape_htmltag($grouplabel).'">'.dol_escape_htmltag($grouplabel).'</option>';
1024 1024
 							if (empty($tabscript[$groupcodefather])) {
1025
-								$tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ?'_child_'.($levelid-1):'').'").val() == "'.dol_escape_js($groupcodefather).'"){
1025
+								$tabscript[$groupcodefather] = 'if ($("#'.$htmlname.($levelid > 1 ? '_child_'.($levelid - 1) : '').'").val() == "'.dol_escape_js($groupcodefather).'"){
1026 1026
 									$(".'.$htmlname.'_'.dol_escape_htmltag($fatherid).'_child_'.$levelid.'").show()
1027 1027
 									console.log("We show childs tickets of '.$groupcodefather.' group ticket")
1028 1028
 								}else{
@@ -1036,11 +1036,11 @@  discard block
 block discarded – undo
1036 1036
 				} else {
1037 1037
 					dol_print_error($this->db);
1038 1038
 				}
1039
-				$stringtoprint .='</select>';
1039
+				$stringtoprint .= '</select>';
1040 1040
 
1041
-				$stringtoprint .='<script>';
1042
-				$stringtoprint .='arraynotparents = '.json_encode($arraycodenotparent).';';	// when the last visible combo list is number x, this is the array of group
1043
-				$stringtoprint .='if (arraynotparents.includes($("#'.$htmlname.($levelid > 1 ?'_child_'.($levelid-1):'').'").val())){
1041
+				$stringtoprint .= '<script>';
1042
+				$stringtoprint .= 'arraynotparents = '.json_encode($arraycodenotparent).';'; // when the last visible combo list is number x, this is the array of group
1043
+				$stringtoprint .= 'if (arraynotparents.includes($("#'.$htmlname.($levelid > 1 ? '_child_'.($levelid - 1) : '').'").val())){
1044 1044
 					console.log("'.$htmlname.'_child_'.$levelid.'")
1045 1045
 					if($("#'.$htmlname.'_child_'.$levelid.'").val() == "" && ($("#'.$htmlname.'_child_'.$levelid.'").attr("child_id")>'.$child_id.')){
1046 1046
 						$("#'.$htmlname.'_child_'.$levelid.'").hide();
@@ -1052,8 +1052,8 @@  discard block
 block discarded – undo
1052 1052
 						console.log("We choose '.$htmlname.' input and reload hidden input");
1053 1053
 					}
1054 1054
 				}
1055
-				$("#'.$htmlname.($levelid > 1 ?'_child_'.($levelid-1):'').'").change(function() {
1056
-					child_id = $("#'.$htmlname.($levelid > 1 ?'_child_'.$levelid:'').'").attr("child_id");
1055
+				$("#'.$htmlname.($levelid > 1 ? '_child_'.($levelid - 1) : '').'").change(function() {
1056
+					child_id = $("#'.$htmlname.($levelid > 1 ? '_child_'.$levelid : '').'").attr("child_id");
1057 1057
 
1058 1058
 					/* Change of value to select this value*/
1059 1059
 					if (arraynotparents.includes($(this).val()) || $(this).attr("child_id") == '.$use_multilevel.') {
@@ -1096,16 +1096,16 @@  discard block
 block discarded – undo
1096 1096
 				foreach ($tabscript as $script) {
1097 1097
 					$stringtoprint .= $script;
1098 1098
 				};
1099
-				$stringtoprint .='})';
1100
-				$stringtoprint .='</script>';
1099
+				$stringtoprint .= '})';
1100
+				$stringtoprint .= '</script>';
1101 1101
 			}
1102
-			$stringtoprint .='<script>';
1103
-			$stringtoprint .='$("#'.$htmlname.'_child_'.$use_multilevel.'").change(function() {
1102
+			$stringtoprint .= '<script>';
1103
+			$stringtoprint .= '$("#'.$htmlname.'_child_'.$use_multilevel.'").change(function() {
1104 1104
 				$("#ticketcategory_select").val($(this).val());
1105 1105
 				$("#ticketcategory_select_child_id").val($(this).attr("child_id"));
1106 1106
 				console.log($("#ticketcategory_select").val());
1107 1107
 			})';
1108
-			$stringtoprint .='</script>';
1108
+			$stringtoprint .= '</script>';
1109 1109
 			$stringtoprint .= ajax_combobox($htmlname);
1110 1110
 
1111 1111
 			return $stringtoprint;
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
 			$res = $ticketstat->fetch('', '', $this->track_id);
1416 1416
 
1417 1417
 			print '<tr><td></td><td>';
1418
-			$checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : ($conf->global->TICKETS_MESSAGE_FORCE_MAIL?'checked':''));
1418
+			$checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : ($conf->global->TICKETS_MESSAGE_FORCE_MAIL ? 'checked' : ''));
1419 1419
 			print '<input type="checkbox" name="send_email" value="1" id="send_msg_email" '.$checkbox_selected.'/> ';
1420 1420
 			print '<label for="send_msg_email">'.$langs->trans('SendMessageByEmail').'</label>';
1421 1421
 			$texttooltip = $langs->trans("TicketMessageSendEmailHelp", '{s1}');
Please login to merge, or discard this patch.
htdocs/core/class/utils.class.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
 			if ($choice == 'allfiles') {
102 102
 				// Delete all files (except install.lock, do not follow symbolic links)
103 103
 				if ($dolibarr_main_data_root) {
104
-					$filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1);	// No need to use recursive, we will delete directory
104
+					$filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1); // No need to use recursive, we will delete directory
105 105
 				}
106 106
 			}
107 107
 
108 108
 			if ($choice == 'allfilesold') {
109 109
 				// Delete all files (except install.lock, do not follow symbolic links)
110 110
 				if ($dolibarr_main_data_root) {
111
-					$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold);	// No need to use recursive, we will delete directory
111
+					$filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold); // No need to use recursive, we will delete directory
112 112
 				}
113 113
 			}
114 114
 
@@ -1303,14 +1303,14 @@  discard block
 block discarded – undo
1303 1303
 		}
1304 1304
 		if ($tmpfiles && is_array($tmpfiles)) {
1305 1305
 			foreach ($tmpfiles as $key => $val) {
1306
-				if ($key  == 'fullname') {
1306
+				if ($key == 'fullname') {
1307 1307
 					$filepath = array($val);
1308 1308
 					$filesize = dol_filesize($val);
1309 1309
 				}
1310
-				if ($key  == 'type') {
1310
+				if ($key == 'type') {
1311 1311
 					$mimetype = array($val);
1312 1312
 				}
1313
-				if ($key  == 'relativename') {
1313
+				if ($key == 'relativename') {
1314 1314
 					$filename = array($val);
1315 1315
 				}
1316 1316
 			}
@@ -1319,7 +1319,7 @@  discard block
 block discarded – undo
1319 1319
 		if ($filepath) {
1320 1320
 			if ($filesize > $sizelimit) {
1321 1321
 				$message .= '<br>'.$langs->trans("BackupIsTooLargeSend");
1322
-				$documenturl =  $dolibarr_main_url_root.'/document.php?modulepart=systemtools&atachement=1&file=backup/'.urlencode($filename[0]);
1322
+				$documenturl = $dolibarr_main_url_root.'/document.php?modulepart=systemtools&atachement=1&file=backup/'.urlencode($filename[0]);
1323 1323
 				$message .= '<br><a href='.$documenturl.'>Lien de téléchargement</a>';
1324 1324
 				$filepath = '';
1325 1325
 				$mimetype = '';
@@ -1331,7 +1331,7 @@  discard block
 block discarded – undo
1331 1331
 		}
1332 1332
 
1333 1333
 		if (!$error) {
1334
-			include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
1334
+			include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
1335 1335
 			$mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, '', '', 0, -1);
1336 1336
 			if ($mailfile->error) {
1337 1337
 				$error++;
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
 		}
1391 1391
 
1392 1392
 		$cron_job = new Cronjob($db);
1393
-		$cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, '', 1);	// Fetch jobs that are currently running
1393
+		$cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, '', 1); // Fetch jobs that are currently running
1394 1394
 
1395 1395
 		// Iterate over all jobs in processing (this can't be this job since his state is set to 0 before)
1396 1396
 		foreach ($cron_job->lines as $job_line) {
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
 			}
1409 1409
 
1410 1410
 			// Calling posix_kill with the 0 kill signal will return true if the process is running, false otherwise.
1411
-			if (! posix_kill($job->pid, 0)) {
1411
+			if (!posix_kill($job->pid, 0)) {
1412 1412
 				// Clean processing and pid values
1413 1413
 				$job->processing = 0;
1414 1414
 				$job->pid = null;
Please login to merge, or discard this patch.
htdocs/core/class/lessc.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 					$value = $a[2];
705 705
 				} else {
706 706
 					$value = null; // :(
707
-					$this->throwError("Failed to assign arg ".$a[1]);	// This end function by throwing an exception
707
+					$this->throwError("Failed to assign arg ".$a[1]); // This end function by throwing an exception
708 708
 				}
709 709
 
710 710
 				$value = $this->reduce($value);
@@ -1118,7 +1118,7 @@  discard block
 block discarded – undo
1118 1118
 				if (isset($items[0])) {
1119 1119
 					return $this->lib_e($items[0]);
1120 1120
 				}
1121
-				$this->throwError("unrecognised input");	// This end function by throwing an exception
1121
+				$this->throwError("unrecognised input"); // This end function by throwing an exception
1122 1122
 			case "string":
1123 1123
 				$arg[1] = "";
1124 1124
 				return $arg;
Please login to merge, or discard this patch.
htdocs/hrm/class/skill.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	/**
109 109
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
110 110
 	 */
111
-	public $fields=array(
111
+	public $fields = array(
112 112
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
113 113
 		'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>'1', 'position'=>30, 'notnull'=>1, 'visible'=>1, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'showoncombobox'=>'2',),
114 114
 		'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>'1', 'position'=>60, 'notnull'=>0, 'visible'=>3,),
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 	 */
228 228
 	public function create(User $user, $notrigger = false)
229 229
 	{
230
-		global $langs,$conf;
230
+		global $langs, $conf;
231 231
 
232 232
 		$resultcreate = $this->createCommon($user, $notrigger);
233 233
 
@@ -255,24 +255,24 @@  discard block
 block discarded – undo
255 255
 
256 256
 		$error = 0;
257 257
 
258
-		require_once __DIR__ . '/skilldet.class.php';
258
+		require_once __DIR__.'/skilldet.class.php';
259 259
 
260 260
 		$this->db->begin();
261 261
 
262 262
 		// Create level of skills
263
-		for ($i; $i <= $MaxNumberSkill ; $i++) {
263
+		for ($i; $i <= $MaxNumberSkill; $i++) {
264 264
 			$skilldet = new Skilldet($this->db);
265
-			$skilldet->description = $defaultSkillDesc . " " . $i;
265
+			$skilldet->description = $defaultSkillDesc." ".$i;
266 266
 			$skilldet->rankorder = $i;
267 267
 			$skilldet->fk_skill = $this->id;
268 268
 
269
-			$result =  $skilldet->create($user);
269
+			$result = $skilldet->create($user);
270 270
 			if ($result <= 0) {
271 271
 				$error++;
272 272
 			}
273 273
 		}
274 274
 
275
-		if (! $error) {
275
+		if (!$error) {
276 276
 			$this->db->commit();
277 277
 
278 278
 			setEventMessage($langs->trans('SkillCreated'), $i);
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 	public function fetchLines()
407 407
 	{
408 408
 		$this->lines = array();
409
-		require_once __DIR__ . '/skilldet.class.php';
409
+		require_once __DIR__.'/skilldet.class.php';
410 410
 		$skilldet = new Skilldet($this->db);
411 411
 		$this->lines = $skilldet->fetchAll('ASC', '', '', '', array('fk_skill' => $this->id), '');
412 412
 
Please login to merge, or discard this patch.
htdocs/societe/card.php 1 patch
Spacing   +42 added lines, -42 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 $backtopage = GETPOST('backtopage', 'alpha');
94 94
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
95 95
 $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
96
-$confirm 	= GETPOST('confirm', 'alpha');
96
+$confirm = GETPOST('confirm', 'alpha');
97 97
 
98 98
 if (!empty($backtopagejsfields)) {
99 99
 	$tmpbacktopagejsfields = explode(':', $backtopagejsfields);
@@ -141,12 +141,12 @@  discard block
 block discarded – undo
141 141
 }
142 142
 
143 143
 // Permissions
144
-$permissiontoread 	= $user->hasRight('societe', 'lire');
145
-$permissiontoadd 	= $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
144
+$permissiontoread = $user->hasRight('societe', 'lire');
145
+$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
146 146
 $permissiontodelete = $user->hasRight('societe', 'supprimer') || ($permissiontoadd && isset($object->status) && $object->status == 0);
147
-$permissionnote 	= $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php
147
+$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php
148 148
 $permissiondellink 	= $user->hasRight('societe', 'creer'); // Used by the include of actions_dellink.inc.php
149
-$upload_dir 		= $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1];
149
+$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1];
150 150
 
151 151
 // Security check
152 152
 $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0);
@@ -430,12 +430,12 @@  discard block
 block discarded – undo
430 430
 			$error++;
431 431
 		}
432 432
 
433
-		if (isModEnabled('mailing') && !empty($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
433
+		if (isModEnabled('mailing') && !empty($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && GETPOST('contact_no_email', 'int') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
434 434
 			$error++;
435 435
 			setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors');
436 436
 		}
437 437
 
438
-		if (isModEnabled('mailing') && GETPOST("private", 'int') == 1 && !empty($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
438
+		if (isModEnabled('mailing') && GETPOST("private", 'int') == 1 && !empty($conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS) && $conf->global->MAILING_CONTACT_DEFAULT_BULK_STATUS == 2 && GETPOST('contact_no_email', 'int') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) {
439 439
 			$error++;
440 440
 			setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors');
441 441
 		}
@@ -454,19 +454,19 @@  discard block
 block discarded – undo
454 454
 				$object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml'));
455 455
 				$object->civility_id		= GETPOST('civility_id', 'alphanohtml'); // Note: civility id is a code, not an int
456 456
 				// Add non official properties
457
-				$object->name_bis			= GETPOST('name', 'alphanohtml');
458
-				$object->firstname			= GETPOST('firstname', 'alphanohtml');
457
+				$object->name_bis = GETPOST('name', 'alphanohtml');
458
+				$object->firstname = GETPOST('firstname', 'alphanohtml');
459 459
 			} else {
460
-				$object->name				= GETPOST('name', 'alphanohtml');
460
+				$object->name = GETPOST('name', 'alphanohtml');
461 461
 			}
462 462
 			$object->entity					= (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity);
463
-			$object->name_alias				= GETPOST('name_alias', 'alphanohtml');
463
+			$object->name_alias = GETPOST('name_alias', 'alphanohtml');
464 464
 			$object->parent					= GETPOST('parent_company_id', 'int');
465 465
 			$object->address				= GETPOST('address', 'alphanohtml');
466
-			$object->zip					= GETPOST('zipcode', 'alphanohtml');
467
-			$object->town					= GETPOST('town', 'alphanohtml');
468
-			$object->country_id				= GETPOST('country_id', 'int');
469
-			$object->state_id				= GETPOST('state_id', 'int');
466
+			$object->zip = GETPOST('zipcode', 'alphanohtml');
467
+			$object->town = GETPOST('town', 'alphanohtml');
468
+			$object->country_id = GETPOST('country_id', 'int');
469
+			$object->state_id = GETPOST('state_id', 'int');
470 470
 
471 471
 			$object->socialnetworks = array();
472 472
 			if (isModEnabled('socialnetworks')) {
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 			$object->phone					= GETPOST('phone', 'alpha');
481 481
 			$object->fax					= GETPOST('fax', 'alpha');
482 482
 			$object->email					= trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL));
483
-			$object->no_email 				= GETPOST("no_email", "int");
483
+			$object->no_email = GETPOST("no_email", "int");
484 484
 			$object->url					= trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL));
485 485
 			$object->idprof1				= trim(GETPOST('idprof1', 'alphanohtml'));
486 486
 			$object->idprof2				= trim(GETPOST('idprof2', 'alphanohtml'));
@@ -490,7 +490,7 @@  discard block
 block discarded – undo
490 490
 			$object->idprof6				= trim(GETPOST('idprof6', 'alphanohtml'));
491 491
 			$object->prefix_comm			= GETPOST('prefix_comm', 'alphanohtml');
492 492
 			$object->code_client			= GETPOSTISSET('customer_code') ?GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha');
493
-			$object->code_fournisseur		= GETPOSTISSET('supplier_code') ?GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha');
493
+			$object->code_fournisseur = GETPOSTISSET('supplier_code') ?GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha');
494 494
 			$object->capital				= GETPOST('capital', 'alphanohtml');
495 495
 			$object->barcode				= GETPOST('barcode', 'alphanohtml');
496 496
 
@@ -505,24 +505,24 @@  discard block
 block discarded – undo
505 505
 			$object->localtax1_value		= GETPOST('lt1', 'alpha');
506 506
 			$object->localtax2_value		= GETPOST('lt2', 'alpha');
507 507
 
508
-			$object->forme_juridique_code	= GETPOST('forme_juridique_code', 'int');
508
+			$object->forme_juridique_code = GETPOST('forme_juridique_code', 'int');
509 509
 			$object->effectif_id			= GETPOST('effectif_id', 'int');
510
-			$object->typent_id				= GETPOST('typent_id', 'int');
510
+			$object->typent_id = GETPOST('typent_id', 'int');
511 511
 
512 512
 			$object->typent_code			= dol_getIdFromCode($db, $object->typent_id, 'c_typent', 'id', 'code'); // Force typent_code too so check in verify() will be done on new type
513 513
 
514
-			$object->client					= GETPOST('client', 'int');
514
+			$object->client = GETPOST('client', 'int');
515 515
 			$object->fournisseur			= GETPOST('fournisseur', 'int');
516 516
 
517
-			$object->commercial_id			= GETPOST('commercial_id', 'int');
518
-			$object->default_lang			= GETPOST('default_lang');
517
+			$object->commercial_id = GETPOST('commercial_id', 'int');
518
+			$object->default_lang = GETPOST('default_lang');
519 519
 
520 520
 			// Webservices url/key
521 521
 			$object->webservices_url		= GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL);
522 522
 			$object->webservices_key		= GETPOST('webservices_key', 'san_alpha');
523 523
 
524 524
 			if (GETPOSTISSET('accountancy_code_sell')) {
525
-				$accountancy_code_sell		= GETPOST('accountancy_code_sell', 'alpha');
525
+				$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
526 526
 
527 527
 				if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') {
528 528
 					$object->accountancy_code_sell = '';
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 				}
532 532
 			}
533 533
 			if (GETPOSTISSET('accountancy_code_buy')) {
534
-				$accountancy_code_buy		= GETPOST('accountancy_code_buy', 'alpha');
534
+				$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
535 535
 
536 536
 				if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') {
537 537
 					$object->accountancy_code_buy = '';
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
 
979 979
 	// Actions to build doc
980 980
 	$id = $socid;
981
-	$upload_dir = !empty($conf->societe->multidir_output[$object->entity])?$conf->societe->multidir_output[$object->entity]:$conf->societe->dir_output;
981
+	$upload_dir = !empty($conf->societe->multidir_output[$object->entity]) ? $conf->societe->multidir_output[$object->entity] : $conf->societe->dir_output;
982 982
 	$permissiontoadd = $user->hasRight('societe', 'creer');
983 983
 	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
984 984
 }
@@ -1154,7 +1154,7 @@  discard block
 block discarded – undo
1154 1154
 		$object->default_lang = GETPOST('default_lang');
1155 1155
 
1156 1156
 		if (GETPOSTISSET('accountancy_code_sell')) {
1157
-			$accountancy_code_sell  = GETPOST('accountancy_code_sell', 'alpha');
1157
+			$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
1158 1158
 
1159 1159
 			if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') {
1160 1160
 				$object->accountancy_code_sell = '';
@@ -1163,7 +1163,7 @@  discard block
 block discarded – undo
1163 1163
 			}
1164 1164
 		}
1165 1165
 		if (GETPOSTISSET('accountancy_code_buy')) {
1166
-			$accountancy_code_buy   = GETPOST('accountancy_code_buy', 'alpha');
1166
+			$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
1167 1167
 
1168 1168
 			if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') {
1169 1169
 				$object->accountancy_code_buy = '';
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
                         	document.formsoc.private.value=1;
1249 1249
                         });
1250 1250
 
1251
-						var canHaveCategoryIfNotCustomerProspectSupplier = ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT) ? '0' : '1') . ';
1251
+						var canHaveCategoryIfNotCustomerProspectSupplier = ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT) ? '0' : '1').';
1252 1252
 
1253 1253
 						init_customer_categ();
1254 1254
 			  			$("#customerprospect").change(function() {
@@ -1624,7 +1624,7 @@  discard block
 block discarded – undo
1624 1624
 			if ($conf->browser->layout == 'phone') {
1625 1625
 				print '</tr><tr>';
1626 1626
 			}
1627
-			print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>';
1627
+			print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>';
1628 1628
 			print '<td class="individualline" '.(($conf->browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1).'</td>';
1629 1629
 		}
1630 1630
 		print '</tr>';
@@ -1683,7 +1683,7 @@  discard block
 block discarded – undo
1683 1683
 		$i = 1; $j = 0; $NBCOLS = ($conf->browser->layout == 'phone' ? 1 : 2);
1684 1684
 		while ($i <= 6) {
1685 1685
 			$idprof = $langs->transcountry('ProfId'.$i, $object->country_code);
1686
-			if ($idprof != '-')	{
1686
+			if ($idprof != '-') {
1687 1687
 				$key = 'idprof'.$i;
1688 1688
 
1689 1689
 				if (($j % $NBCOLS) == 0) {
@@ -1721,7 +1721,7 @@  discard block
 block discarded – undo
1721 1721
 		if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) {
1722 1722
 			$s .= ' ';
1723 1723
 
1724
-			if (!empty($conf->use_javascript_ajax))	{
1724
+			if (!empty($conf->use_javascript_ajax)) {
1725 1725
 				$widthpopup = 600;
1726 1726
 				if (!empty($conf->dol_use_jmobile)) {
1727 1727
 					$widthpopup = 350;
@@ -1767,7 +1767,7 @@  discard block
 block discarded – undo
1767 1767
 		}
1768 1768
 
1769 1769
 		// Type - Workforce/Staff
1770
-		print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.( ($conf->browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>'."\n";
1770
+		print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.(($conf->browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>'."\n";
1771 1771
 		$sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
1772 1772
 		print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, $sortparam, '', 1);
1773 1773
 		if ($user->admin) {
@@ -2003,7 +2003,7 @@  discard block
 block discarded – undo
2003 2003
 				$object->phone					= GETPOST('phone', 'alpha');
2004 2004
 				$object->fax					= GETPOST('fax', 'alpha');
2005 2005
 				$object->email					= GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
2006
-				$object->no_email				= GETPOST("no_email", "int");
2006
+				$object->no_email = GETPOST("no_email", "int");
2007 2007
 				$object->url					= GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
2008 2008
 				$object->capital				= GETPOST('capital', 'alphanohtml');
2009 2009
 				$object->idprof1				= GETPOST('idprof1', 'alphanohtml');
@@ -2027,7 +2027,7 @@  discard block
 block discarded – undo
2027 2027
 				$object->webservices_key        = GETPOST('webservices_key', 'san_alpha');
2028 2028
 
2029 2029
 				if (GETPOSTISSET('accountancy_code_sell')) {
2030
-					$accountancy_code_sell  = GETPOST('accountancy_code_sell', 'alpha');
2030
+					$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
2031 2031
 
2032 2032
 					if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') {
2033 2033
 						$object->accountancy_code_sell = '';
@@ -2036,7 +2036,7 @@  discard block
 block discarded – undo
2036 2036
 					}
2037 2037
 				}
2038 2038
 				if (GETPOSTISSET('accountancy_code_buy')) {
2039
-					$accountancy_code_buy   = GETPOST('accountancy_code_buy', 'alpha');
2039
+					$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
2040 2040
 
2041 2041
 					if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') {
2042 2042
 						$object->accountancy_code_buy = '';
@@ -2118,7 +2118,7 @@  discard block
 block discarded – undo
2118 2118
     				}
2119 2119
     			});
2120 2120
 
2121
-				var canHaveCategoryIfNotCustomerProspectSupplier = ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT) ? '0' : '1') . ';
2121
+				var canHaveCategoryIfNotCustomerProspectSupplier = ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT) ? '0' : '1').';
2122 2122
 
2123 2123
 				init_customer_categ();
2124 2124
 	  			$("#customerprospect").change(function() {
@@ -2302,13 +2302,13 @@  discard block
 block discarded – undo
2302 2302
 			print '</td></tr>';
2303 2303
 
2304 2304
 			// Zip / Town
2305
-			print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>';
2305
+			print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>';
2306 2306
 			print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100');
2307 2307
 			print '</td>';
2308 2308
 			if ($conf->browser->layout == 'phone') {
2309 2309
 				print '</tr><tr>';
2310 2310
 			}
2311
-			print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>';
2311
+			print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>';
2312 2312
 			print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'));
2313 2313
 			print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent');
2314 2314
 			print '</td></tr>';
@@ -2337,12 +2337,12 @@  discard block
 block discarded – undo
2337 2337
 
2338 2338
 			// Phone / Fax
2339 2339
 			print '<tr><td>'.$form->editfieldkey('Phone', 'phone', GETPOST('phone', 'alpha'), $object, 0).'</td>';
2340
-			print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td>';
2340
+			print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning', 'class="pictofixedwidth"').' <input type="text" name="phone" id="phone" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('phone') ? GETPOST('phone', 'alpha') : $object->phone).'"></td>';
2341 2341
 			if ($conf->browser->layout == 'phone') {
2342 2342
 				print '</tr><tr>';
2343 2343
 			}
2344 2344
 			print '<td>'.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).'</td>';
2345
-			print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $object->fax).'"></td>';
2345
+			print '<td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'.img_picto('', 'object_phoning_fax', 'class="pictofixedwidth"').' <input type="text" name="fax" id="fax" class="maxwidth200 widthcentpercentminusx" value="'.(GETPOSTISSET('fax') ? GETPOST('fax', 'alpha') : $object->fax).'"></td>';
2346 2346
 			print '</tr>';
2347 2347
 
2348 2348
 			// Web
@@ -2516,7 +2516,7 @@  discard block
 block discarded – undo
2516 2516
 			print '</tr>';
2517 2517
 
2518 2518
 			// Type - Workforce/Staff
2519
-			print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.( ($conf->browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>';
2519
+			print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone"'.(($conf->browser->layout == 'phone' || !empty($conf->global->SOCIETE_DISABLE_WORKFORCE)) ? ' colspan="3"' : '').'>';
2520 2520
 			print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 1, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT), '', 1);
2521 2521
 			if ($user->admin) {
2522 2522
 				print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
@@ -2652,7 +2652,7 @@  discard block
 block discarded – undo
2652 2652
 				$maxfilesizearray = getMaxFileSizeArray();
2653 2653
 				$maxmin = $maxfilesizearray['maxmin'];
2654 2654
 				if ($maxmin > 0) {
2655
-					print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
2655
+					print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
2656 2656
 				}
2657 2657
 				print '<input type="file" class="flat" name="photo" id="photoinput">';
2658 2658
 				print '</td></tr>';
Please login to merge, or discard this patch.