From 4ecfd9c73af0278f59562e6d981e4a6988d40872 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 2 Jul 2014 22:50:29 +0200 Subject: [PATCH] [fix] work with 1.x --- lib/Alternc/Diagnostic/Service/Dns.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/Alternc/Diagnostic/Service/Dns.php b/lib/Alternc/Diagnostic/Service/Dns.php index 3b2efd16..ba2bc4f1 100644 --- a/lib/Alternc/Diagnostic/Service/Dns.php +++ b/lib/Alternc/Diagnostic/Service/Dns.php @@ -32,8 +32,12 @@ 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); @@ -108,4 +112,4 @@ class Alternc_Diagnostic_Service_Dns return $this->dom->enum_slave_account(); } -} \ No newline at end of file +}