index f44efc0301f8bff96ea7e2d29dbfcb86587ad76c..c74c27fd379fdbbfb0ba2364b557c533b4e46d9f 100644 (file)
<?php
-class servdns extends plugin
+require_once("class_goService.inc");
+
+class servdns extends goService
{
/* CLI vars */
var $cli_summary= "Manage server basic objects";
var $DisplayName = "";
var $StatusFlag = "";
- function servdns ($config, $dn= NULL)
+ function servdns ($config, $dn= NULL, $parent= NULL)
{
- plugin::plugin ($config, $dn);
+ plugin::plugin ($config, $dn, $parent);
- $this->DisplayName = _("Domain name system service");
+ $this->DisplayName = _("DNS service");
$this->orig_dn = $dn;
/* There are still entries using this configuration
* Abort deletion
- */
+ */
if(count($used)){
$i = 2;
$str ="";
foreach($used as $dn){
- if($i > 0 ){
+ if($i > 0 && !preg_match("/,relativeDomainName=/",$dn)){
$i --;
- $str.=$dn." ";
+ $name = preg_replace("/^[^=]+=([^,]*),.*$/","\\1",$dn);
+ $zone = preg_replace("/^.*zoneName=([^,]*),.*$/","\\1",$dn);
+ $str.= $name.".".$zone." ";
}
}
function getListEntry()
{
- $this->updateStatusState();
- $flag = $this->StatusFlag;
- if(empty($flag)){
- $fields['Status'] = "";
- }else{
- $fields['Status'] = $this->$flag;
- }
+ $fields = goService::getListEntry();
$fields['Message'] = _("DNS service");
- $fields['AllowStart'] = true;
- $fields['AllowStop'] = true;
- $fields['AllowRestart'] = true;
- $fields['AllowRemove']= true;
$fields['AllowEdit'] = true;
return($fields);
}
function plInfo()
{
return (array(
- "plShortName" => _("DNS"),
- "plDescription" => _("DNS service"),
+ "plShortName" => _("DNS service"),
+ "plDescription" => _("DNS service")." ("._("Services").")",
"plSelfModify" => FALSE,
"plDepends" => array(),
- "plPriority" => 0,
+ "plPriority" => 83,
"plSection" => array("administration"),
"plCategory" => array("server"),