IdoQuery: Fix method isTimestamp() not handling customvars properly
refs #10316
This commit is contained in:
parent
d0ab001437
commit
005ec27cea
|
@ -546,16 +546,17 @@ abstract class IdoQuery extends DbQuery
|
||||||
/**
|
/**
|
||||||
* Return true if an field contains an explicit timestamp
|
* Return true if an field contains an explicit timestamp
|
||||||
*
|
*
|
||||||
* @param String $field The field to test for containing an timestamp
|
* @param string $field The field to test for containing an timestamp
|
||||||
* @return bool True when the field represents an timestamp
|
*
|
||||||
|
* @return bool True when the field represents an timestamp
|
||||||
*/
|
*/
|
||||||
public function isTimestamp($field)
|
public function isTimestamp($field)
|
||||||
{
|
{
|
||||||
$mapped = $this->getMappedField($field);
|
if ($this->isCustomVar($field)) {
|
||||||
if ($mapped === null) {
|
return false;
|
||||||
return stripos($field, 'UNIX_TIMESTAMP') !== false;
|
|
||||||
}
|
}
|
||||||
return stripos($mapped, 'UNIX_TIMESTAMP') !== false;
|
|
||||||
|
return stripos($this->getMappedField($field) ?: $field, 'UNIX_TIMESTAMP') !== false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue