Code

Updated dns take over
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 Sep 2007 11:46:37 +0000 (11:46 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 11 Sep 2007 11:46:37 +0000 (11:46 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7259 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_servDNS.inc
plugins/admin/systems/servdns.tpl

index 063303360a3f469862976611156ce7ff21859249..8248a9a727087202a1d1da0b096a1a91c99acb1f 100644 (file)
@@ -17,7 +17,7 @@ class servdns extends plugin
 
   var $dns_server_list   = array("ENTRIES"=> array(),"FOR_LIST"=> array());
   var $take_over_id       = -1;
-
+  var $display_warning  = TRUE;
 
   function servdns ($config, $dn= NULL, $parent= NULL)
   {
@@ -76,19 +76,6 @@ class servdns extends plugin
   }  
 
 
-  function get_dns_info_string($id)
-  {
-    $ret="";
-    $ldap = $this->config->get_ldap_link();
-    $ldap->cd($this->dns_server_list['ENTRIES'][$id]['dn']);
-    $ldap->search("(|(zoneName=*)(relativeDomainName=*))",array("dn"));
-    while($attrs = $ldap->fetch()){
-      $ret .= $attrs['dn']."\n";
-    }
-    return($ret);
-  }
-
-
   function execute()
   {
     /* Call parent execute 
@@ -131,13 +118,15 @@ class servdns extends plugin
     if($this->take_over_id != -1){
       $this->dialog = FALSE;
       $id = $this->take_over_id;
-      $info = $this->get_dns_info_string($id);
       $smarty->assign("dns_take_over",TRUE);
-      $smarty->assign("info",$info);
       $warning = sprintf(_("You are going to migrate the DNS setup from server '%s'."),$this->dns_server_list['ENTRIES'][$id]['cn'][0]);
-      $warning2 = _("The migration will be startet when you save this system. To cancel this action, use the cancel button below.");
-      $smarty->assign("warning",$warning);
-      $smarty->assign("warning2",$warning2);
+      $warning.= "&nbsp;"._("This includes 'all' DNS zones that are located within this server. Please double check if your really want to do this.");
+      $warning.= "&nbsp;"._("The migration will be startet when you save this system. To cancel this action, use the cancel button below.");
+
+      if($this->display_warning){
+        print_red($warning);
+        $this->display_warning = FALSE;
+      }
       return($smarty->fetch(get_template_path('servdns.tpl', TRUE)));
     }
 
index e5afc89ab1877bde05145f7d506c865cec3505ac..4bee86845caf2cb69fad9889c5f6445ebe1eb12f 100644 (file)
@@ -3,11 +3,6 @@
     <tr>
         <td style="width:100%;vertical-align:top;">
             <h2>{t}DNS take over initiated{/t}</h2>
-            {$warning}
-            {t}This includes 'all' DNS zones that are located within this server. Please double check if your really want to do this.{/t}
-            <p>
-            {$warning2}
-            </p>
         </td>
     </tr>
 </table>