view->appVersion = null; $this->view->gitCommitID = null; $this->view->gitCommitDate = null; if (false !== ($appVersion = @file( Icinga::app()->getApplicationDir() . DIRECTORY_SEPARATOR . 'VERSION', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES ))) { foreach ($appVersion as $av) { $matches = array(); if (false === ($res = preg_match( '/(?view->gitCommitID !== null) { break; } $matches2 = array(); if (false === ($res = preg_match( '/(?view->gitCommitID = $matches2[1]; if (! isset($matches2[2])) { break; } foreach (preg_split( '/\s*,\s*/', $matches2[2], -1, PREG_SPLIT_NO_EMPTY ) as $refName) { $matches3 = array(); if (false === ($res = preg_match( '/(?view->appVersion = $matches3[1]; break; } } break; case 'GitCommitDate': if ($this->view->gitCommitDate !== null) { break; } $matches2 = array(); if (false === ($res = preg_match( '/(?view->gitCommitDate = $matches2[1]; } } } } } }