Completed
Branch develop (66a443)
by
unknown
18:15
created
htdocs/core/modules/stock/doc/pdf_standard.modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
 		$pdf->SetFont('', 'B', $default_font_size - 3);
686 686
 
687 687
 		// Output Rect
688
-		$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur-$this->marge_gauche-$this->marge_droite, $tab_height, $hidetop, $hidebottom);	// Rect takes a length in 3rd parameter and 4th parameter
688
+		$this->printRect($pdf, $this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_gauche - $this->marge_droite, $tab_height, $hidetop, $hidebottom); // Rect takes a length in 3rd parameter and 4th parameter
689 689
 
690 690
 		$pdf->SetLineStyle(array('dash'=>'0', 'color'=>array(200, 200, 200)));
691 691
 		$pdf->SetDrawColor(200, 200, 200);
@@ -696,24 +696,24 @@  discard block
 block discarded – undo
696 696
 
697 697
 
698 698
 		if (empty($hidetop)) {
699
-			$pdf->line($this->marge_gauche, $tab_top+11, $this->page_largeur-$this->marge_droite, $tab_top+11);	// line takes a position y in 2nd parameter and 4th parameter
699
+			$pdf->line($this->marge_gauche, $tab_top + 11, $this->page_largeur - $this->marge_droite, $tab_top + 11); // line takes a position y in 2nd parameter and 4th parameter
700 700
 			$pdf->SetXY($this->posxdesc - 1, $tab_top + 1);
701 701
 			$pdf->MultiCell($this->wref, 3, $outputlangs->transnoentities("Ref"), '', 'L');
702 702
 		}
703 703
 
704
-		$pdf->line($this->posxlabel-1, $tab_top, $this->posxlabel-1, $tab_top + $tab_height);
704
+		$pdf->line($this->posxlabel - 1, $tab_top, $this->posxlabel - 1, $tab_top + $tab_height);
705 705
 		if (empty($hidetop)) {
706 706
 			$pdf->SetXY($this->posxlabel - 1, $tab_top + 1);
707 707
 			$pdf->MultiCell($this->posxqty - $this->posxlabel - 1, 2, $outputlangs->transnoentities("Label"), '', 'C');
708 708
 		}
709 709
 
710
-		$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
710
+		$pdf->line($this->posxqty - 1, $tab_top, $this->posxqty - 1, $tab_top + $tab_height);
711 711
 		if (empty($hidetop)) {
712 712
 			$pdf->SetXY($this->posxqty - 1, $tab_top + 1);
713 713
 			$pdf->MultiCell($this->posxup - $this->posxqty - 1, 2, $outputlangs->transnoentities("Units"), '', 'C');
714 714
 		}
715 715
 
716
-		$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
716
+		$pdf->line($this->posxup - 1, $tab_top, $this->posxup - 1, $tab_top + $tab_height);
717 717
 		if (empty($hidetop)) {
718 718
 			$pdf->SetXY($this->posxup - 1, $tab_top + 1);
719 719
 			$pdf->MultiCell($this->posxunit - $this->posxup - 1, 2, $outputlangs->transnoentities("AverageUnitPricePMPShort"), '', 'C');
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
 			$pdf->MultiCell($this->posxdiscount - $this->posxunit - 1, 2, $outputlangs->transnoentities("EstimatedStockValueShort"), '', 'C');
726 726
 		}
727 727
 
728
-		$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
728
+		$pdf->line($this->posxdiscount - 1, $tab_top, $this->posxdiscount - 1, $tab_top + $tab_height);
729 729
 		if (empty($hidetop)) {
730 730
 			$pdf->SetXY($this->posxdiscount - 1, $tab_top + 1);
731 731
 			$pdf->MultiCell($this->postotalht - $this->posxdiscount + 1, 2, $outputlangs->transnoentities("SellPriceMin"), '', 'C');
Please login to merge, or discard this patch.
htdocs/recruitment/recruitmentjobposition_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -303,7 +303,7 @@
 block discarded – undo
303 303
 					$sql .= " AND t.".$db->escape($columnName)." >= '".$db->idate($search[$key])."'";
304 304
 				}
305 305
 				if (preg_match('/_dtend$/', $key)) {
306
-					$sql .= " AND t.".$db->escape($columnName)." <= '" . $db->idate($search[$key])."'";
306
+					$sql .= " AND t.".$db->escape($columnName)." <= '".$db->idate($search[$key])."'";
307 307
 				}
308 308
 			}
309 309
 		}
Please login to merge, or discard this patch.
htdocs/theme/md/dropdown.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
201 201
 }
202 202
 
203 203
 div#topmenu-global-search-dropdown, div#topmenu-quickadd-dropdown, div#topmenu-bookmark-dropdown {
204
-	line-height: <?php echo (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 ? '35' : '46' ); ?>px;
204
+	line-height: <?php echo (getDolGlobalInt('THEME_TOPMENU_DISABLE_IMAGE') == 1 ? '35' : '46'); ?>px;
205 205
 }
