Fix phpcs
This commit is contained in:
parent
70fa742939
commit
9fc2d9fc03
@ -321,7 +321,7 @@ if ($object->ismultientitymanaged == 1) {
|
|||||||
foreach ($search as $key => $val) {
|
foreach ($search as $key => $val) {
|
||||||
if (array_key_exists($key, $object->fields)) {
|
if (array_key_exists($key, $object->fields)) {
|
||||||
if ($key == 'status' && $search[$key] == -1) {
|
if ($key == 'status' && $search[$key] == -1) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
|
$mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
|
||||||
if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) {
|
if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) {
|
||||||
|
|||||||
@ -783,7 +783,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
|
|||||||
try {
|
try {
|
||||||
$dom = new DOMDocument;
|
$dom = new DOMDocument;
|
||||||
$dom->loadHTML($out, LIBXML_ERR_NONE|LIBXML_HTML_NOIMPLIED|LIBXML_HTML_NODEFDTD|LIBXML_NONET|LIBXML_NOWARNING|LIBXML_NOXMLDECL);
|
$dom->loadHTML($out, LIBXML_ERR_NONE|LIBXML_HTML_NOIMPLIED|LIBXML_HTML_NODEFDTD|LIBXML_NONET|LIBXML_NOWARNING|LIBXML_NOXMLDECL);
|
||||||
} catch(Exception $e) {
|
} catch (Exception $e) {
|
||||||
//print $e->getMessage();
|
//print $e->getMessage();
|
||||||
return 'InvalidHTMLString';
|
return 'InvalidHTMLString';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1675,15 +1675,15 @@ if ($action == 'create') {
|
|||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td class="titlefield">'.$langs->trans("User").'</td>';
|
print '<td class="titlefield">'.$langs->trans("User").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($object->fk_user_author > 0) {
|
if ($object->fk_user_author > 0) {
|
||||||
$userauthor = new User($db);
|
$userauthor = new User($db);
|
||||||
$result = $userauthor->fetch($object->fk_user_author);
|
$result = $userauthor->fetch($object->fk_user_author);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
dol_print_error('', $userauthor->error);
|
dol_print_error('', $userauthor->error);
|
||||||
} elseif ($result > 0) {
|
} elseif ($result > 0) {
|
||||||
print $userauthor->getNomUrl(-1);
|
print $userauthor->getNomUrl(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Period
|
// Period
|
||||||
|
|||||||
@ -139,7 +139,7 @@ $dataseries = dol_sort_array($dataseries, 1, 'desc');
|
|||||||
$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain
|
$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain
|
||||||
$i = 0;
|
$i = 0;
|
||||||
if (count($dataseries) > ($KEEPNFIRST + 1)) {
|
if (count($dataseries) > ($KEEPNFIRST + 1)) {
|
||||||
foreach($dataseries as $key => $val) {
|
foreach ($dataseries as $key => $val) {
|
||||||
if ($i < $KEEPNFIRST) {
|
if ($i < $KEEPNFIRST) {
|
||||||
$i++;
|
$i++;
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@ -4984,4 +4984,3 @@ function migrate_export_import_profiles($mode = 'export')
|
|||||||
print '<tr class="trforrunsql" style=""><td class="wordbreak" colspan="4">'.$langs->trans("NothingToDo")."</td></tr>\n";
|
print '<tr class="trforrunsql" style=""><td class="wordbreak" colspan="4">'.$langs->trans("NothingToDo")."</td></tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -236,8 +236,8 @@ foreach ($search as $key => $val) {
|
|||||||
$mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
|
$mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0);
|
||||||
if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) {
|
if ((strpos($object->fields[$key]['type'], 'integer:') === 0) || (strpos($object->fields[$key]['type'], 'sellist:') === 0) || !empty($object->fields[$key]['arrayofkeyval'])) {
|
||||||
if ($search[$key] == '-1' || $search[$key] === '0') {
|
if ($search[$key] == '-1' || $search[$key] === '0') {
|
||||||
$search[$key] = '';
|
$search[$key] = '';
|
||||||
}
|
}
|
||||||
$mode_search = 2;
|
$mode_search = 2;
|
||||||
}
|
}
|
||||||
if ($search[$key] != '') {
|
if ($search[$key] != '') {
|
||||||
|
|||||||
@ -707,7 +707,6 @@ if ($action == "updatereduction") {
|
|||||||
|
|
||||||
// Reload data
|
// Reload data
|
||||||
$invoice->fetch($placeid);
|
$invoice->fetch($placeid);
|
||||||
|
|
||||||
} elseif ($action == 'update_reduction_global') {
|
} elseif ($action == 'update_reduction_global') {
|
||||||
foreach ($invoice->lines as $line) {
|
foreach ($invoice->lines as $line) {
|
||||||
$result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
$result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);
|
||||||
|
|||||||
@ -3223,7 +3223,7 @@ class User extends CommonObject
|
|||||||
if (preg_match('/'.$keyfilter1.'/', $val['fullpath']) || preg_match('/'.$keyfilter2.'/', $val['fullpath'])
|
if (preg_match('/'.$keyfilter1.'/', $val['fullpath']) || preg_match('/'.$keyfilter2.'/', $val['fullpath'])
|
||||||
|| preg_match('/'.$keyfilter3.'/', $val['fullpath']) || preg_match('/'.$keyfilter4.'/', $val['fullpath'])) {
|
|| preg_match('/'.$keyfilter3.'/', $val['fullpath']) || preg_match('/'.$keyfilter4.'/', $val['fullpath'])) {
|
||||||
unset($this->users[$key]);
|
unset($this->users[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user