@@ -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(); |
@@ -1349,7 +1349,7 @@ |
||
| 1349 | 1349 | |
| 1350 | 1350 | if (!empty($fields)) { |
| 1351 | 1351 | // Sort extrafields by rank |
| 1352 | - uasort($fields, function ($a, $b) { |
|
| 1352 | + uasort($fields, function($a, $b) { |
|
| 1353 | 1353 | return ($a->rank > $b->rank) ? 1 : -1; |
| 1354 | 1354 | }); |
| 1355 | 1355 | |
@@ -790,8 +790,9 @@ |
||
| 790 | 790 | if (isset($line->fk_product) && $line->fk_product > 0) { |
| 791 | 791 | $tmpproduct = new Product($this->db); |
| 792 | 792 | $tmpproduct->fetch($line->fk_product); |
| 793 | - foreach ($tmpproduct->array_options as $key=>$label) |
|
| 794 | - $resarray["line_product_".$key] = $label; |
|
| 793 | + foreach ($tmpproduct->array_options as $key=>$label) { |
|
| 794 | + $resarray["line_product_".$key] = $label; |
|
| 795 | + } |
|
| 795 | 796 | } |
| 796 | 797 | |
| 797 | 798 | return $resarray; |
@@ -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 |
@@ -1718,7 +1718,7 @@ |
||
| 1718 | 1718 | |
| 1719 | 1719 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
| 1720 | 1720 | |
| 1721 | - $mode = 'target'; |
|
| 1721 | + $mode = 'target'; |
|
| 1722 | 1722 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); |
| 1723 | 1723 | |
| 1724 | 1724 | // Show recipient |
@@ -459,8 +459,12 @@ discard block |
||
| 459 | 459 | |
| 460 | 460 | |
| 461 | 461 | $creator_info = $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs); |
| 462 | - if ($tmpuser->email) $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email; |
|
| 463 | - if ($tmpuser->office_phone) $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone; |
|
| 462 | + if ($tmpuser->email) { |
|
| 463 | + $creator_info .= ', '.$langs->trans("EMail").': '.$tmpuser->email; |
|
| 464 | + } |
|
| 465 | + if ($tmpuser->office_phone) { |
|
| 466 | + $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone; |
|
| 467 | + } |
|
| 464 | 468 | |
| 465 | 469 | $notetoshow = dol_concatdesc($notetoshow, $creator_info); |
| 466 | 470 | } |
@@ -1439,7 +1443,9 @@ discard block |
||
| 1439 | 1443 | global $conf, $langs; |
| 1440 | 1444 | |
| 1441 | 1445 | $ltrdirection = 'L'; |
| 1442 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
| 1446 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
| 1447 | + $ltrdirection = 'R'; |
|
| 1448 | + } |
|
| 1443 | 1449 | |
| 1444 | 1450 | // Load traductions files required by page |
| 1445 | 1451 | $outputlangs->loadLangs(array("main", "propal", "companies", "bills")); |
@@ -1718,7 +1718,7 @@ |
||
| 1718 | 1718 | |
| 1719 | 1719 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
| 1720 | 1720 | |
| 1721 | - $mode = 'target'; |
|
| 1721 | + $mode = 'target'; |
|
| 1722 | 1722 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); |
| 1723 | 1723 | |
| 1724 | 1724 | // Show recipient |
@@ -1718,7 +1718,7 @@ |
||
| 1718 | 1718 | |
| 1719 | 1719 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
| 1720 | 1720 | |
| 1721 | - $mode = 'target'; |
|
| 1721 | + $mode = 'target'; |
|
| 1722 | 1722 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); |
| 1723 | 1723 | |
| 1724 | 1724 | // Show recipient |
@@ -1423,7 +1423,9 @@ |
||
| 1423 | 1423 | global $conf, $langs, $hookmanager; |
| 1424 | 1424 | |
| 1425 | 1425 | $ltrdirection = 'L'; |
| 1426 | - if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R'; |
|
| 1426 | + if ($outputlangs->trans("DIRECTION") == 'rtl') { |
|
| 1427 | + $ltrdirection = 'R'; |
|
| 1428 | + } |
|
| 1427 | 1429 | |
| 1428 | 1430 | // Load traductions files required by page |
| 1429 | 1431 | $outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies")); |
@@ -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"; |
@@ -493,7 +493,7 @@ |
||
| 493 | 493 | $this->subscription = $obj->subscription; |
| 494 | 494 | $this->amount = $obj->amount; |
| 495 | 495 | $this->mail_valid = $obj->mail_valid; |
| 496 | - $this->note = $obj->note_public; // deprecated |
|
| 496 | + $this->note = $obj->note_public; // deprecated |
|
| 497 | 497 | $this->note_public = $obj->note_public; |
| 498 | 498 | $this->vote = $obj->vote; |
| 499 | 499 | |
@@ -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 | |