Passed
Branch develop (3f4b05)
by Laurent
95:01
created
htdocs/admin/dolistore/class/dolistore.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -320,12 +320,12 @@
 block discarded – undo
320 320
 			//output template
321 321
 			$html .= '<tr class="app oddeven '.dol_escape_htmltag($compatible).'">';
322 322
 			$html .= '<td class="center" width="210"><div class="newAppParent">';
323
-			$html .= $newapp.$images;	// No dol_escape_htmltag, it is already escape html
323
+			$html .= $newapp.$images; // No dol_escape_htmltag, it is already escape html
324 324
 			$html .= '</div></td>';
325 325
 			$html .= '<td class="margeCote"><h2 class="appTitle">';
326 326
 			$html .= dol_escape_htmltag($product->name->language[$this->lang - 1]);
327 327
 			$html .= '<br><small>';
328
-			$html .= $version;			// No dol_escape_htmltag, it is already escape html
328
+			$html .= $version; // No dol_escape_htmltag, it is already escape html
329 329
 			$html .= '</small></h2>';
330 330
 			$html .= '<small> '.dol_print_date(dol_stringtotime($product->date_upd), 'dayhour').' - '.$langs->trans('Ref').': '.dol_escape_htmltag($product->reference).' - '.dol_escape_htmltag($langs->trans('Id')).': '.((int) $product->id).'</small><br><br>'.dol_escape_htmltag($product->description_short->language[$this->lang - 1]).'</td>';
331 331
 			// do not load if display none
Please login to merge, or discard this patch.
htdocs/hrm/class/skilldet.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
 	/**
103 103
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
104 104
 	 */
