Code

Updated trunk with dns problem patch
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Sep 2007 13:32:27 +0000 (13:32 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 Sep 2007 13:32:27 +0000 (13:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7241 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_cache_handler.inc
include/class_dhcpPlugin.inc
plugins/admin/systems/class_dhcpAdvanced.inc
plugins/admin/systems/class_dhcpGroup.inc
plugins/admin/systems/class_dhcpHost.inc
plugins/admin/systems/class_dhcpNetwork.inc
plugins/admin/systems/class_dhcpPool.inc
plugins/admin/systems/class_dhcpService.inc
plugins/admin/systems/class_dhcpSharedNetwork.inc
plugins/admin/systems/class_dhcpSubnet.inc
plugins/personal/posix/posix_groups.tpl

index 77b11f7e039939fe86f133f994cc7baa821ce80b..fd47ec861e21926b9c56b71cb041aad90bf9994f 100644 (file)
@@ -4,7 +4,7 @@ class gosa_cache
 {
   var $c_memcache = NULL;
   var $b_connected= FALSE; 
-  
+
   function __construct()
   {
     $this->connect();
@@ -16,7 +16,7 @@ class gosa_cache
     $this->close();
     if(class_exists("Memcache")){
       $this->c_memcache = new Memcache;
-      $res = $this->c_memcache->connect("localhost",11211);
+      $res = $this->c_memcache->pconnect("localhost",11211);
       if(!$res){
         $this->b_connected = FALSE;
         $this->c_memcache  = NULL;
index b9d48b25fa2b01a92e0d8b1f6a1b2034a5ffe2b3..a28e3958a2a6b43ece96678c285dadf2f1e921e3 100644 (file)
@@ -195,6 +195,14 @@ class dhcpPlugin extends plugin
     $this->removeAttrs($name, 'dhcpStatement');
   }
 
+
+  function fix_options()
+  {
+    foreach (array('domain-name-servers') as $key){
+      unset ($this->options[$key]);
+    }
+  }
+
 }
 
 ?>
index 74094f73c83c421e4ab14fe723028893fec284cc..4e2cae5daabea7f2734529d6352551b71705780a 100644 (file)
@@ -130,7 +130,7 @@ class dhcpAdvanced extends plugin
 
   function setAutoOptions($addopt= array())
   {
-    $options= array("routers", "domain-name", "subnet-mask", "broadcast-address");
+    $options= array("routers", "domain-name", "domain-name-servers", "subnet-mask", "broadcast-address");
     $this->autoOptions= array_merge($options, $addopt);
   }
 
index 47369286e9682fd73cdab0004d58d9dfe1f3e5ff..eb61c48225a8b32e98a8bdd2bbc11c06f30937ed 100644 (file)
@@ -38,6 +38,7 @@ class dhcpGroup extends dhcpPlugin
     $display= $smarty->fetch (get_template_path('dhcp_group.tpl', TRUE)).$this->network->execute();
 
     /* Merge arrays for advanced view */
+    $this->fix_options();
     foreach (array("options", "statements") as $type){
       $this->advanced->$type= $this->$type + $this->network->$type;
     }
index c6ce4dacf93e512be0409d9489ce75c44c781f07..13d0024284e1671034b17a35814c7e3cd755fa60 100644 (file)
@@ -66,10 +66,10 @@ class dhcpHost extends dhcpPlugin
     $display= $smarty->fetch(get_template_path('dhcp_host.tpl', TRUE)).$this->network->execute();
 
     /* Merge arrays for advanced view */
+    $this->fix_options();
     foreach (array("options", "statements") as $type){
       $this->advanced->$type= $this->$type + $this->network->$type;
     }
-
     $display.= $this->advanced->execute();
 
     /* Merge back for removals */
index a8c751a72df9520f754822f3a6ce7eaed959a94d..fc73234e4123a3acd154493938d125526d03c342 100644 (file)
@@ -48,6 +48,7 @@ class dhcpNetwork extends plugin
           }
         }
         $servers[get_post('addserver')]= get_post('addserver');
+
         $tmp= "";
         foreach($servers as $val){
           $tmp.= $val.",";
index d001c0663b7faefdfcf46ba06dc7b25ec525fd1c..57330fe331eaf8498d3028e9460e14ea82565fcb 100644 (file)
@@ -53,6 +53,7 @@ class dhcpPool extends dhcpPlugin
     $display= $smarty->fetch(get_template_path('dhcp_pool.tpl', TRUE)).$this->network->execute();
 
     /* Merge arrays for advanced view */
+    $this->fix_options();
     foreach (array("options", "statements") as $type){
       $this->advanced->$type= $this->$type + $this->network->$type;;
     }
index 477accb7ece67d002d7c3d98002e2605a764bdcc..b3d7e0b0bc8624f3573c1b2cf7ba651650d58d31 100644 (file)
@@ -77,6 +77,7 @@ class dhcpService extends dhcpPlugin
     $display= $smarty->fetch(get_template_path('dhcp_service.tpl', TRUE)).$this->network->execute();
 
     /* Merge arrays for advanced view */
+    $this->fix_options();
     foreach (array("options", "statements") as $type){
       $this->advanced->$type= $this->$type + $this->network->$type;;
     }
index 9e1f7e43b56a5047e159f2e64e540fd2505d1269..ae4f0db627ab8b82b47dab071ae81c12f8b1b391 100644 (file)
@@ -71,6 +71,7 @@ class dhcpSharedNetwork extends dhcpPlugin
     $display= $smarty->fetch(get_template_path('dhcp_sharedNetwork.tpl', TRUE)).$this->network->execute();
 
     /* Merge arrays for advanced view */
+    $this->fix_options();
     foreach (array("options", "statements") as $type){
       $this->advanced->$type= $this->$type + $this->network->$type;
     }
index ce1c4c164a75aa61abe17e8e3dbd5279472d3a03..82fbad90405cb5c069020478d658626cf00d1c11 100644 (file)
@@ -72,6 +72,7 @@ class dhcpSubnet extends dhcpPlugin
     $display= $smarty->fetch(get_template_path('dhcp_subnet.tpl', TRUE)).$this->network->execute();
 
     /* Merge arrays for advanced view */
+    $this->fix_options();
     foreach (array("options", "statements") as $type){
       $this->advanced->$type= $this->$type + $this->network->$type;
     }
index 3a487274e7495afe8a150b894a6bcbabee8ba762..841d8a87a93f223b73cee0169cd18334a53aafc8 100644 (file)
                                        </tr>
                                </table>
                                <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
-                    <tr>
-                                               <td>
-                                                       <input type="checkbox" name="SubSearch" value="1" {$SubSearchCHK}
-                                                               onClick="mainform.submit();">
-                                                       {t}Search in subtrees{/t}
-                                               </td>
-                                       </tr>
-                </table>
-                               <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
                                        <tr>
                                                <td width="50%">
                                                        <img alt="" src="{$search_image}" align=middle>&nbsp;{t}Display groups matching{/t}
                                                </td>
                                        </tr>
                                </table>
+                               <table summary="" width="100%" style="border-top:1px solid #B0B0B0;background-color:#F8F8F8">
+                    <tr>
+                                               <td>
+                                                       <input type="checkbox" name="SubSearch" value="1" {$SubSearchCHK}
+                                                               onClick="mainform.submit();">
+                                                       {t}Search in subtrees{/t}
+                                               </td>
+                                       </tr>
+                </table>
                           {$apply}
                        </div>
                </td>