@@ -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); |
@@ -114,8 +114,8 @@ |
||
| 114 | 114 | $mens = price2num($mens); |
| 115 | 115 | $capital = price2num($capital); |
| 116 | 116 | $rate = price2num($rate); |
| 117 | - $numactualloadterm = ((int)$numactualloadterm); |
|
| 118 | - $nbterm = ((int)$nbterm); |
|
| 117 | + $numactualloadterm = ((int) $numactualloadterm); |
|
| 118 | + $nbterm = ((int) $nbterm); |
|
| 119 | 119 | |
| 120 | 120 | // If mensuality is 0 we don't pay interests and remaining capital not modified |
| 121 | 121 | if ($mens == 0) { |