[fix] Diagnostic works with 1.x

This commit is contained in:
Benjamin Sonntag 2014-07-04 16:49:53 +02:00
parent 9c4c68b6eb
commit e5e755b2ef
2 changed files with 5 additions and 7 deletions

View File

@ -31,13 +31,12 @@ class Alternc_Diagnostic_Service_Dns
$this->bind = new system_bind(); $this->bind = new system_bind();
$version = $this->service->version; $version = $this->service->version;
if( $version < 3 ) {
if( $version < 3.2 ) {
$this->domainList = $this->get_domain_all_summary(); $this->domainList = $this->get_domain_all_summary();
}else{ }else{
$this->domainList = $dom->get_domain_all_summary(); $this->domainList = $dom->get_domain_all_summary();
} }
// Writes the domains list // Writes the domains list
$this->writeSectionData (self::SECTION_LIST,$this->domainList); $this->writeSectionData (self::SECTION_LIST,$this->domainList);
// Writes the domains hosts // Writes the domains hosts
@ -61,13 +60,12 @@ class Alternc_Diagnostic_Service_Dns
function get_domain_all_summary() { function get_domain_all_summary() {
global $db, $err; global $db, $err;
$res = array(); $res = array();
$db->query("SELECT domaine, gesdns, gesmx, dns_action, zonettl FROM domaines ORDER BY domaine"); $db->query("SELECT domaine, gesdns, gesmx, dns_action FROM domaines ORDER BY domaine");
while ($db->next_record()) { while ($db->next_record()) {
$res[$db->f("domaine")] = array( $res[$db->f("domaine")] = array(
"gesdns" => $db->f("gesdns"), "gesdns" => $db->f("gesdns"),
"gesmx" => $db->f("gesmx"), "gesmx" => $db->f("gesmx"),
"dns_action" => $db->f("dns_action"), "dns_action" => $db->f("dns_action"),
"zonettl" => $db->f("zonettl"),
); );
} }
return $res; return $res;

View File

@ -112,13 +112,13 @@ function __autoload($class_name)
// ================================================================== // ==================================================================
// ================================================================== // ==================================================================
$version = "3.0"; $version = "3.2";
// alternc 1.0 // alternc 1.0
if(is_file("/usr/share/alternc/panel/class/config_nochk.php")){ if(is_file("/usr/share/alternc/panel/class/config_nochk.php")){
require_once("/usr/share/alternc/panel/class/config_nochk.php"); require_once("/usr/share/alternc/panel/class/config_nochk.php");
$version = "1.0";
}else{ }else{
$version = "1.0";
require_once("/var/alternc/bureau/class/config_nochk.php"); require_once("/var/alternc/bureau/class/config_nochk.php");
include "../bureau/class/class_system_bind.php"; include "../bureau/class/class_system_bind.php";
} }