@@ -4,7 +4,7 @@  | 
                                                    ||
| 4 | 4 | * Simple autoloader, so we don't need Composer just for this.  | 
                                                        
| 5 | 5 | */  | 
                                                        
| 6 | 6 | |
| 7 | -spl_autoload_register(function ($class) { | 
                                                        |
| 7 | +spl_autoload_register(function($class) { | 
                                                        |
| 8 | 8 |  	if (preg_match('/^DebugBar/', $class)) { | 
                                                        
| 9 | 9 |  		$file = DOL_DOCUMENT_ROOT.'/includes/maximebf/debugbar/src/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php'; | 
                                                        
| 10 | 10 | //var_dump($class.' - '.file_exists($file).' - '.$file);  | 
                                                        
@@ -695,7 +695,7 @@  | 
                                                    ||
| 695 | 695 | });  | 
                                                        
| 696 | 696 | });  | 
                                                        
| 697 | 697 | </script>  | 
                                                        
| 698 | -END;  | 
                                                        |
| 698 | +end;  | 
                                                        |
| 699 | 699 |  				} else { | 
                                                        
| 700 | 700 | // Price qty min  | 
                                                        
| 701 | 701 |  					print '<tr><td class="fieldrequired">'.$langs->trans("PriceQtyMin").'</td>'; | 
                                                        
@@ -966,7 +966,7 @@ discard block  | 
                                                    ||
| 966 | 966 | // Show field if not hidden  | 
                                                        
| 967 | 967 |  							if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { | 
                                                        
| 968 | 968 | $extratitle = $langs->trans($value);  | 
                                                        
| 969 | -								$arrayfields['ef.' . $key] = array('label'    => $extratitle, 'checked' => 0, | 
                                                        |
| 969 | +								$arrayfields['ef.'.$key] = array('label'    => $extratitle, 'checked' => 0, | 
                                                        |
| 970 | 970 | 'position' => (end($arrayfields)['position'] + 1),  | 
                                                        
| 971 | 971 | 'langfile' => $extrafields->attributes["product_fournisseur_price"]['langfile'][$key],  | 
                                                        
| 972 | 972 | 'help' => $extrafields->attributes["product_fournisseur_price"]['help'][$key]);  | 
                                                        
@@ -1079,8 +1079,8 @@ discard block  | 
                                                    ||
| 1079 | 1079 |  								} else { | 
                                                        
| 1080 | 1080 | $extratitle = $langs->trans($value);  | 
                                                        
| 1081 | 1081 | }  | 
                                                        
| 1082 | -								if (!empty($arrayfields['ef.' . $key]['checked'])) { | 
                                                        |
| 1083 | - print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.' . $key, '', $param, '', $sortfield, $sortorder, 'right ');  | 
                                                        |
| 1082 | +								if (!empty($arrayfields['ef.'.$key]['checked'])) { | 
                                                        |
| 1083 | + print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.'.$key, '', $param, '', $sortfield, $sortorder, 'right ');  | 
                                                        |
| 1084 | 1084 | $nbfields++;  | 
                                                        
| 1085 | 1085 | }  | 
                                                        
| 1086 | 1086 | }  | 
                                                        
@@ -1089,7 +1089,7 @@ discard block  | 
                                                    ||
| 1089 | 1089 | }  | 
                                                        
| 1090 | 1090 | |
| 1091 | 1091 |  				if (is_object($hookmanager)) { | 
                                                        
| 1092 | -					$parameters = array('id_fourn'=>(!empty($id_fourn)?$id_fourn:''), 'prod_id'=>$object->id, 'nbfields'=>$nbfields); | 
                                                        |
| 1092 | +					$parameters = array('id_fourn'=>(!empty($id_fourn) ? $id_fourn : ''), 'prod_id'=>$object->id, 'nbfields'=>$nbfields); | 
                                                        |
| 1093 | 1093 |  					$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); | 
                                                        
| 1094 | 1094 | }  | 
                                                        
| 1095 | 1095 | print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');  | 
                                                        
@@ -1258,7 +1258,7 @@ discard block  | 
                                                    ||
| 1258 | 1258 | }  | 
                                                        
