@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | //print 'We have made a '.$class.'->'.$method.' to get id from code '.$newval.'. '; |
477 | 477 | if ($classinstance->id != '') { // id may be 0, it is a found value |
478 | 478 | $newval = $classinstance->id; |
479 | - } elseif (! $error) { |
|
479 | + } elseif (!$error) { |
|
480 | 480 | if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) { |
481 | 481 | $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', num2Alpha($key - 1), $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict'])); |
482 | 482 | } elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) { |
@@ -649,7 +649,7 @@ discard block |
||
649 | 649 | $classinstance = new $class($this->db); |
650 | 650 | $res = call_user_func_array(array($classinstance, $method), array(&$arrayrecord, $arrayfield, ($key - 1))); |
651 | 651 | if (empty($classinstance->error) && empty($classinstance->errors)) { |
652 | - $newval = $res; // We get new value computed. |
|
652 | + $newval = $res; // We get new value computed. |
|
653 | 653 | } else { |
654 | 654 | $this->errors[$error]['type'] = 'CLASSERROR'; |
655 | 655 | $this->errors[$error]['lib'] = implode( |
@@ -747,12 +747,12 @@ discard block |
||
747 | 747 | if (isModEnabled("socialnetworks") && strpos($fieldname, "socialnetworks") !== false) { |
748 | 748 | if (!in_array("socialnetworks", $listfields)) { |
749 | 749 | $listfields[] = "socialnetworks"; |
750 | - $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array |
|
750 | + $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array |
|
751 | 751 | $listvalues[$socialkey] = ''; |
752 | 752 | } |
753 | 753 | //var_dump($newval); var_dump($arrayrecord[($key - 1)]['type']); |
754 | 754 | if (!empty($newval) && $arrayrecord[($key - 1)]['type'] > 0) { |
755 | - $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array |
|
755 | + $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array |
|
756 | 756 | //var_dump('sk='.$socialkey); // socialkey=19 |
757 | 757 | $socialnetwork = explode("_", $fieldname)[1]; |
758 | 758 | if (empty($listvalues[$socialkey]) || $listvalues[$socialkey] == "null") { |
@@ -875,7 +875,7 @@ discard block |
||
875 | 875 | if (empty($lastinsertid)) { // No insert done yet for a parent table |
876 | 876 | $sqlSelect = "SELECT " . $fname . " FROM " . $tablename; |
877 | 877 | $data = array_combine($listfields, $listvalues); |
878 | - $where = array(); // filters to forge SQL request |
|
878 | + $where = array(); // filters to forge SQL request |
|
879 | 879 | $filters = array(); // filters to forge output error message |
880 | 880 | foreach ($updatekeys as $key) { |
881 | 881 | $col = $objimport->array_import_updatekeys[0][$key]; |
@@ -965,7 +965,7 @@ discard block |
||
965 | 965 | // We db escape social network field because he isn't in field creation |
966 | 966 | if (in_array("socialnetworks", $listfields)) { |
967 | 967 | $socialkey = array_search("socialnetworks", $listfields); |
968 | - $tmpsql = $listvalues[$socialkey]; |
|
968 | + $tmpsql = $listvalues[$socialkey]; |
|
969 | 969 | $listvalues[$socialkey] = "'" . $this->db->escape($tmpsql) . "'"; |
970 | 970 | } |
971 | 971 | |
@@ -975,7 +975,7 @@ discard block |
||
975 | 975 | $data = array_combine($listfields, $listvalues); |
976 | 976 | $set = array(); |
977 | 977 | foreach ($data as $key => $val) { |
978 | - $set[] = $key . " = " . $val; // $val was escaped/sanitized previously |
|
978 | + $set[] = $key . " = " . $val; // $val was escaped/sanitized previously |
|
979 | 979 | } |
980 | 980 | $sqlstart .= " SET " . implode(', ', $set) . ", import_key = '" . $this->db->escape($importid) . "'"; |
981 | 981 | |
@@ -1014,7 +1014,7 @@ discard block |
||
1014 | 1014 | // We db escape social network field because he isn't in field creation |
1015 | 1015 | if (in_array("socialnetworks", $listfields)) { |
1016 | 1016 | $socialkey = array_search("socialnetworks", $listfields); |
1017 | - $tmpsql = $listvalues[$socialkey]; |
|
1017 | + $tmpsql = $listvalues[$socialkey]; |
|
1018 | 1018 | $listvalues[$socialkey] = "'" . $this->db->escape($tmpsql) . "'"; |
1019 | 1019 | } |
1020 | 1020 |
@@ -170,7 +170,7 @@ |
||
170 | 170 | $maxfilesizearray = getMaxFileSizeArray(); |
171 | 171 | $maxmin = $maxfilesizearray['maxmin']; |
172 | 172 | if ($maxmin > 0) { |
173 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
173 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
174 | 174 | } |
175 | 175 | $texte .= ' <input type="file" name="uploadfile">'; |
176 | 176 | $texte .= '<input type="hidden" value="BOM_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -177,7 +177,7 @@ |
||
177 | 177 | $maxfilesizearray = getMaxFileSizeArray(); |
178 | 178 | $maxmin = $maxfilesizearray['maxmin']; |
179 | 179 | if ($maxmin > 0) { |
180 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
180 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
181 | 181 | } |
182 | 182 | $texte .= ' <input type="file" name="uploadfile">'; |
183 | 183 | $texte .= '<input type="hidden" value="COMMANDE_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -1682,7 +1682,7 @@ |
||
1682 | 1682 | |
1683 | 1683 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
1684 | 1684 | |
1685 | - $mode = 'target'; |
|
1685 | + $mode = 'target'; |
|
1686 | 1686 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); |
1687 | 1687 | |
1688 | 1688 | // Show recipient |
@@ -1656,7 +1656,7 @@ |
||
1656 | 1656 | $carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs); |
1657 | 1657 | } |
1658 | 1658 | |
1659 | - $mode = 'target'; |
|
1659 | + $mode = 'target'; |
|
1660 | 1660 | $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object); |
1661 | 1661 | |
1662 | 1662 | // Show recipient |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled |
76 | 76 | $this->requiredby = array(); // List of module ids to disable if this one is disabled |
77 | 77 | $this->conflictwith = array(); // List of module class names as string this module is in conflict with |
78 | - $this->langfiles = array("companies","project"); |
|
78 | + $this->langfiles = array("companies", "project"); |
|
79 | 79 | $this->phpmin = array(7, 0); // Minimum version of PHP required by module |
80 | 80 | $this->enabled_bydefault = true; // Will be enabled during install |
81 | 81 | |
@@ -437,7 +437,7 @@ discard block |
||
437 | 437 | $this->export_code[$r] = $this->rights_class . '_' . $r; |
438 | 438 | $this->export_label[$r] = "ExportDataset_event1"; |
439 | 439 | $this->export_permission[$r] = array(array("agenda", "export")); |
440 | - $this->export_fields_array[$r] = array('ac.id' => "IdAgenda", 'ac.ref_ext' => "ExternalRef",'ac.ref' => "Ref", 'ac.datec' => "DateCreation", 'ac.datep' => "DateActionBegin", |
|
440 | + $this->export_fields_array[$r] = array('ac.id' => "IdAgenda", 'ac.ref_ext' => "ExternalRef", 'ac.ref' => "Ref", 'ac.datec' => "DateCreation", 'ac.datep' => "DateActionBegin", |
|
441 | 441 | 'ac.datep2' => "DateActionEnd", 'ac.location' => 'Location', 'ac.label' => "Title", 'ac.note' => "Note", 'ac.percent' => "Percentage", 'ac.durationp' => "Duration", |
442 | 442 | 'ac.fk_user_author' => 'CreatedById', 'ac.fk_user_action' => 'ActionsOwnedBy', 'ac.fk_user_mod' => 'ModifiedBy', 'ac.transparency' => "Transparency", 'ac.priority' => "Priority", 'ac.fk_element' => "ElementID", 'ac.elementtype' => "ElementType", |
443 | 443 | 'cac.libelle' => "ActionType", 'cac.code' => "Code", |
@@ -455,7 +455,7 @@ discard block |
||
455 | 455 | } |
456 | 456 | $this->export_TypeFields_array[$r] = array('ac.ref_ext' => "Text", 'ac.ref' => "Text", 'ac.datec' => "Date", 'ac.datep' => "Date", |
457 | 457 | 'ac.datep2' => "Date", 'ac.location' => 'Text', 'ac.label' => "Text", 'ac.note' => "Text", 'ac.percent' => "Numeric", |
458 | - 'ac.durationp' => "Duree",'ac.fk_user_author' => 'Numeric', 'ac.fk_user_action' => 'Numeric', 'ac.fk_user_mod' => 'Numeric', 'ac.transparency' => "Numeric", 'ac.priority' => "Numeric", 'ac.fk_element' => "Numeric", 'ac.elementtype' => "Text", |
|
458 | + 'ac.durationp' => "Duree", 'ac.fk_user_author' => 'Numeric', 'ac.fk_user_action' => 'Numeric', 'ac.fk_user_mod' => 'Numeric', 'ac.transparency' => "Numeric", 'ac.priority' => "Numeric", 'ac.fk_element' => "Numeric", 'ac.elementtype' => "Text", |
|
459 | 459 | 'cac.libelle' => "List:c_actioncomm:libelle:libelle", 'cac.code' => "Text", |
460 | 460 | 's.nom' => 'Text', 's.address' => 'Text', 's.zip' => 'Text', 's.town' => 'Text', |
461 | 461 | 'co.code' => 'Text', 's.phone' => 'Text', 's.siren' => 'Text', 's.siret' => 'Text', 's.ape' => 'Text', 's.idprof4' => 'Text', 's.idprof5' => 'Text', 's.idprof6' => 'Text', |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | |
465 | 465 | ); |
466 | 466 | $this->export_entities_array[$r] = array('ac.id' => "action", 'ac.ref_ext' => "action", 'ac.ref' => "action", 'ac.datec' => "action", 'ac.datep' => "action", |
467 | - 'ac.datep2' => "action", 'ac.location' => 'action', 'ac.label' => "action", 'ac.note' => "action", 'ac.percent' => "action", 'ac.durationp' => "action",'ac.fk_user_author' => 'user', 'ac.fk_user_action' => 'user', 'ac.fk_user_mod' => 'user', 'ac.transparency' => "action", 'ac.priority' => "action", 'ac.fk_element' => "action", 'ac.elementtype' => "action", |
|
467 | + 'ac.datep2' => "action", 'ac.location' => 'action', 'ac.label' => "action", 'ac.note' => "action", 'ac.percent' => "action", 'ac.durationp' => "action", 'ac.fk_user_author' => 'user', 'ac.fk_user_action' => 'user', 'ac.fk_user_mod' => 'user', 'ac.transparency' => "action", 'ac.priority' => "action", 'ac.fk_element' => "action", 'ac.elementtype' => "action", |
|
468 | 468 | 's.rowid' => "company", 's.nom' => 'company', 's.address' => 'company', 's.zip' => 'company', 's.town' => 'company', |
469 | 469 | 'co.code' => 'company', 's.phone' => 'company', 's.siren' => 'company', 's.siret' => 'company', 's.ape' => 'company', 's.idprof4' => 'company', 's.idprof5' => 'company', 's.idprof6' => 'company', |
470 | 470 | 's.code_compta' => 'company', 's.code_compta_fournisseur' => 'company', 's.tva_intra' => 'company', |
@@ -95,7 +95,7 @@ |
||
95 | 95 | $this->db = $db; |
96 | 96 | $this->name = "standard"; |
97 | 97 | $this->description = $langs->trans('DocumentModelStandardPDF'); |
98 | - $this->update_main_doc_field = 0; // Save the name of generated file as the main doc when generating a doc with this template |
|
98 | + $this->update_main_doc_field = 0; // Save the name of generated file as the main doc when generating a doc with this template |
|
99 | 99 | |
100 | 100 | // Page size for A4 format |
101 | 101 | $this->type = 'pdf'; |
@@ -63,7 +63,7 @@ |
||
63 | 63 | */ |
64 | 64 | public function writeBarCode($code, $encoding, $readable = 'Y', $scale = 1, $nooutputiferror = 0) |
65 | 65 | { |
66 | - return -1; // Error by default, this method must be implemented by the driver |
|
66 | + return -1; // Error by default, this method must be implemented by the driver |
|
67 | 67 | } |
68 | 68 | } |
69 | 69 |
@@ -206,7 +206,7 @@ |
||
206 | 206 | //Begin barcode with key: for barcode with key (EAN13...) calculate and substitute the last character (* or ?) used in the mask by the key |
207 | 207 | 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 | 208 | $literaltype = ''; |
209 | - $literaltype = $this->literalBarcodeType($db, $type);//get literal_Barcode_Type |
|
209 | + $literaltype = $this->literalBarcodeType($db, $type); //get literal_Barcode_Type |
|
210 | 210 | switch ($literaltype) { |
211 | 211 | case 'EAN13': //EAN13 rowid = 2 |
212 | 212 | if (strlen($numFinal) == 13) {// be sure that the mask length is correct for EAN13 |