@@ -426,7 +426,7 @@ |
||
| 426 | 426 | print '<table class="border centpercent tableforfield">' . "\n"; |
| 427 | 427 | |
| 428 | 428 | // Common attributes |
| 429 | - $keyforbreak = 'fk_c_ticket_category'; // We change column just before this field |
|
| 429 | + $keyforbreak = 'fk_c_ticket_category'; // We change column just before this field |
|
| 430 | 430 | //unset($object->fields['fk_project']); // Hide field already shown in banner |
| 431 | 431 | //unset($object->fields['fk_soc']); // Hide field already shown in banner |
| 432 | 432 | $object->fields['answer']['enabled'] = 0; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | require_once constant('DOL_DOCUMENT_ROOT') . '/hrm/lib/hrm_skillrank.lib.php'; |
| 46 | 46 | |
| 47 | 47 | // Load translation files required by the page |
| 48 | -$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 48 | +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 49 | 49 | |
| 50 | 50 | // Get parameters |
| 51 | 51 | $id = GETPOSTINT('id'); |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | if ($action == 'close') { |
| 176 | 176 | // save evaldet lines to user; |
| 177 | 177 | $sk = new SkillRank($db); |
| 178 | - $SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, "(fk_object:=:" . ((int)$object->fk_user) . ") AND (objecttype:=:'" . $db->escape(SkillRank::SKILLRANK_TYPE_USER) . "')", 'AND'); |
|
| 178 | + $SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, "(fk_object:=:" . ((int) $object->fk_user) . ") AND (objecttype:=:'" . $db->escape(SkillRank::SKILLRANK_TYPE_USER) . "')", 'AND'); |
|
| 179 | 179 | |
| 180 | 180 | $errors = 0; |
| 181 | 181 | // we go through the evaldets of the eval |
@@ -550,7 +550,7 @@ discard block |
||
| 550 | 550 | $sql .= ' INNER JOIN ' . MAIN_DB_PREFIX . 'hrm_skilldet as skdet_user ON (skdet_user.fk_skill = sk.rowid AND skdet_user.rankorder = ed.rankorder)'; |
| 551 | 551 | //$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "hrm_skillrank as skr ON (j.rowid = skr.fk_object AND skr.fk_skill = ed.fk_skill AND skr.objecttype = 'job')"; |
| 552 | 552 | $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'hrm_skilldet as skdet_required ON (skdet_required.fk_skill = sk.rowid AND skdet_required.rankorder = ed.required_rank)'; |
| 553 | - $sql .= " WHERE e.rowid =" . ((int)$object->id); |
|
| 553 | + $sql .= " WHERE e.rowid =" . ((int) $object->id); |
|
| 554 | 554 | |
| 555 | 555 | // echo $sql; |
| 556 | 556 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | require_once constant('DOL_DOCUMENT_ROOT') . '/hrm/lib/hrm_job.lib.php'; |
| 42 | 42 | |
| 43 | 43 | // Load translation files required by the page |
| 44 | -$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 44 | +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 45 | 45 | |
| 46 | 46 | // Get parameters |
| 47 | 47 | $id = GETPOSTINT('id'); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | require_once constant('DOL_DOCUMENT_ROOT') . '/hrm/lib/hrm_skill.lib.php'; |
| 42 | 42 | |
| 43 | 43 | // Load translation files required by the page |
| 44 | -$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 44 | +$langs->loadLangs(array('hrm', 'other', 'products')); // why products? |
|
| 45 | 45 | |
| 46 | 46 | // Get parameters |
| 47 | 47 | $id = GETPOSTINT('id'); |
@@ -529,7 +529,7 @@ discard block |
||
| 529 | 529 | |
| 530 | 530 | // Default sort order (if not yet defined by previous GETPOST) |
| 531 | 531 | if (!$sortfield) { |
| 532 | - reset($objectline->fields); // Reset is required to avoid key() to return null. |
|
| 532 | + reset($objectline->fields); // Reset is required to avoid key() to return null. |
|
| 533 | 533 | $sortfield = "t." . key($objectline->fields); // Set here default search field. By default 1st field in definition. |
| 534 | 534 | } |
| 535 | 535 | if (!$sortorder) { |
@@ -562,11 +562,11 @@ discard block |
||
| 562 | 562 | foreach ($objectline->fields as $key => $val) { |
| 563 | 563 | // If $val['visible']==0, then we never show the field |
| 564 | 564 | if (!empty($val['visible'])) { |
| 565 | - $visible = (int)dol_eval($val['visible'], 1, 1, '1'); |
|
| 565 | + $visible = (int) dol_eval($val['visible'], 1, 1, '1'); |
|
| 566 | 566 | $arrayfields['t.' . $key] = array( |
| 567 | 567 | 'label' => $val['label'], |
| 568 | 568 | 'checked' => (($visible < 0) ? 0 : 1), |
| 569 | - 'enabled' => (abs($visible) != 3 && (int)dol_eval($val['enabled'], 1, 1, '1')), |
|
| 569 | + 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')), |
|
| 570 | 570 | 'position' => $val['position'], |
| 571 | 571 | 'help' => isset($val['help']) ? $val['help'] : '' |
| 572 | 572 | ); |
@@ -601,7 +601,7 @@ discard block |
||
| 601 | 601 | } else { |
| 602 | 602 | $sql .= " WHERE 1 = 1 "; |
| 603 | 603 | } |
| 604 | - $sql .= " AND fk_skill = " . ((int)$id); |
|
| 604 | + $sql .= " AND fk_skill = " . ((int) $id); |
|
| 605 | 605 | |
| 606 | 606 | $resql = $db->query($sql); |
| 607 | 607 | $nbtotalofrecords = $db->num_rows($resql); |
@@ -99,8 +99,8 @@ |
||
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | // List of targets fields |
| 102 | -$headerlinefields = array(); // Array of fields (label to show) |
|
| 103 | -$contentlinevalues = array(); // Array of example values |
|
| 102 | +$headerlinefields = array(); // Array of fields (label to show) |
|
| 103 | +$contentlinevalues = array(); // Array of example values |
|
| 104 | 104 | $i = 0; |
| 105 | 105 | foreach ($fieldstarget as $code => $label) { |
| 106 | 106 | $withoutstar = preg_replace('/\*/', '', $fieldstarget[$code]); |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | $endatlinenb = (GETPOST('endatlinenb') ? GETPOST('endatlinenb') : ''); |
| 149 | 149 | $updatekeys = (GETPOST('updatekeys', 'array') ? GETPOST('updatekeys', 'array') : array()); |
| 150 | 150 | $separator = (GETPOST('separator', 'nohtml') ? GETPOST('separator', 'nohtml', 3) : ''); |
| 151 | -$enclosure = (GETPOST('enclosure', 'nohtml') ? GETPOST('enclosure', 'nohtml') : '"'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
| 151 | +$enclosure = (GETPOST('enclosure', 'nohtml') ? GETPOST('enclosure', 'nohtml') : '"'); // We must use 'nohtml' and not 'alphanohtml' because we must accept " |
|
| 152 | 152 | $charset = GETPOST('charset', 'aZ09'); |
| 153 | 153 | $separator_used = str_replace('\t', "\t", $separator); |
| 154 | 154 | |
@@ -615,7 +615,7 @@ discard block |
||
| 615 | 615 | $maxfilesizearray = getMaxFileSizeArray(); |
| 616 | 616 | $maxmin = $maxfilesizearray['maxmin']; |
| 617 | 617 | if ($maxmin > 0) { |
| 618 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 618 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 619 | 619 | } |
| 620 | 620 | print '<input type="file" name="userfile" size="20" maxlength="80"> '; |
| 621 | 621 | $out = (!getDolGlobalString('MAIN_UPLOAD_DOC') ? ' disabled' : ''); |
@@ -625,29 +625,29 @@ discard block |
||
| 625 | 625 | $max = getDolGlobalString('MAIN_UPLOAD_DOC'); // In Kb |
| 626 | 626 | $maxphp = @ini_get('upload_max_filesize'); // In unknown |
| 627 | 627 | if (preg_match('/k$/i', $maxphp)) { |
| 628 | - $maxphp = (int)substr($maxphp, 0, -1); |
|
| 628 | + $maxphp = (int) substr($maxphp, 0, -1); |
|
| 629 | 629 | } |
| 630 | 630 | if (preg_match('/m$/i', $maxphp)) { |
| 631 | - $maxphp = (int)substr($maxphp, 0, -1) * 1024; |
|
| 631 | + $maxphp = (int) substr($maxphp, 0, -1) * 1024; |
|
| 632 | 632 | } |
| 633 | 633 | if (preg_match('/g$/i', $maxphp)) { |
| 634 | - $maxphp = (int)substr($maxphp, 0, -1) * 1024 * 1024; |
|
| 634 | + $maxphp = (int) substr($maxphp, 0, -1) * 1024 * 1024; |
|
| 635 | 635 | } |
| 636 | 636 | if (preg_match('/t$/i', $maxphp)) { |
| 637 | - $maxphp = (int)substr($maxphp, 0, -1) * 1024 * 1024 * 1024; |
|
| 637 | + $maxphp = (int) substr($maxphp, 0, -1) * 1024 * 1024 * 1024; |
|
| 638 | 638 | } |
| 639 | 639 | $maxphp2 = @ini_get('post_max_size'); // In unknown |
| 640 | 640 | if (preg_match('/k$/i', $maxphp2)) { |
| 641 | - $maxphp2 = (int)substr($maxphp2, 0, -1); |
|
| 641 | + $maxphp2 = (int) substr($maxphp2, 0, -1); |
|
| 642 | 642 | } |
| 643 | 643 | if (preg_match('/m$/i', $maxphp2)) { |
| 644 | - $maxphp2 = (int)substr($maxphp2, 0, -1) * 1024; |
|
| 644 | + $maxphp2 = (int) substr($maxphp2, 0, -1) * 1024; |
|
| 645 | 645 | } |
| 646 | 646 | if (preg_match('/g$/i', $maxphp2)) { |
| 647 | - $maxphp2 = (int)substr($maxphp2, 0, -1) * 1024 * 1024; |
|
| 647 | + $maxphp2 = (int) substr($maxphp2, 0, -1) * 1024 * 1024; |
|
| 648 | 648 | } |
| 649 | 649 | if (preg_match('/t$/i', $maxphp2)) { |
| 650 | - $maxphp2 = (int)substr($maxphp2, 0, -1) * 1024 * 1024 * 1024; |
|
| 650 | + $maxphp2 = (int) substr($maxphp2, 0, -1) * 1024 * 1024 * 1024; |
|
| 651 | 651 | } |
| 652 | 652 | // Now $max and $maxphp and $maxphp2 are in Kb |
| 653 | 653 | $maxmin = $max; |
@@ -734,7 +734,7 @@ discard block |
||
| 734 | 734 | //var_dump($_SESSION["dol_array_match_file_to_database_select"]); |
| 735 | 735 | $serialized_array_match_file_to_database = isset($_SESSION["dol_array_match_file_to_database_select"]) ? $_SESSION["dol_array_match_file_to_database_select"] : ''; |
| 736 | 736 | $fieldsarray = explode(',', $serialized_array_match_file_to_database); |
| 737 | - $array_match_file_to_database = array(); // Same than $fieldsarray but with mapped value only (col1 => 's.fielda', col2 => 's.fieldb'...) |
|
| 737 | + $array_match_file_to_database = array(); // Same than $fieldsarray but with mapped value only (col1 => 's.fielda', col2 => 's.fieldb'...) |
|
| 738 | 738 | foreach ($fieldsarray as $elem) { |
| 739 | 739 | $tabelem = explode('=', $elem, 2); |
| 740 | 740 | $key = $tabelem[0]; |
@@ -1088,7 +1088,7 @@ discard block |
||
| 1088 | 1088 | foreach ($fieldstarget as $code => $line) { |
| 1089 | 1089 | //var_dump($line); |
| 1090 | 1090 | |
| 1091 | - $tmparray = explode('|', $line["label"]); // If label of field is several translation keys separated with | |
|
| 1091 | + $tmparray = explode('|', $line["label"]); // If label of field is several translation keys separated with | |
|
| 1092 | 1092 | $labeltoshow = ''; |
| 1093 | 1093 | foreach ($tmparray as $tmpkey => $tmpval) { |
| 1094 | 1094 | $labeltoshow .= ($labeltoshow ? ' ' . $langs->trans('or') . ' ' : '') . $langs->transnoentities($tmpval); |
@@ -1118,7 +1118,7 @@ discard block |
||
| 1118 | 1118 | //var_dump($fieldssource); |
| 1119 | 1119 | //var_dump($fieldstarget); |
| 1120 | 1120 | |
| 1121 | - $modetoautofillmapping = 'session'; // Use setup in session |
|
| 1121 | + $modetoautofillmapping = 'session'; // Use setup in session |
|
| 1122 | 1122 | if ($initialloadofstep4) { |
| 1123 | 1123 | $modetoautofillmapping = 'guess'; |
| 1124 | 1124 | } |
@@ -1250,10 +1250,10 @@ discard block |
||
| 1250 | 1250 | } elseif ($modetoautofillmapping == 'session' && !empty($_SESSION['dol_array_match_file_to_database_select'])) { |
| 1251 | 1251 | $tmpselectioninsession = dolExplodeIntoArray($_SESSION['dol_array_match_file_to_database_select'], ',', '='); |
| 1252 | 1252 | //var_dump($code); |
| 1253 | - if (!empty($tmpselectioninsession[(string)($i + 1)]) && $tmpselectioninsession[(string)($i + 1)] == $tmpcode) { |
|
| 1253 | + if (!empty($tmpselectioninsession[(string) ($i + 1)]) && $tmpselectioninsession[(string) ($i + 1)] == $tmpcode) { |
|
| 1254 | 1254 | $selectforline .= ' selected'; |
| 1255 | 1255 | } |
| 1256 | - $selectforline .= ' data-debug="' . $tmpcode . '-' . $code . '-' . $j . '-' . (!empty($tmpselectioninsession[(string)($i + 1)]) ? $tmpselectioninsession[(string)($i + 1)] : "") . '"'; |
|
| 1256 | + $selectforline .= ' data-debug="' . $tmpcode . '-' . $code . '-' . $j . '-' . (!empty($tmpselectioninsession[(string) ($i + 1)]) ? $tmpselectioninsession[(string) ($i + 1)] : "") . '"'; |
|
| 1257 | 1257 | } |
| 1258 | 1258 | $selectforline .= ' data-html="' . dol_escape_htmltag($labelhtml) . '"'; |
| 1259 | 1259 | $selectforline .= '>'; |
@@ -1330,7 +1330,7 @@ discard block |
||
| 1330 | 1330 | // - Then we set to disabled all fields that are selected |
| 1331 | 1331 | print 'function setOptionsToDisabled() {' . "\n"; |
| 1332 | 1332 | print ' console.log("Remove the disabled flag everywhere");' . "\n"; |
| 1333 | - print ' $("select.targetselectchange").not($( this )).find(\'option\').prop("disabled", false);' . "\n"; // Enable all options |
|
| 1333 | + print ' $("select.targetselectchange").not($( this )).find(\'option\').prop("disabled", false);' . "\n"; // Enable all options |
|
| 1334 | 1334 | print ' arrayofselectedvalues = [];' . "\n"; |
| 1335 | 1335 | |
| 1336 | 1336 | print ' $("select.targetselectchange").each(function(){' . "\n"; |
@@ -1347,7 +1347,7 @@ discard block |
||
| 1347 | 1347 | print ' $.each(arrayofselectedvalues, function(key, value) {' . "\n"; // Loop on each selected value |
| 1348 | 1348 | print ' if (value != -1) {' . "\n"; |
| 1349 | 1349 | print ' console.log("Process key="+key+" value="+value+" to disable.");' . "\n"; |
| 1350 | - print ' $("select.targetselectchange").find(\'option[value="\'+value+\'"]:not(:selected)\').prop("disabled", true);' . "\n"; // Set to disabled except if currently selected |
|
| 1350 | + print ' $("select.targetselectchange").find(\'option[value="\'+value+\'"]:not(:selected)\').prop("disabled", true);' . "\n"; // Set to disabled except if currently selected |
|
| 1351 | 1351 | print ' }' . "\n"; |
| 1352 | 1352 | print ' });' . "\n"; |
| 1353 | 1353 | print '}' . "\n"; |
@@ -1490,7 +1490,7 @@ discard block |
||
| 1490 | 1490 | $sql .= " FROM " . MAIN_DB_PREFIX . "import_model"; |
| 1491 | 1491 | $sql .= " WHERE type = '" . $db->escape($datatoimport) . "'"; |
| 1492 | 1492 | if (!getDolGlobalString('EXPORTS_SHARE_MODELS')) { // EXPORTS_SHARE_MODELS means all templates are visible, whatever is owner. |
| 1493 | - $sql .= " AND fk_user IN (0, " . ((int)$user->id) . ")"; |
|
| 1493 | + $sql .= " AND fk_user IN (0, " . ((int) $user->id) . ")"; |
|
| 1494 | 1494 | } |
| 1495 | 1495 | $sql .= " ORDER BY rowid"; |
| 1496 | 1496 | |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | $mult = 3600 * 24 * 7; |
| 388 | 388 | break; |
| 389 | 389 | case 'm': |
| 390 | - $mult = (int)3600 * 24 * (365 / 12); // Average month duration |
|
| 390 | + $mult = (int) 3600 * 24 * (365 / 12); // Average month duration |
|
| 391 | 391 | break; |
| 392 | 392 | case 'y': |
| 393 | 393 | $mult = 3600 * 24 * 365; |
@@ -1076,7 +1076,7 @@ discard block |
||
| 1076 | 1076 | } else { |
| 1077 | 1077 | print '<form name="fichinter" action="' . $_SERVER['PHP_SELF'] . '" method="POST">'; |
| 1078 | 1078 | print '<input type="hidden" name="token" value="' . newToken() . '">'; |
| 1079 | - print '<input type="hidden" name="action" value="create">'; // We go back to create action |
|
| 1079 | + print '<input type="hidden" name="action" value="create">'; // We go back to create action |
|
| 1080 | 1080 | print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
| 1081 | 1081 | |
| 1082 | 1082 | print dol_get_fiche_head(''); |
@@ -1365,7 +1365,7 @@ discard block |
||
| 1365 | 1365 | $sql = 'SELECT ft.rowid, ft.description, ft.fk_fichinter, ft.duree, ft.rang,'; |
| 1366 | 1366 | $sql .= ' ft.date as date_intervention'; |
| 1367 | 1367 | $sql .= ' FROM ' . MAIN_DB_PREFIX . 'fichinterdet as ft'; |
| 1368 | - $sql .= ' WHERE ft.fk_fichinter = ' . ((int)$object->id); |
|
| 1368 | + $sql .= ' WHERE ft.fk_fichinter = ' . ((int) $object->id); |
|
| 1369 | 1369 | if (getDolGlobalString('FICHINTER_HIDE_EMPTY_DURATION')) { |
| 1370 | 1370 | $sql .= ' AND ft.duree <> 0'; |
| 1371 | 1371 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $objectbomchildline = new BOMLine($db); |
| 163 | 163 | |
| 164 | 164 | foreach ($TBomLineId as $id_bom_line) { |
| 165 | - $object = new Mo($db); // modified by the actions_addupdatedelete.inc.php |
|
| 165 | + $object = new Mo($db); // modified by the actions_addupdatedelete.inc.php |
|
| 166 | 166 | |
| 167 | 167 | $objectbomchildline->fetch($id_bom_line); |
| 168 | 168 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | $res = $object->add_object_linked('mo', $mo_parent->id); |
| 181 | 181 | } |
| 182 | 182 | |
| 183 | - header("Location: " . dol_buildpath('/mrp/mo_card.php?id=' . ((int)$mo_parent->id), 1)); |
|
| 183 | + header("Location: " . dol_buildpath('/mrp/mo_card.php?id=' . ((int) $mo_parent->id), 1)); |
|
| 184 | 184 | exit; |
| 185 | 185 | } elseif ($action == 'confirm_cancel' && $confirm == 'yes' && !empty($permissiontoadd)) { |
| 186 | 186 | $also_cancel_consumed_and_produced_lines = (GETPOST('alsoCancelConsumedAndProducedLines', 'alpha') ? 1 : 0); |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | } |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 135 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 136 | 136 | /** |
| 137 | 137 | * Output header of an example file for this format |
| 138 | 138 | * |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public function write_header_example($outputlangs) |
| 143 | 143 | { |
| 144 | - // phpcs:enable |
|
| 144 | + // phpcs:enable |
|
| 145 | 145 | global $user, $conf, $langs, $file; |
| 146 | 146 | // create a temporary object, the final output will be generated in footer |
| 147 | 147 | $this->workbook->getProperties()->setCreator($user->getFullName($outputlangs) . ' - Dolibarr ' . DOL_VERSION); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | return ''; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 159 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 160 | 160 | /** |
| 161 | 161 | * Output title line of an example file for this format |
| 162 | 162 | * |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | */ |
| 167 | 167 | public function write_title_example($outputlangs, $headerlinefields) |
| 168 | 168 | { |
| 169 | - // phpcs:enable |
|
| 169 | + // phpcs:enable |
|
| 170 | 170 | global $conf; |
| 171 | 171 | $this->workbook->getActiveSheet()->getStyle('1')->getFont()->setBold(true); |
| 172 | 172 | $this->workbook->getActiveSheet()->getStyle('1')->getAlignment()->setHorizontal(Alignment::HORIZONTAL_LEFT); |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | return ''; // final output will be generated in footer |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 185 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 186 | 186 | /** |
| 187 | 187 | * Output record of an example file for this format |
| 188 | 188 | * |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | public function write_record_example($outputlangs, $contentlinevalues) |
| 194 | 194 | { |
| 195 | - // phpcs:enable |
|
| 195 | + // phpcs:enable |
|
| 196 | 196 | $col = 1; |
| 197 | 197 | $row = 2; |
| 198 | 198 | foreach ($contentlinevalues as $cell) { |
@@ -203,7 +203,7 @@ discard block |
||
| 203 | 203 | return ''; // final output will be generated in footer |
| 204 | 204 | } |
| 205 | 205 | |
| 206 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 206 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 207 | 207 | /** |
| 208 | 208 | * Output footer of an example file for this format |
| 209 | 209 | * |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | */ |
| 213 | 213 | public function write_footer_example($outputlangs) |
| 214 | 214 | { |
| 215 | - // phpcs:enable |
|
| 215 | + // phpcs:enable |
|
| 216 | 216 | // return the file content as a string |
| 217 | 217 | $tempfile = tempnam(sys_get_temp_dir(), 'dol'); |
| 218 | 218 | $objWriter = new PhpOffice\PhpSpreadsheet\Writer\Xlsx($this->workbook); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | |
| 228 | 228 | |
| 229 | 229 | |
| 230 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 230 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 231 | 231 | /** |
| 232 | 232 | * Open input file |
| 233 | 233 | * |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | */ |
| 237 | 237 | public function import_open_file($file) |
| 238 | 238 | { |
| 239 | - // phpcs:enable |
|
| 239 | + // phpcs:enable |
|
| 240 | 240 | global $langs; |
| 241 | 241 | $ret = 1; |
| 242 | 242 | |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | |
| 254 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 254 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 255 | 255 | /** |
| 256 | 256 | * Return nb of records. File must be closed. |
| 257 | 257 | * |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | */ |
| 261 | 261 | public function import_get_nb_of_lines($file) |
| 262 | 262 | { |
| 263 | - // phpcs:enable |
|
| 263 | + // phpcs:enable |
|
| 264 | 264 | $reader = new Xlsx(); |
| 265 | 265 | $this->workbook = $reader->load($file); |
| 266 | 266 | |
@@ -273,7 +273,7 @@ discard block |
||
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | |
| 276 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 276 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 277 | 277 | /** |
| 278 | 278 | * Input header line from file |
| 279 | 279 | * |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | */ |
| 282 | 282 | public function import_read_header() |
| 283 | 283 | { |
| 284 | - // phpcs:enable |
|
| 284 | + // phpcs:enable |
|
| 285 | 285 | // This is not called by the import code !!! |
| 286 | 286 | $this->headers = array(); |
| 287 | 287 | $xlsx = new Xlsx(); |
@@ -294,7 +294,7 @@ discard block |
||
| 294 | 294 | } |
| 295 | 295 | |
| 296 | 296 | |
| 297 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 297 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 298 | 298 | /** |
| 299 | 299 | * Return array of next record in input file. |
| 300 | 300 | * |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | */ |
| 303 | 303 | public function import_read_record() |
| 304 | 304 | { |
| 305 | - // phpcs:enable |
|
| 305 | + // phpcs:enable |
|
| 306 | 306 | global $conf; |
| 307 | 307 | |
| 308 | 308 | $rowcount = $this->workbook->getActiveSheet()->getHighestDataRow(); |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | return $array; |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 325 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 326 | 326 | /** |
| 327 | 327 | * Close file handle |
| 328 | 328 | * |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | */ |
| 331 | 331 | public function import_close_file() |
| 332 | 332 | { |
| 333 | - // phpcs:enable |
|
| 333 | + // phpcs:enable |
|
| 334 | 334 | $this->workbook->disconnectWorksheets(); |
| 335 | 335 | unset($this->workbook); |
| 336 | 336 | return 0; |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | |
| 339 | 339 | |
| 340 | 340 | // What is this doing here ? it is common to all imports, is should be in the parent class |
| 341 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 341 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 342 | 342 | /** |
| 343 | 343 | * Insert a record into database |
| 344 | 344 | * |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | */ |
| 353 | 353 | public function import_insert($arrayrecord, $array_match_file_to_database, $objimport, $maxfields, $importid, $updatekeys) |
| 354 | 354 | { |
| 355 | - // phpcs:enable |
|
| 355 | + // phpcs:enable |
|
| 356 | 356 | global $langs, $conf, $user; |
| 357 | 357 | global $thirdparty_static; // Specific to thirdparty import |
| 358 | 358 | global $tablewithentity_cache; // Cache to avoid to call desc at each rows on tables |