summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0c5b753)
raw | patch | inline | side by side (parent: 0c5b753)
| author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
| Mon, 10 Sep 2007 08:29:12 +0000 (08:29 +0000) | ||
| committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
| Mon, 10 Sep 2007 08:29:12 +0000 (08:29 +0000) | 
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7235 594d385d-05f5-0310-b6e9-bd551577e9d8
| plugins/admin/systems/class_servDHCP.inc | patch | blob | history | |
| plugins/admin/systems/servdhcp.tpl | patch | blob | history | 
index 69f6d9547296a9330576fdfc01cc4001f526821f..ce22ef93a121ed058529c2dbe1a3bc1f0a1e3d2e 100644 (file)
     $ldap->cd($this->config->current['BASE']);
     $ldap->search("(&(objectClass=goServer)(dhcpServiceDN=*))",array("dn","cn","dhcpServiceDN"));
     while($attrs = $ldap->fetch()){
+
+      /* Skip own config */
+      if($this->dn != "new" && preg_match("/".normalizePreg($this->dn)."$/",$attrs['dn'])){
+        continue;
+      }
+  
       $ret['ENTRIES'][] = $attrs;
     }
     foreach($ret['ENTRIES'] as $key => $data){
     /* Give smarty the required informations */
     $smarty->assign("dhcp_server_list", $this->dhcp_server_list['FOR_LIST']);
+    $smarty->assign("dhcp_server_list_cnt", count($this->dhcp_server_list['FOR_LIST']));
     /* Take over requested, save id */
     if(isset($_POST['take_over_src']) && isset($_POST['take_over'])){
index 69331f271063e26bd92017569d1f53ac0436674f..1c2e4433225dbd1e381f635754b0742e15f25901 100644 (file)
 </table>
 {else}
 <table summary="" width="100%">
+{if $dhcp_server_list_cnt}
 <tr>
        <td style="width:100%;vertical-align:top;">
                <b>{t}Take over dhcp configuration from following server{/t}</b> 
                <input type="submit" name="take_over" value="{t}Apply{/t}">
        </td>
 </tr>
+{/if}
 <tr>
        <td style="width:100%;vertical-align:top;">
        <h2>{t}DHCP sections{/t}</h2>
![[tokkee]](http://tokkee.org/images/avatar.png)
