mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Clean code
This commit is contained in:
@@ -413,7 +413,7 @@ class WebsitePage extends CommonObject
|
||||
if (count($filter) > 0) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 't.rowid' || $key == 't.fk_website' || $key == 'status') {
|
||||
$sqlwhere[] = $key.' = '.$value;
|
||||
$sqlwhere[] = $key.' = '.((int) $value);
|
||||
} elseif ($key == 'type_container') {
|
||||
$sqlwhere[] = $key." = '".$this->db->escape($value)."'";
|
||||
} elseif ($key == 'lang' || $key == 't.lang') {
|
||||
@@ -515,7 +515,7 @@ class WebsitePage extends CommonObject
|
||||
if (count($filter) > 0) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 't.rowid' || $key == 't.fk_website' || $key == 'status') {
|
||||
$sqlwhere[] = $key.' = '.$value;
|
||||
$sqlwhere[] = $key.' = '.((int) $value);
|
||||
} elseif ($key == 'type_container') {
|
||||
$sqlwhere[] = $key." = '".$this->db->escape($value)."'";
|
||||
} elseif ($key == 'lang' || $key == 't.lang') {
|
||||
@@ -528,7 +528,7 @@ class WebsitePage extends CommonObject
|
||||
}
|
||||
$listoflang[] = "'".$this->db->escape(substr(str_replace("'", '', $tmpvalue), 0, 2))."'";
|
||||
}
|
||||
$stringtouse = $key." IN (".$this->db->sanitize(join(',', $listoflang)).")";
|
||||
$stringtouse = $key." IN (".$this->db->sanitize(join(',', $listoflang), 1).")";
|
||||
if ($foundnull) {
|
||||
$stringtouse = '('.$stringtouse.' OR '.$key.' IS NULL)';
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
||||
$morehtmlref .= '</div>';
|
||||
|
||||
if ($socid > 0) {
|
||||
$object->next_prev_filter = 'te.fk_soc = '.$socid;
|
||||
$object->next_prev_filter = 'te.fk_soc = '.((int) $socid);
|
||||
}
|
||||
|
||||
dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref);
|
||||
|
||||
Reference in New Issue
Block a user