Merge branch 'master' into feature/user-and-group-management-8826

This commit is contained in:
Johannes Meyer 2015-05-13 08:11:59 +02:00
commit aa466ae721
3 changed files with 7 additions and 2 deletions

View File

@ -7,6 +7,7 @@ use Zend_Paginator;
use Icinga\Web\Controller\ModuleActionController;
use Icinga\Web\Widget\SortBox;
use Icinga\Web\Widget\Limiter;
use Icinga\Data\Sortable;
/**
* This is the controller all modules should inherit from

View File

@ -370,7 +370,11 @@ abstract class IdoQuery extends DbQuery
if ($count > 0) {
$this->columnsWithoutCollation[] = $this->getMappedField($key);
}
$value = preg_replace('/inet_aton\(([[:word:].]+)\)/i', '$1::inet - \'0.0.0.0\'', $value);
$value = preg_replace(
'/inet_aton\(([[:word:].]+)\)/i',
'(CASE WHEN $1 ~ \'(?:[0-9]{1,3}\\\\.){3}[0-9]{1,3}\' THEN $1::inet - \'0.0.0.0\' ELSE NULL END)',
$value
);
$value = preg_replace(
'/UNIX_TIMESTAMP(\((?>[^()]|(?-1))*\))/i',
'CASE WHEN ($1 < \'1970-01-03 00:00:00+00\'::timestamp with time zone) THEN 0 ELSE UNIX_TIMESTAMP($1) END',

View File

@ -83,7 +83,7 @@ class PerfdataSet implements IteratorAggregate
$label = trim($this->readLabel());
$value = trim($this->readUntil(' '));
if ($label && $value) {
if ($label) {
$this->perfdata[] = new Perfdata($label, $value);
}
}