[fix] work with 1.x

This commit is contained in:
alban 2014-07-02 22:51:01 +02:00
parent 234568a6ed
commit ad444849c2
2 changed files with 17 additions and 5 deletions

View File

@ -33,7 +33,11 @@ class Alternc_Diagnostic_Service_Dns
/** @var m_dom */
global $dom;
$this->domainList = $dom->get_domain_all_summary();
if( !is_a($dom, "system_bind")){
$this->data->setMetadata("Alternc 1.x: can't read DNS");
return $this->data;
}
// Writes the domains list
$this->writeSectionData (self::SECTION_LIST,$this->domainList);

View File

@ -112,8 +112,16 @@ function __autoload($class_name)
// ==================================================================
// ==================================================================
// alternc 1.0
if(is_file("/usr/share/alternc/panel/class/config_nochk.php")){
require_once("/usr/share/alternc/panel/class/config_nochk.php");
}else{
require_once("/var/alternc/bureau/class/config_nochk.php");
include "../bureau/class/class_system_bind.php";
}
$directoryInstance = new Alternc_Diagnostic_Directory("/tmp/diagnostic");