105
-	public $fields=array(
105
+	public $fields = array(
106 106
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
107 107
 		'fk_skill' => array('type'=>'integer:Skill:/hrm/class/skill.class.php', 'label'=>'fk_skill', 'enabled'=>'1', 'position'=>5, 'notnull'=>1, 'visible'=>0,),
108 108
 		'rankorder' => array('type'=>'integer', 'label'=>'rank', 'enabled'=>'1', 'position'=>10, 'notnull'=>0, 'visible'=>2,),
Please login to merge, or discard this patch.
htdocs/core/lib/files.lib.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1804,7 +1804,7 @@  discard block
 block discarded – undo
1804 1804
 			if (isset($object->table_element)) {
1805 1805
 				$ecmfile->src_object_type = $object->table_element;
1806 1806
 			} else {
1807
-				dol_syslog('Error: object ' . get_class($object) . ' has no table_element attribute.');
1807
+				dol_syslog('Error: object '.get_class($object).' has no table_element attribute.');
1808 1808
 				return -1;
1809 1809
 			}
1810 1810
 			if (isset($object->src_object_description)) $ecmfile->description = $object->src_object_description;
@@ -2004,9 +2004,9 @@  discard block
 block discarded – undo
2004 2004
 					// Skip directories (they would be added automatically)
2005 2005
 					if (!$file->isDir()) {
2006 2006
 						// Get real and relative path for current file
2007
-						$filePath = $file->getPath();				// the full path with filename using the $inputdir root.
2007
+						$filePath = $file->getPath(); // the full path with filename using the $inputdir root.
2008 2008
 						$fileName = $file->getFilename();
2009
-						$fileFullRealPath = $file->getRealPath();	// the full path with name and transformed to use real path directory.
2009
+						$fileFullRealPath = $file->getRealPath(); // the full path with name and transformed to use real path directory.
2010 2010
 
2011 2011
 						//$relativePath = substr($fileFullRealPath, strlen($rootPath) + 1);
2012 2012
 						$relativePath = substr(($filePath ? $filePath.'/' : '').$fileName, strlen($rootPath) + 1);
@@ -2212,9 +2212,9 @@  discard block
 block discarded – undo
2212 2212
 					// Skip directories (they would be added automatically)
2213 2213
 					if (!$file->isDir()) {
2214 2214
 						// Get real and relative path for current file
2215
-						$filePath = $file->getPath();				// the full path with filename using the $inputdir root.
2215
+						$filePath = $file->getPath(); // the full path with filename using the $inputdir root.
2216 2216
 						$fileName = $file->getFilename();
2217
-						$fileFullRealPath = $file->getRealPath();	// the full path with name and transformed to use real path directory.
2217
+						$fileFullRealPath = $file->getRealPath(); // the full path with name and transformed to use real path directory.
2218 2218
 
2219 2219
 						//$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr($fileFullRealPath, strlen($inputdir) + 1);
2220 2220
 						$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr(($filePath ? $filePath.'/' : '').$fileName, strlen($inputdir) + 1);
Please login to merge, or discard this patch.
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1003,7 +1003,9 @@  discard block
 block discarded – undo
1003 1003
 				$files = dol_dir_list($newpathofdestdir);
1004 1004
 				if (!empty($files) && is_array($files)) {
1005 1005
 					foreach ($files as $key => $file) {
1006
-						if (!file_exists($file["fullname"])) continue;
1006
+						if (!file_exists($file["fullname"])) {
1007
+							continue;
1008
+						}
1007 1009
 						$filepath = $file["path"];
1008 1010
 						$oldname = $file["name"];
1009 1011
 
@@ -1718,7 +1720,9 @@  discard block
 block discarded – undo
1718 1720
 					// Update index table of files (llx_ecm_files)
1719 1721
 					if ($donotupdatesession == 1) {
1720 1722
 						$sharefile = 0;
1721
-						if ($TFile['type'][$i] == 'application/pdf' && strpos($_SERVER["REQUEST_URI"], 'product') !== false && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) $sharefile = 1;
1723
+						if ($TFile['type'][$i] == 'application/pdf' && strpos($_SERVER["REQUEST_URI"], 'product') !== false && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) {
1724
+							$sharefile = 1;
1725
+						}
1722 1726
 						$result = addFileIntoDatabaseIndex($upload_dir, basename($destfile).($resupload == 2 ? '.noexe' : ''), $TFile['name'][$i], 'uploaded', $sharefile, $object);
1723 1727
 						if ($result < 0) {
1724 1728
 							if ($allowoverwrite) {
@@ -1873,8 +1877,12 @@  discard block
 block discarded – undo
1873 1877
 				dol_syslog('Error: object ' . get_class($object) . ' has no table_element attribute.');
1874 1878
 				return -1;
1875 1879
 			}
1876
-			if (isset($object->src_object_description)) $ecmfile->description = $object->src_object_description;
1877
-			if (isset($object->src_object_keywords)) $ecmfile->keywords = $object->src_object_keywords;
1880
+			if (isset($object->src_object_description)) {
1881
+				$ecmfile->description = $object->src_object_description;
1882
+			}
1883
+			if (isset($object->src_object_keywords)) {
1884
+				$ecmfile->keywords = $object->src_object_keywords;
1885
+			}
1878 1886
 		}
1879 1887
 
1880 1888
 		if (!empty($conf->global->MAIN_FORCE_SHARING_ON_ANY_UPLOADED_FILE)) {
Please login to merge, or discard this patch.
htdocs/user/class/user.class.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2264,8 +2264,9 @@
 block discarded – undo
2264 2264
 
2265 2265
 		if (!$changelater) {
2266 2266
 			$url = $urlwithroot.'/';
2267
-			if (!empty($conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD))
2268
-				$url = $conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD;
2267
+			if (!empty($conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD)) {
2268
+							$url = $conf->global->URL_REDIRECTION_AFTER_CHANGEPASSWORD;
2269
+			}
2269 2270
 			$mesg .= $outputlangs->transnoentitiesnoconv("RequestToResetPasswordReceived").".\n";
2270 2271
 			$mesg .= $outputlangs->transnoentitiesnoconv("NewKeyIs")." :\n\n";
2271 2272
 			$mesg .= $outputlangs->transnoentitiesnoconv("Login")." = ".$this->login."\n";
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
 				$this->admin		= $obj->admin;
553 553
 				$this->note_public = $obj->note_public;
554 554
 				$this->note_private = $obj->note_private;
555
-				$this->note			= $obj->note_private;	// deprecated
555
+				$this->note			= $obj->note_private; // deprecated
556 556
 				$this->statut		= $obj->statut;
557 557
 				$this->photo		= $obj->photo;
558 558
 				$this->openid		= $obj->openid;
@@ -660,7 +660,7 @@  discard block
 block discarded – undo
660 660
 			require_once DOL_DOCUMENT_ROOT.'/core/class/defaultvalues.class.php';
661 661
 
662 662
 			$defaultValues = new DefaultValues($this->db);
663
-			$result = $defaultValues->fetchAll('', '', 0, 0, array('t.user_id'=>array(0, $this->id), 'entity'=>array((isset($this->entity) ? $this->entity : $conf->entity), $conf->entity)));	// User 0 (all) + me (if defined)
663
+			$result = $defaultValues->fetchAll('', '', 0, 0, array('t.user_id'=>array(0, $this->id), 'entity'=>array((isset($this->entity) ? $this->entity : $conf->entity), $conf->entity))); // User 0 (all) + me (if defined)
664 664
 
665 665
 			if (!is_array($result) && $result < 0) {
666 666
 				setEventMessages($defaultValues->error, $defaultValues->errors, 'errors');
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 		}
735 735
 
736 736
 		$moduleRightsMapping = array(
737
-			'product' => 'produit',	// We must check $user->rights->produit...
737
+			'product' => 'produit', // We must check $user->rights->produit...
738 738
 			'margin' => 'margins'
739 739
 		);
740 740
 
@@ -900,7 +900,7 @@  discard block
 block discarded – undo
900 900
 			$sql .= " FROM ".$this->db->prefix()."rights_def";
901 901
 			$sql .= " WHERE entity = ".((int) $entity);
902 902
 			if (!empty($whereforadd) && $whereforadd != 'allmodules') {
903
-				$sql .= " AND (".$whereforadd.")";	// Note: parenthesis are important because whereforadd can contains OR. Also note that $whereforadd is already sanitized
903
+				$sql .= " AND (".$whereforadd.")"; // Note: parenthesis are important because whereforadd can contains OR. Also note that $whereforadd is already sanitized
904 904
 			}
905 905
 
906 906
 			$result = $this->db->query($sql);
@@ -1029,7 +1029,7 @@  discard block
 block discarded – undo
1029 1029
 			$sql .= " FROM ".$this->db->prefix()."rights_def";
1030 1030
 			$sql .= " WHERE entity = ".((int) $entity);
1031 1031
 			if (!empty($wherefordel) && $wherefordel != 'allmodules') {
1032
-				$sql .= " AND (".$wherefordel.")";	// Note: parenthesis are important because wherefordel can contains OR. Also note that $wherefordel is already sanitized
1032
+				$sql .= " AND (".$wherefordel.")"; // Note: parenthesis are important because wherefordel can contains OR. Also note that $wherefordel is already sanitized
1033 1033
 			}
1034 1034
 
1035 1035
 			// avoid admin can remove his own important rights
@@ -1206,12 +1206,12 @@  discard block
 block discarded – undo
1206 1206
 				$sql .= " AND r.entity = ".((int) $conf->entity);
1207 1207
 			}
1208 1208
 		} else {
1209
-			$sql .= " AND gr.entity = ".((int) $conf->entity);	// Only groups created in current entity
1209
+			$sql .= " AND gr.entity = ".((int) $conf->entity); // Only groups created in current entity
1210 1210
 			// The entity on the table usergroup_user should be useless and shoumd never be used because it is alreay into gr and r.
1211 1211
 			// but when using MULTICOMPANY_TRANSVERSE_MODE, we may insert record that make rubbish result due to duplicate record of
1212 1212
 			// other entities, so we are forced to add a filter here
1213 1213
 			$sql .= " AND gu.entity IN (0,".$conf->entity.")";
1214
-			$sql .= " AND r.entity = ".((int) $conf->entity);	// Only permission of modules enabled in current entity
1214
+			$sql .= " AND r.entity = ".((int) $conf->entity); // Only permission of modules enabled in current entity
1215 1215
 		}
1216 1216
 		$sql .= " AND gr.fk_usergroup = gu.fk_usergroup";
1217 1217
 		$sql .= " AND gu.fk_user = ".((int) $this->id);
@@ -1729,7 +1729,7 @@  discard block
 block discarded – undo
1729 1729
 		$this->civility_code = $member->civility_id;
1730 1730
 		$this->lastname     = $member->lastname;
1731 1731
 		$this->firstname    = $member->firstname;
1732
-		$this->gender		= $member->gender;
1732
+		$this->gender = $member->gender;
1733 1733
 		$this->email        = $member->email;
1734 1734
 		$this->fk_member    = $member->id;
1735 1735
 		$this->address      = $member->address;
@@ -1867,40 +1867,40 @@  discard block
 block discarded – undo
1867 1867
 		$this->lastname						= trim((string) $this->lastname);
1868 1868
 		$this->firstname					= trim((string) $this->firstname);
1869 1869
 		$this->ref_employee					= trim((string) $this->ref_employee);
1870
-		$this->national_registration_number	= trim((string) $this->national_registration_number);
1870
+		$this->national_registration_number = trim((string) $this->national_registration_number);
1871 1871
 		$this->employee						= ($this->employee > 0 ? $this->employee : 0);
1872 1872
 		$this->login						= trim((string) $this->login);
1873
-		$this->gender						= trim((string) $this->gender);
1873
+		$this->gender = trim((string) $this->gender);
1874 1874
 		$this->pass							= trim((string) $this->pass);
1875 1875
 		$this->api_key						= trim((string) $this->api_key);
1876 1876
 		$this->address						= trim((string) $this->address);
1877
-		$this->zip							= trim((string) $this->zip);
1878
-		$this->town							= trim((string) $this->town);
1877
+		$this->zip = trim((string) $this->zip);
1878
+		$this->town = trim((string) $this->town);
1879 1879
 
1880
-		$this->state_id						= ($this->state_id > 0 ? $this->state_id : 0);
1880
+		$this->state_id = ($this->state_id > 0 ? $this->state_id : 0);
1881 1881
 		$this->country_id					= ($this->country_id > 0 ? $this->country_id : 0);
1882
-		$this->office_phone					= trim((string) $this->office_phone);
1882
+		$this->office_phone = trim((string) $this->office_phone);
1883 1883
 		$this->office_fax					= trim((string) $this->office_fax);
1884
-		$this->user_mobile					= trim((string) $this->user_mobile);
1885
-		$this->personal_mobile				= trim((string) $this->personal_mobile);
1886
-		$this->email						= trim((string) $this->email);
1887
-		$this->personal_email				= trim((string) $this->personal_email);
1888
-
1889
-		$this->job							= trim((string) $this->job);
1890
-		$this->signature					= trim((string) $this->signature);
1891
-		$this->note_public					= trim((string) $this->note_public);
1892
-		$this->note_private					= trim((string) $this->note_private);
1893
-		$this->openid						= trim((string) $this->openid);
1884
+		$this->user_mobile = trim((string) $this->user_mobile);
1885
+		$this->personal_mobile = trim((string) $this->personal_mobile);
1886
+		$this->email = trim((string) $this->email);
1887
+		$this->personal_email = trim((string) $this->personal_email);
1888
+
1889
+		$this->job = trim((string) $this->job);
1890
+		$this->signature = trim((string) $this->signature);
1891
+		$this->note_public = trim((string) $this->note_public);
1892
+		$this->note_private = trim((string) $this->note_private);
1893
+		$this->openid = trim((string) $this->openid);
1894 1894
 		$this->admin						= ($this->admin > 0 ? $this->admin : 0);
1895 1895
 
1896 1896
 		$this->accountancy_code				= trim((string) $this->accountancy_code);
1897 1897
 		$this->color						= trim((string) $this->color);
1898
-		$this->dateemployment				= empty($this->dateemployment) ? '' : $this->dateemployment;
1898
+		$this->dateemployment = empty($this->dateemployment) ? '' : $this->dateemployment;
1899 1899
 		$this->dateemploymentend			= empty($this->dateemploymentend) ? '' : $this->dateemploymentend;
1900 1900
 		$this->datestartvalidity			= empty($this->datestartvalidity) ? '' : $this->datestartvalidity;
1901
-		$this->dateendvalidity				= empty($this->dateendvalidity) ? '' : $this->dateendvalidity;
1902
-		$this->birth						= empty($this->birth) ? '' : $this->birth;
1903
-		$this->fk_warehouse					= (int) $this->fk_warehouse;
1901
+		$this->dateendvalidity = empty($this->dateendvalidity) ? '' : $this->dateendvalidity;
1902
+		$this->birth = empty($this->birth) ? '' : $this->birth;
1903
+		$this->fk_warehouse = (int) $this->fk_warehouse;
1904 1904
 
1905 1905
 		$this->setUpperOrLowerCase();
1906 1906
 
Please login to merge, or discard this patch.
htdocs/product/traduction.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -132,13 +132,13 @@  discard block
 block discarded – undo
132 132
 
133 133
 		foreach ($object->multilangs as $key => $value) { // enregistrement des nouvelles valeurs dans l'objet
134 134
 			if ($key == $current_lang) {
135
-				$object->label = GETPOST("libelle-" . $key);
136
-				$object->description = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml'));
137
-				$object->other = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml'));
135
+				$object->label = GETPOST("libelle-".$key);
136
+				$object->description = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
137
+				$object->other = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
138 138
 			} else {
139
-				$object->multilangs[$key]["label"] = GETPOST("libelle-" . $key);
140
-				$object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-" . $key, 'restricthtml'));
141
-				$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-" . $key, 'restricthtml'));
139
+				$object->multilangs[$key]["label"] = GETPOST("libelle-".$key);
140
+				$object->multilangs[$key]["description"] = dol_htmlcleanlastbr(GETPOST("desc-".$key, 'restricthtml'));
141
+				$object->multilangs[$key]["other"] = dol_htmlcleanlastbr(GETPOST("other-".$key, 'restricthtml'));
142 142
 			}
143 143
 		}
144 144
 
@@ -231,9 +231,9 @@  discard block
 block discarded – undo
231 231
 if (empty($reshook)) {
232 232
 	if ($action == '') {
233 233
 		if ($user->rights->produit->creer || $user->rights->service->creer) {
234
-			print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=add&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Add") . '</a>';
234
+			print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=add&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Add").'</a>';
235 235
 			if ($cnt_trans > 0) {
236
-				print '<a class="butAction" href="' . DOL_URL_ROOT . '/product/traduction.php?action=edit&token='.newToken().'&id=' . $object->id . '">' . $langs->trans("Modify") . '</a>';
236
+				print '<a class="butAction" href="'.DOL_URL_ROOT.'/product/traduction.php?action=edit&token='.newToken().'&id='.$object->id.'">'.$langs->trans("Modify").'</a>';
237 237
 			}
238 238
 		}
239 239
 	}
Please login to merge, or discard this patch.
htdocs/compta/tva/card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 			}
263 263
 		}
264 264
 		if (empty($error)) {
265
-			header("Location: card.php?id=" . $object->id);
265
+			header("Location: card.php?id=".$object->id);
266 266
 			exit;
267 267
 		}
268 268
 	}
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 	} else {
318 318
 		$result = $object->fetch($id);
319 319
 
320
-		$object->amount	= $amount;
320
+		$object->amount = $amount;
321 321
 
322 322
 		$result = $object->update($user);
323 323
 		if ($result <= 0) {
@@ -480,7 +480,7 @@  discard block
 block discarded – undo
480 480
 
481 481
 	// Auto create payment
482 482
 	print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>';
483
-	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_payment) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n";
483
+	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.(empty($auto_create_payment) ? '' : 'checked="checked"').' value="1"></td></tr>'."\n";
484 484
 
485 485
 	print '<tr class="hide_if_no_auto_create_payment">';
486 486
 	print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
@@ -604,9 +604,9 @@  discard block
 block discarded – undo
604 604
 	print '</td></tr>';
605 605
 
606 606
 	if ($action == 'edit') {
607
-		print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>';
607
+		print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>';
608 608
 	} else {
609
-		print '<tr><td>' . $langs->trans("Amount") . '</td><td>' . price($object->amount) . '</td></tr>';
609
+		print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>';
610 610
 	}
611 611
 
612 612
 	// Mode of payment
Please login to merge, or discard this patch.
htdocs/hrm/lib/hrm_skillrank.lib.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,9 @@
 block discarded – undo
118 118
 	if (!is_array($Lines) && $Lines<0) {
119 119
 		setEventMessages($skilldet->error, $skilldet->errors, 'errors');
120 120
 	}
121
-	if (empty($Lines)) return $langs->trans('SkillHasNoLines');
121
+	if (empty($Lines)) {
122
+		return $langs->trans('SkillHasNoLines');
123
+	}
122 124
 
123 125
 	$ret = '<!-- field jquery --><span title="'.$langs->trans('NA').'" class="radio_js_bloc_number '.$inputname.'_'.$fk_skill.(empty($selected_rank) ? ' selected' : '').'">0</span>';
124 126
 	if (is_array($Lines) && !empty($Lines)) {
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
 {
109 109
 	global $db, $conf, $langs;
110 110
 
111
-	require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php';
112
-	require_once DOL_DOCUMENT_ROOT . '/hrm/class/skilldet.class.php';
111
+	require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php';
112
+	require_once DOL_DOCUMENT_ROOT.'/hrm/class/skilldet.class.php';
113 113
 
114 114
 	// On charge les différentes notes possibles pour la compétence $fk_skill
115 115
 	$skilldet = new Skilldet($db);
116 116
 	$Lines = $skilldet->fetchAll('ASC', 'rankorder', 0, 0, array('customsql'=>'fk_skill = '.$fk_skill));
117 117
 
118
-	if (!is_array($Lines) && $Lines<0) {
118
+	if (!is_array($Lines) && $Lines < 0) {
119 119
 		setEventMessages($skilldet->error, $skilldet->errors, 'errors');
120 120
 	}
121 121
 	if (empty($Lines)) return $langs->trans('SkillHasNoLines');
@@ -128,29 +128,29 @@  discard block
 block discarded – undo
128 128
 				continue;
129 129
 			}
130 130
 
131
-			$ret .= '<span title="' . $line->description . '" class="radio_js_bloc_number ' . $inputname . '_' . $line->fk_skill;
131
+			$ret .= '<span title="'.$line->description.'" class="radio_js_bloc_number '.$inputname.'_'.$line->fk_skill;
132 132
 			$ret .= $line->rankorder == $selected_rank ? ' selected' : '';
133
-			$ret .= '">' . $line->rankorder . '</span>';
133
+			$ret .= '">'.$line->rankorder.'</span>';
134 134
 		}
135 135
 
136 136
 		if ($mode == 'edit') {
137 137
 			$ret .= '
138
-		<input type="hidden" id="' . $inputname . '_' . $fk_skill . '" name="' . $inputname . '[' . $fk_skill . ']" value="' . $selected_rank . '">
138
+		<input type="hidden" id="' . $inputname.'_'.$fk_skill.'" name="'.$inputname.'['.$fk_skill.']" value="'.$selected_rank.'">
139 139
 		<script type="text/javascript">
140 140
 			$(document).ready(function(){
141 141
 				$(".radio_js_bloc_number").tooltip();
142 142
 				var error,same;
143
-				$(".' . $inputname . '_' . $fk_skill . '").on("click",function(){
143
+				$(".' . $inputname.'_'.$fk_skill.'").on("click",function(){
144 144
 					same=false;
145 145
 					val = $(this).html();
146 146
 					if($(this).hasClass("selected"))same=true;
147
-					$(".' . $inputname . '_' . $fk_skill . '").removeClass("selected");
147
+					$(".' . $inputname.'_'.$fk_skill.'").removeClass("selected");
148 148
 					if(same)
149 149
 					{
150
-						$("#' . $inputname . '_' . $fk_skill . '").val("");
150
+						$("#' . $inputname.'_'.$fk_skill.'").val("");
151 151
 					}else {
152 152
 						$(this).addClass("selected");
153
-						$("#' . $inputname . '_' . $fk_skill . '").val(val);
153
+						$("#' . $inputname.'_'.$fk_skill.'").val(val);
154 154
 					}
155 155
 				});
156 156
 
Please login to merge, or discard this patch.
htdocs/product/inventory/ajax/searchfrombarcode.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 	$result = $db->query($sql);
79 79
 	if ($result) {
80 80
 		$nbline = $db->num_rows($result);
81
-		for ($i=0; $i < $nbline; $i++) {
81
+		for ($i = 0; $i < $nbline; $i++) {
82 82
 			$object = $db->fetch_object($result);
83 83
 			if (($mode == "barcode" && $barcode == $object->barcode) || ($mode == "lotserial" && $barcode == $object->batch)) {
84 84
 				$warehouse->fetch(0, $product["Warehouse"]);
@@ -88,22 +88,22 @@  discard block
 block discarded – undo
88 88
 					$fk_product = $object->fk_product;
89 89
 					$reelqty = $object->reel;
90 90
 
91
-					$objectreturn = array('fk_warehouse'=>$warehouseid,'fk_product'=>$fk_product,'reelqty'=>$reelqty);
91
+					$objectreturn = array('fk_warehouse'=>$warehouseid, 'fk_product'=>$fk_product, 'reelqty'=>$reelqty);
92 92
 				}
93 93
 			}
94 94
 		}
95 95
 		if ($warehousefound < 1) {
96
-			$response = array('status'=>'error','errorcode'=>'NotFound','message'=>'No warehouse found for barcode'.$barcode);
96
+			$response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>'No warehouse found for barcode'.$barcode);
97 97
 		} elseif ($warehousefound > 1) {
98
-			$response = array('status'=>'error','errorcode'=>'TooManyWarehouse','message'=>'Too many warehouse found');
98
+			$response = array('status'=>'error', 'errorcode'=>'TooManyWarehouse', 'message'=>'Too many warehouse found');
99 99
 		} else {
100
-			$response = array('status'=>'success','message'=>'Warehouse found','object'=>$objectreturn);
100
+			$response = array('status'=>'success', 'message'=>'Warehouse found', 'object'=>$objectreturn);
101 101
 		}
102 102
 	} else {
103
-		$response = array('status'=>'error','errorcode'=>'NotFound','message'=>"No results found for barcode");
103
+		$response = array('status'=>'error', 'errorcode'=>'NotFound', 'message'=>"No results found for barcode");
104 104
 	}
105 105
 } else {
106
-	$response = array('status'=>'error','errorcode'=>'ActionError','message'=>"Error on action");
106
+	$response = array('status'=>'error', 'errorcode'=>'ActionError', 'message'=>"Error on action");
107 107
 }
108 108
 
109 109
 if ($action == "addnewlineproduct") {
@@ -122,12 +122,12 @@  discard block
 block discarded – undo
122 122
 
123 123
 		$result = $inventoryline->create($user);
124 124
 		if ($result > 0) {
125
-			$response = array('status'=>'success','message'=>'Success on creating line','id_line'=>$result);
125
+			$response = array('status'=>'success', 'message'=>'Success on creating line', 'id_line'=>$result);
126 126
 		} else {
127
-			$response = array('status'=>'error','errorcode'=>'ErrorCreation','message'=>"Error on line creation");
127
+			$response = array('status'=>'error', 'errorcode'=>'ErrorCreation', 'message'=>"Error on line creation");
128 128
 		}
129 129
 	} else {
130
-		$response = array('status'=>'error','errorcode'=>'NoIdForInventory','message'=>"No id for inventory");
130
+		$response = array('status'=>'error', 'errorcode'=>'NoIdForInventory', 'message'=>"No id for inventory");
131 131
 	}
132 132
 }
133 133
 
Please login to merge, or discard this patch.
htdocs/takepos/split.php 2 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,10 @@
 block discarded – undo
84 84
 		$db->query($sql);
85 85
 	} elseif ($split==0) { // Unsplit line
86 86
 		$invoice = new Facture($db);
87
-		if ($place=="SPLIT") $place="0"; // Avoid move line to the same place (from SPLIT to SPLIT place)
87
+		if ($place=="SPLIT") {
88
+			$place="0";
89
+		}
90
+		// Avoid move line to the same place (from SPLIT to SPLIT place)
88 91
 		$ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')');
89 92
 		if ($ret > 0) {
90 93
 			$placeid = $invoice->id;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
  * Actions
57 57
  */
58 58
 
59
-if ($action=="split") {
59
+if ($action == "split") {
60 60
 	$line = GETPOST('line', 'int');
61 61
 	$split = GETPOST('split', 'int');
62
-	if ($split==1) { // Split line
62
+	if ($split == 1) { // Split line
63 63
 		$invoice = new Facture($db);
64 64
 		$ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-SPLIT)');
65 65
 		if ($ret > 0) {
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
 		}
86 86
 		$sql = "UPDATE ".MAIN_DB_PREFIX."facturedet set fk_facture=".$placeid." where rowid=".$line;
87 87
 		$db->query($sql);
88
-	} elseif ($split==0) { // Unsplit line
88
+	} elseif ($split == 0) { // Unsplit line
89 89
 		$invoice = new Facture($db);
90
-		if ($place=="SPLIT") $place="0"; // Avoid move line to the same place (from SPLIT to SPLIT place)
90
+		if ($place == "SPLIT") $place = "0"; // Avoid move line to the same place (from SPLIT to SPLIT place)
91 91
 		$ret = $invoice->fetch('', '(PROV-POS'.$_SESSION["takeposterminal"].'-'.$place.')');
92 92
 		if ($ret > 0) {
93 93
 			$placeid = $invoice->id;
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 <script>
165 165
 function Split(selectedline, split) {
166 166
 	$.ajax({
167
-		url: "split.php?action=split&token=<?php echo newToken(); ?>&line="+selectedline+"&split="+split+"&place=<?php echo $place;?>",
167
+		url: "split.php?action=split&token=<?php echo newToken(); ?>&line="+selectedline+"&split="+split+"&place=<?php echo $place; ?>",
168 168
 		context: document.body
169 169
 	}).done(function() {
170 170
 		$("#currentplace").load("invoice.php?place="+parent.place+"&invoiceid="+parent.invoiceid, function() {
@@ -201,8 +201,8 @@  discard block
 block discarded – undo
201 201
 
202 202
 
203 203
 
204
-	$("#headersplit1").html("<?php echo $langs->trans("Place");?> "+parent.place);
205
-	$("#headersplit2").html("<?php echo $langs->trans("SplitSale");?>");
204
+	$("#headersplit1").html("<?php echo $langs->trans("Place"); ?> "+parent.place);
205
+	$("#headersplit2").html("<?php echo $langs->trans("SplitSale"); ?>");
206 206
 
207 207
 });
208 208
 </script>
Please login to merge, or discard this patch.