/** * Decorate the about::confusa template with the information from the * VERSION file */ private function assignVersionVariables() { try { $confusaVersion = MetaInfo::getConfusaVersion(); } catch (ConfusaGenException $cge) { Framework::error_output("Could not determine the version of Confusa! " . "Please contact an administrator about that!"); } $version_path = Config::get_config('install_path') . "VERSION"; $version_file = file_get_contents($version_path); $this->tpl->assign('cVersion', $confusaVersion); $cdn_line_start = strpos($version_file, "NAME="); $cdn_line_end = strpos($version_file, "\n", $cdn_line_start); if ($cdn_line_start === false || $cdn_line_end === false) { Framework::error_output("Could not determine the version codename of " . "Confusa! Please contact an administrator about " . "that!"); } $cdn_line_start += 5; $versionCodename = substr($version_file, $cdn_line_start, $cdn_line_end - $cdn_line_start); $this->tpl->assign('cCodename', $versionCodename); }