function Ip2LongFilter::op_between in IP address manager 7.2
Overrides views_handler_filter_numeric::op_between
File
- src/
Plugin/ views/ filter/ Ip2LongFilter.php, line 13 - Contains the ip_views_handler_filter_ip2long class.
Class
- Ip2LongFilter
- A handler to provide proper displays IP Long values
Code
function op_between($field) {
if ($this->operator == 'between') {
$this->query
->add_where($this->options['group'], $field, array(
ip2long($this->value['min']),
ip2long($this->value['max']),
), 'BETWEEN');
}
else {
$this->query
->add_where($this->options['group'], db_or()
->condition($field, ip2long($this->value['min']), '<=')
->condition($field, ip2long($this->value['max']), '>='));
}
}