[fix] Diagnostic works with 1.x
This commit is contained in:
parent
9c4c68b6eb
commit
e5e755b2ef
|
@ -31,13 +31,12 @@ class Alternc_Diagnostic_Service_Dns
|
|||
|
||||
$this->bind = new system_bind();
|
||||
$version = $this->service->version;
|
||||
if( $version < 3 ) {
|
||||
|
||||
if( $version < 3.2 ) {
|
||||
$this->domainList = $this->get_domain_all_summary();
|
||||
}else{
|
||||
$this->domainList = $dom->get_domain_all_summary();
|
||||
|
||||
}
|
||||
|
||||
// Writes the domains list
|
||||
$this->writeSectionData (self::SECTION_LIST,$this->domainList);
|
||||
// Writes the domains hosts
|
||||
|
@ -61,13 +60,12 @@ class Alternc_Diagnostic_Service_Dns
|
|||
function get_domain_all_summary() {
|
||||
global $db, $err;
|
||||
$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()) {
|
||||
$res[$db->f("domaine")] = array(
|
||||
"gesdns" => $db->f("gesdns"),
|
||||
"gesmx" => $db->f("gesmx"),
|
||||
"dns_action" => $db->f("dns_action"),
|
||||
"zonettl" => $db->f("zonettl"),
|
||||
);
|
||||
}
|
||||
return $res;
|
||||
|
|
|
@ -112,13 +112,13 @@ function __autoload($class_name)
|
|||
// ==================================================================
|
||||
// ==================================================================
|
||||
|
||||
$version = "3.0";
|
||||
$version = "3.2";
|
||||
|
||||
// alternc 1.0
|
||||
if(is_file("/usr/share/alternc/panel/class/config_nochk.php")){
|
||||
require_once("/usr/share/alternc/panel/class/config_nochk.php");
|
||||
$version = "1.0";
|
||||
}else{
|
||||
$version = "1.0";
|
||||
require_once("/var/alternc/bureau/class/config_nochk.php");
|
||||
include "../bureau/class/class_system_bind.php";
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue