Skip to content

Commit

Permalink
Merge branch 'master' into feature/user-and-group-management-8826
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Meyer committed May 13, 2015
2 parents a9f0fd0 + 9e3d65e commit aa466ae
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions library/Icinga/Web/Controller.php
Expand Up @@ -7,6 +7,7 @@
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
Expand Down
Expand Up @@ -370,7 +370,11 @@ private function initializeForPostgres()
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',
Expand Down
Expand Up @@ -83,7 +83,7 @@ protected function parse()
$label = trim($this->readLabel());
$value = trim($this->readUntil(' '));

if ($label && $value) {
if ($label) {
$this->perfdata[] = new Perfdata($label, $value);
}
}
Expand Down

0 comments on commit aa466ae

Please sign in to comment.