Skip to content

Commit

Permalink
Fix bad function
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Feb 25, 2024
1 parent 614af96 commit c171ce2
Show file tree
Hide file tree
Showing 26 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion htdocs/asset/class/asset.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/asset/class/assetmodel.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/bookcal/class/availabilities.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/bookcal/class/calendar.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/defaultvalues.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid' || ($key == 't.entity' && !is_array($value)) || ($key == 't.user_id' && !is_array($value))) {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 't.page' || $key == 't.param' || $key == 't.type') {
$sqlwhere[] = $key." = '".$this->db->escape($value)."'";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/class/timespent.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/eventorganization/class/conferenceorbooth.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.id' || $key == 't.fk_project' || $key == 't.fk_soc' || $key == 't.fk_action') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid' || $key == 't.fk_soc' || $key == 't.fk_project' || $key == 't.fk_actioncomm') {
$sqlwhere[] = $key.'='.((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/hrm/class/evaluation.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key.'='.$value;
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/hrm/class/evaluationdet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
$sqlwhere[] = $key.'='.$value;
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
} elseif (strpos($value, '%') === false) {
$sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/hrm/class/job.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key.'='.$value;
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/hrm/class/position.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
$sqlwhere[] = $key . '=' . $value;
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key . ' = \'' . $this->db->idate($value) . '\'';
} elseif (strpos($value, '%') === false) {
$sqlwhere[] = $key . ' IN (' . $this->db->sanitize($this->db->escape($value)) . ')';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/hrm/class/skill.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key.'='.$value;
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/hrm/class/skilldet.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
$sqlwhere[] = $key.'='.$value;
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif (strpos($value, '%') === false) {
$sqlwhere[] = $key." IN (".$this->db->sanitize($this->db->escape($value)).")";
Expand Down
2 changes: 1 addition & 1 deletion htdocs/hrm/class/skillrank.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && $key != 'customsql' && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && $key != 'customsql' && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/knowledgemanagement/class/knowledgerecord.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/opensurvey/class/opensurveysondage.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/partnership/class/partnership.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/partnership/class/partnership_type.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/product/class/productfournisseurprice.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/recruitment/class/recruitmentcandidature.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/recruitment/class/recruitmentjobposition.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/ticket/class/cticketcategory.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/user/class/user.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4052,7 +4052,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && isset($this->fields[$key]['type']) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && isset($this->fields[$key]['type']) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/webhook/class/target.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down
2 changes: 1 addition & 1 deletion htdocs/workstation/class/workstation.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset =
foreach ($filter as $key => $value) {
if ($key == 't.rowid') {
$sqlwhere[] = $key." = ".((int) $value);
} elseif (property_exists($this->fields, $key) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
} elseif (array_key_exists($key, $this->fields) && in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
Expand Down

0 comments on commit c171ce2

Please sign in to comment.