2008-08-11 02:03:57 +02:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Selects numerical/date content smaller than the input
|
|
|
|
*
|
|
|
|
* @todo documentation
|
|
|
|
*
|
|
|
|
* @package sapphire
|
|
|
|
* @subpackage search
|
|
|
|
*/
|
|
|
|
class LessThanFilter extends SearchFilter {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return $query
|
|
|
|
*/
|
|
|
|
public function apply(SQLQuery $query) {
|
|
|
|
$query = $this->applyRelation($query);
|
2008-10-05 21:20:35 +02:00
|
|
|
return $query->where(sprintf(
|
|
|
|
"%s < '%s'",
|
|
|
|
$this->getDbName(),
|
2009-12-16 06:49:33 +01:00
|
|
|
Convert::raw2sql($this->getDbFormattedValue())
|
2008-10-05 21:20:35 +02:00
|
|
|
));
|
2008-08-11 02:03:57 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function isEmpty() {
|
|
|
|
return $this->getValue() == null || $this->getValue() == '';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|