206 206
 a.top-menu-dropdown-link {
207 207
 	padding: 8px;
Please login to merge, or discard this patch.
htdocs/debugbar/class/DataCollector/DolLogsCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
 	{
74 74
 		global $conf;
75 75
 
76
-		$uselogfile =  getDolGlobalInt('DEBUGBAR_USE_LOG_FILE');
76
+		$uselogfile = getDolGlobalInt('DEBUGBAR_USE_LOG_FILE');
77 77
 
78 78
 		if ($uselogfile) {
79 79
 			$this->getStorageLogs($this->path);
Please login to merge, or discard this patch.
htdocs/admin/emailcollector_list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -507,7 +507,7 @@
 block discarded – undo
507 507
 	} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
508 508
 		$cssforfield .= ($cssforfield ? ' ' : '').'right';
509 509
 	}
510
-	$cssforfield = preg_replace('/small\s*/', '', $cssforfield);	// the 'small' css must not be used for the title label
510
+	$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
511 511
 	if (!empty($arrayfields['t.'.$key]['checked'])) {
512 512
 		print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n";
513 513
 		$totalarray['nbfield']++;
Please login to merge, or discard this patch.
htdocs/core/actions_fetchobject.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
 if (($id > 0 || (!empty($ref) && !in_array($action, array('create', 'createtask', 'add')))) && (empty($cancel) || $id > 0)) {
32 32
 	if (($id > 0 && is_numeric($id)) || !empty($ref)) {	// To discard case when id is list of ids like '1,2,3...'
33
-		$ret = $object->fetch($id, (empty($ref)? '' : $ref));
33
+		$ret = $object->fetch($id, (empty($ref) ? '' : $ref));
34 34
 		if ($ret > 0) {
35 35
 			$object->fetch_thirdparty();
36 36
 			$id = $object->id;
Please login to merge, or discard this patch.
htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -235,7 +235,7 @@
 block discarded – undo
235 235
 			if (!function_exists('simplexml_load_string')) {
236 236
 				throw new PrestaShopWebserviceException('Method simplexml_load_string not available. Your PHP does not support xml.');
237 237
 			}
238
-			$xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA|LIBXML_NONET);
238
+			$xml = simplexml_load_string($response, 'SimpleXMLElement', LIBXML_NOCDATA | LIBXML_NONET);
239 239
 			if (libxml_get_errors()) {
240 240
 				$msg = var_export(libxml_get_errors(), true);
241 241
 				libxml_clear_errors();
Please login to merge, or discard this patch.
htdocs/accountancy/customer/list.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 $search_date_endday = GETPOST('search_date_endday', 'int');
69 69
 $search_date_endmonth = GETPOST('search_date_endmonth', 'int');
70 70
 $search_date_endyear = GETPOST('search_date_endyear', 'int');
71
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);	// Use tzserver
71
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
72 72
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
73 73
 $search_country = GETPOST('search_country', 'alpha');
74 74
 $search_tvaintra = GETPOST('search_tvaintra', 'alpha');
@@ -258,20 +258,20 @@  discard block
 block discarded – undo
258 258
 $sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
259 259
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc";
260 260
 if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) {
261
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
261
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity);
262 262
 }
263 263
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays ";
264 264
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facturedet as l ON f.rowid = l.fk_facture";
265 265
 $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
266 266
 if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
267
-	$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
267
+	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
268 268
 }
269 269
 $alias_societe_perentity = empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED) ? "s" : "spe";
270 270
 $alias_product_perentity = empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED) ? "p" : "ppe";
271
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa  ON " . $alias_product_perentity . ".accountancy_code_sell = aa.account_number         AND aa.active = 1  AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
272
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON " . $alias_product_perentity . ".accountancy_code_sell_intra = aa2.account_number  AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
273
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON " . $alias_product_perentity . ".accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
274
-$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON " . $alias_societe_perentity . ".accountancy_code_sell = aa4.account_number        AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
271
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa  ON ".$alias_product_perentity.".accountancy_code_sell = aa.account_number         AND aa.active = 1  AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity;
272
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON ".$alias_product_perentity.".accountancy_code_sell_intra = aa2.account_number  AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity;
273
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON ".$alias_product_perentity.".accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity;
274
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa4 ON ".$alias_societe_perentity.".accountancy_code_sell = aa4.account_number        AND aa4.active = 1 AND aa4.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa4.entity = ".$conf->entity;
275 275
 
276 276
 $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0";
277 277
 $sql .= " AND l.product_type <= 2";
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
 	print_barre_liste($langs->trans("InvoiceLines"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num_lines, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit);
461 461
 
462 462
 	if ($massaction == 'set_default_account') {
463
-		$formquestion[]=array('type' => 'other',
463
+		$formquestion[] = array('type' => 'other',
464 464
 			'name' => 'set_default_account',
465 465
 			'label' => $langs->trans("AccountancyCode"),
466 466
 			'value' => $formaccounting->select_account('', 'default_account', 1, array(), 0, 0, 'maxwidth200 maxwidthonsmartphone', 'cachewithshowemptyone'));
@@ -552,14 +552,14 @@  discard block
 block discarded – undo
552 552
 		$thirdpartystatic->client = $objp->client;
553 553
 		$thirdpartystatic->fournisseur = $objp->fournisseur;
554 554
 		$thirdpartystatic->code_client = $objp->code_client;
555
-		$thirdpartystatic->code_compta = $objp->code_compta_client;		// For backward compatibility
555
+		$thirdpartystatic->code_compta = $objp->code_compta_client; // For backward compatibility
556 556
 		$thirdpartystatic->code_compta_client = $objp->code_compta_client;
557 557
 		$thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
558 558
 		$thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
559 559
 		$thirdpartystatic->email = $objp->email;
560 560
 		$thirdpartystatic->country_code = $objp->country_code;
561 561
 		$thirdpartystatic->tva_intra = $objp->tva_intra;
562
-		$thirdpartystatic->code_compta_product = $objp->company_code_sell;		// The accounting account for product stored on thirdparty object (for level3 suggestion)
562
+		$thirdpartystatic->code_compta_product = $objp->company_code_sell; // The accounting account for product stored on thirdparty object (for level3 suggestion)
563 563
 
564 564
 		$product_static->ref = $objp->product_ref;
565 565
 		$product_static->id = $objp->product_id;
@@ -598,16 +598,16 @@  discard block
 block discarded – undo
598 598
 
599 599
 		$suggestedid = 0;
600 600
 
601
-		$return=$accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer');
602
-		if (!is_array($return) && $return<0) {
601
+		$return = $accountingAccount->getAccountingCodeToBind($thirdpartystatic, $mysoc, $product_static, $facture_static, $facture_static_det, $accountingAccountArray, 'customer');
602
+		if (!is_array($return) && $return < 0) {
603 603
 			setEventMessage($accountingAccount->error, 'errors');
604 604
 		} else {
605
-			$suggestedid=$return['suggestedid'];
606
-			$suggestedaccountingaccountfor=$return['suggestedaccountingaccountfor'];
607
-			$suggestedaccountingaccountbydefaultfor=$return['suggestedaccountingaccountbydefaultfor'];
608
-			$code_sell_l=$return['code_l'];
609
-			$code_sell_p=$return['code_p'];
610
-			$code_sell_t=$return['code_t'];
605
+			$suggestedid = $return['suggestedid'];
606
+			$suggestedaccountingaccountfor = $return['suggestedaccountingaccountfor'];
607
+			$suggestedaccountingaccountbydefaultfor = $return['suggestedaccountingaccountbydefaultfor'];
608
+			$code_sell_l = $return['code_l'];
609
+			$code_sell_p = $return['code_p'];
610
+			$code_sell_t = $return['code_t'];
611 611
 		}
612 612
 		//var_dump($return);
613 613
 
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 		if ($product_static->tva_tx !== $facture_static_det->tva_tx && price2num($product_static->tva_tx) && price2num($facture_static_det->tva_tx)) {	// Note: having a vat rate of 0 is often the normal case when sells is intra b2b or to export
665 665
 			$code_vat_differ = 'warning bold';
666 666
 		}
667
-		print '<td class="right'.($code_vat_differ?' '.$code_vat_differ:'').'">';
667
+		print '<td class="right'.($code_vat_differ ? ' '.$code_vat_differ : '').'">';
668 668
 		print vatrate($facture_static_det->tva_tx.($facture_static_det->vat_src_code ? ' ('.$facture_static_det->vat_src_code.')' : ''));
669 669
 		print '</td>';
670 670
 
@@ -738,7 +738,7 @@  discard block
 block discarded – undo
738 738
 		if (!empty($toselect)) {
739 739
 			$ischecked = 0;
740 740
 			if (in_array($objp->rowid."_".$i, $toselect)) {
741
-				$ischecked=1;
741
+				$ischecked = 1;
742 742
 			}
743 743
 		}
744 744
 
Please login to merge, or discard this patch.
htdocs/core/lib/website2.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 		if ($backupold) {
158 158
 			dol_delete_file($filetpl.'.old');
159 159
 			$result = dol_move($filetpl, $filetpl.'.old', 0, 1, 0, 0);
160
-			if (! $result) {
160
+			if (!$result) {
161 161
 				return false;
162 162
 			}
163 163
 		} else {
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 						$indexcontent .= "	require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n";
347 347
 						$indexcontent .= '	redirectToContainer($_GET[\'pageref\'], $_GET[\'pagealiasalt\'], $_GET[\'pageid\']);'."\n";
348 348
 						$indexcontent .= "}\n";
349
-						$indexcontent .= "include_once '".$relpath."/".basename($filetpl)."'\n";	// use .. instead of .
349
+						$indexcontent .= "include_once '".$relpath."/".basename($filetpl)."'\n"; // use .. instead of .
350 350
 						$indexcontent .= '// END PHP ?>'."\n";
351 351
 						$result = file_put_contents($fileindexsub, $indexcontent);
352 352
 						if ($result === false) {
Please login to merge, or discard this patch.