| 1259 | 1259 | |
| 1260 | 1260 |  						if (is_object($hookmanager)) { | 
                                                        
| 1261 | -							$parameters = array('id_pfp'=>$productfourn->product_fourn_price_id, 'id_fourn'=>(!empty($id_fourn)?$id_fourn:''), 'prod_id'=>$object->id); | 
                                                        |
| 1261 | +							$parameters = array('id_pfp'=>$productfourn->product_fourn_price_id, 'id_fourn'=>(!empty($id_fourn) ? $id_fourn : ''), 'prod_id'=>$object->id); | 
                                                        |
| 1262 | 1262 |  							$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); | 
                                                        
| 1263 | 1263 | }  | 
                                                        
| 1264 | 1264 | |
@@ -18,7 +18,7 @@  | 
                                                    ||
| 18 | 18 | |
| 19 | 19 | // Create the autoloader for Luracast  | 
                                                        
| 20 | 20 | require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';  | 
                                                        
| 21 | -call_user_func(function () { | 
                                                        |
| 21 | +call_user_func(function() { | 
                                                        |
| 22 | 22 | $loader = Luracast\Restler\AutoLoader::instance();  | 
                                                        
| 23 | 23 | spl_autoload_register($loader);  | 
                                                        
| 24 | 24 | return $loader;  | 
                                                        
@@ -152,15 +152,15 @@  | 
                                                    ||
| 152 | 152 | |
| 153 | 153 | // Create a line of payments  | 
                                                        
| 154 | 154 | $payment = new PaymentLoan($db);  | 
                                                        
| 155 | - $payment->chid = $chid;  | 
                                                        |
| 155 | + $payment->chid = $chid;  | 
                                                        |
| 156 | 156 | $payment->datep = $datepaid;  | 
                                                        
| 157 | 157 | $payment->label = $loan->label;  | 
                                                        
| 158 | - $payment->amount_capital = $pay_amount_capital;  | 
                                                        |
| 159 | - $payment->amount_insurance = $pay_amount_insurance;  | 
                                                        |
| 160 | - $payment->amount_interest = $pay_amount_interest;  | 
                                                        |
| 158 | + $payment->amount_capital = $pay_amount_capital;  | 
                                                        |
| 159 | + $payment->amount_insurance = $pay_amount_insurance;  | 
                                                        |
| 160 | + $payment->amount_interest = $pay_amount_interest;  | 
                                                        |
| 161 | 161 |  			$payment->fk_bank           = GETPOST('accountid', 'int'); | 
                                                        
| 162 | 162 |  			$payment->paymenttype       = GETPOST('paymenttype', 'int'); | 
                                                        
| 163 | -			$payment->num_payment		= GETPOST('num_payment'); | 
                                                        |
| 163 | +			$payment->num_payment = GETPOST('num_payment'); | 
                                                        |
| 164 | 164 |  			$payment->note_private      = GETPOST('note_private', 'restricthtml'); | 
                                                        
| 165 | 165 |  			$payment->note_public       = GETPOST('note_public', 'restricthtml'); | 
                                                        
| 166 | 166 | |
@@ -166,11 +166,11 @@  | 
                                                    ||
| 166 | 166 | }  | 
                                                        
| 167 | 167 | |
| 168 | 168 | // Clean parameters  | 
                                                        
| 169 | - $this->url = clean_url($this->url, 1);  | 
                                                        |
| 169 | + $this->url = clean_url($this->url, 1);  | 
                                                        |
| 170 | 170 |  		if (empty($this->label)) { | 
                                                        
| 171 | 171 | $this->label = basename($this->url);  | 
                                                        
| 172 | 172 | }  | 
                                                        
| 173 | - $this->label = trim($this->label);  | 
                                                        |
| 173 | + $this->label = trim($this->label);  | 
                                                        |
| 174 | 174 | |
| 175 | 175 | |
| 176 | 176 | $this->db->begin();  | 
                                                        
@@ -1270,7 +1270,7 @@  | 
                                                    ||
| 1270 | 1270 | |
| 1271 | 1271 | // TODO prendre en compte le filtre  | 
                                                        
| 1272 | 1272 |  		foreach ($pragmas as $var) { | 
                                                        
| 1273 | - $sql = "PRAGMA $var";  | 
                                                        |
| 1273 | + $sql = "pragma $var";  | 
                                                        |
| 1274 | 1274 | $resql = $this->query($sql);  | 
                                                        
| 1275 | 1275 |  			if ($resql) { | 
                                                        
| 1276 | 1276 | $obj = $this->fetch_row($resql);  | 
                                                        
@@ -205,12 +205,12 @@  | 
                                                    ||
| 205 | 205 | |
| 206 | 206 | $numFinal = get_next_value($db, $mask, 'product', $field, $where, '', $now);  | 
                                                        
| 207 | 207 | //Begin barcode with key: for barcode with key (EAN13...) calculate and substitute the last character (* or ?) used in the mask by the key  | 
                                                        
| 208 | -		if ((substr($numFinal, -1)=='*') or (substr($numFinal, -1)=='?')) { // if last mask character is * or ? a joker, probably we have to calculate a key as last character (EAN13...) | 
                                                        |
| 208 | +		if ((substr($numFinal, -1) == '*') or (substr($numFinal, -1) == '?')) { // if last mask character is * or ? a joker, probably we have to calculate a key as last character (EAN13...) | 
                                                        |
| 209 | 209 | $literaltype = '';  | 
                                                        
| 210 | - $literaltype = $this->literalBarcodeType($db, $type);//get literal_Barcode_Type  | 
                                                        |
| 210 | + $literaltype = $this->literalBarcodeType($db, $type); //get literal_Barcode_Type  | 
                                                        |
| 211 | 211 |  			switch ($literaltype) { | 
                                                        
| 212 | 212 | case 'EAN13': //EAN13 rowid = 2  | 
                                                        
| 213 | -					if (strlen($numFinal)==13) {// be sure that the mask length is correct for EAN13 | 
                                                        |
| 213 | +					if (strlen($numFinal) == 13) {// be sure that the mask length is correct for EAN13 | 
                                                        |
| 214 | 214 | $ean = substr($numFinal, 0, 12); //take first 12 digits  | 
                                                        
| 215 | 215 | $eansum = barcode_gen_ean_sum($ean);  | 
                                                        
| 216 | 216 | $ean .= $eansum; //substitute the las character by the key  | 
                                                        
@@ -241,12 +241,12 @@  | 
                                                    ||
| 241 | 241 | }  | 
                                                        
| 242 | 242 | |
| 243 | 243 | /**  | 
                                                        
| 244 | - * Delete a language for this member type  | 
                                                        |
| 245 | - *  | 
                                                        |
| 246 | - * @param string $langtodelete Language code to delete  | 
                                                        |
| 247 | - * @param User $user Object user making delete  | 
                                                        |
| 248 | - * @return int <0 if KO, >0 if OK  | 
                                                        |
| 249 | - */  | 
                                                        |
| 244 | + * Delete a language for this member type  | 
                                                        |
| 245 | + *  | 
                                                        |
| 246 | + * @param string $langtodelete Language code to delete  | 
                                                        |
| 247 | + * @param User $user Object user making delete  | 
                                                        |
| 248 | + * @return int <0 if KO, >0 if OK  | 
                                                        |
| 249 | + */  | 
                                                        |
| 250 | 250 | public function delMultiLangs($langtodelete, $user)  | 
                                                        
| 251 | 251 |  	{ | 
                                                        
| 252 | 252 | $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type_lang";  | 
                                                        
@@ -517,7 +517,7 @@ discard block  | 
                                                    ||
| 517 | 517 | $this->amount = $obj->amount;  | 
                                                        
| 518 | 518 | $this->caneditamount = $obj->caneditamount;  | 
                                                        
| 519 | 519 | $this->mail_valid = $obj->mail_valid;  | 
                                                        
| 520 | - $this->note = $obj->note_public; // deprecated  | 
                                                        |
| 520 | + $this->note = $obj->note_public; // deprecated  | 
                                                        |
| 521 | 521 | $this->note_public = $obj->note_public;  | 
                                                        
| 522 | 522 | $this->vote = $obj->vote;  | 
                                                        
| 523 | 523 | |
@@ -716,7 +716,7 @@ discard block  | 
                                                    ||
| 716 | 716 |  			} elseif ($this->duration_value > 0) { | 
                                                        
| 717 | 717 |  				$dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year")); | 
                                                        
| 718 | 718 | }  | 
                                                        
| 719 | - $datas['duration'] .= " " . (!empty($this->duration_unit) && isset($dur[$this->duration_unit]) ? $langs->trans($dur[$this->duration_unit]) : '');  | 
                                                        |
| 719 | + $datas['duration'] .= " ".(!empty($this->duration_unit) && isset($dur[$this->duration_unit]) ? $langs->trans($dur[$this->duration_unit]) : '');  | 
                                                        |
| 720 | 720 | }  | 
                                                        
| 721 | 721 | |
| 722 | 722 | return $datas;  | 
                                                        
@@ -767,7 +767,7 @@ discard block  | 
                                                    ||
| 767 | 767 | }  | 
                                                        
| 768 | 768 | }  | 
                                                        
| 769 | 769 | $linkstart = '<a href="'.$url.'"';  | 
                                                        
| 770 | - $linkstart .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');  | 
                                                        |
| 770 | + $linkstart .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');  | 
                                                        |
| 771 | 771 | $linkstart .= $dataparams.' class="'.$classfortooltip.'">';  | 
                                                        
| 772 | 772 | |
| 773 | 773 | $linkend = '</a>';  | 
                                                        
@@ -841,13 +841,13 @@ discard block  | 
                                                    ||
| 841 | 841 | global $conf;  | 
                                                        
| 842 | 842 | $dn = '';  | 
                                                        
| 843 | 843 |  		if ($mode == 0) { | 
                                                        
| 844 | -			$dn = getDolGlobalString('LDAP_KEY_MEMBERS_TYPES') . "=".$info[getDolGlobalString('LDAP_KEY_MEMBERS_TYPES')]."," . getDolGlobalString('LDAP_MEMBER_TYPE_DN'); | 
                                                        |
| 844 | +			$dn = getDolGlobalString('LDAP_KEY_MEMBERS_TYPES')."=".$info[getDolGlobalString('LDAP_KEY_MEMBERS_TYPES')].",".getDolGlobalString('LDAP_MEMBER_TYPE_DN'); | 
                                                        |
| 845 | 845 | }  | 
                                                        
| 846 | 846 |  		if ($mode == 1) { | 
                                                        
| 847 | 847 | $dn = $conf->global->LDAP_MEMBER_TYPE_DN;  | 
                                                        
| 848 | 848 | }  | 
                                                        
| 849 | 849 |  		if ($mode == 2) { | 
                                                        
| 850 | -			$dn = getDolGlobalString('LDAP_KEY_MEMBERS_TYPES') . "=".$info[getDolGlobalString('LDAP_KEY_MEMBERS_TYPES')]; | 
                                                        |
| 850 | +			$dn = getDolGlobalString('LDAP_KEY_MEMBERS_TYPES')."=".$info[getDolGlobalString('LDAP_KEY_MEMBERS_TYPES')]; | 
                                                        |
| 851 | 851 | }  | 
                                                        
| 852 | 852 | return $dn;  | 
                                                        
| 853 | 853 | }  | 
                                                        
@@ -263,7 +263,7 @@  | 
                                                    ||
| 263 | 263 | echo '<div>';  | 
                                                        
| 264 | 264 | echo '<table class="noborder centpercent">';  | 
                                                        
| 265 | 265 | echo '<thead>';  | 
                                                        
| 266 | -echo '<tr class="liste_titre"><th>' . $langs->trans('Parameter') . '</th><th>' . $langs->trans('Value') . '</th></tr>'; | 
                                                        |
| 266 | +echo '<tr class="liste_titre"><th>'.$langs->trans('Parameter').'</th><th>'.$langs->trans('Value').'</th></tr>'; | 
                                                        |
| 267 | 267 | echo '</thead>';  | 
                                                        
| 268 | 268 | echo '<tbody>';  | 
                                                        
| 269 | 269 | |