self::VERSION); if (false !== ($appVersion = @file_get_contents(Icinga::app()->getApplicationDir('VERSION')))) { $matches = array(); if (@preg_match('/^(?P\w+) (?P\S+)/', $appVersion, $matches)) { return array_merge($version, $matches); } } $gitDir = Icinga::app()->getBaseDir('.git'); $gitHead = @file_get_contents($gitDir . DIRECTORY_SEPARATOR . 'HEAD'); if (false !== $gitHead) { $matches = array(); if (@preg_match('/(?[0-9a-f]+)$/ms', $gitCommitID, $matches)) { return array_merge($version, $matches); } } } return $version; } }