data['title'] = T('Home'); $response->data['new_version_number'] = $this->_DoVersionCheck(); $response->data['current_version'] = Bugdar::$options['trackerversion']; $response->data['php_version'] = phpversion(); $response->data['mysql_version'] = Bugdar::$db->Query("SELECT VERSION() AS version")->FetchObject()->version; $response->data['web_server'] = $_SERVER['SERVER_SOFTWARE']; $response->data['mysql_max_packet'] = Bugdar::$db->Query("SHOW VARIABLES LIKE 'max_allowed_packet'")->FetchObject()->Value; $response->data['max_upload_size'] = $funct->fetch_max_attachment_size(); $response->data['mysql_ft_min_length'] = Bugdar::$db->Query("SHOW VARIABLES LIKE 'ft_min_word_len'")->FetchObject()->Value; $response->context['template'] = 'admin_index'; } // Contacts Blue Static to see if Bugdar is up-to-date. Returns NULL if the // current version is the latest, or a string version number of the latest // version. private function _DoVersionCheck() { global $bugsys; if (defined('NO_VERSION_CHECK') && constant('NO_VERSION_CHECK')) return; $check = @file_get_contents('https://www.bluestatic.org/versioncheck.php?prod=bugdar&ver=' . str_replace(' ', '-', Bugdar::$options['trackerversion'])); if (strpos($check, '') !== false) { if (!isset($check['version-check']['update'])) return NULL; // TODO(rsesek): Switch to SimpleXML. $check = $bugsys->xml->parse($check); return $check['version-check']['update']['value']; } } }