summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 01f1692)
raw | patch | inline | side by side (parent: 01f1692)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Jul 2008 06:35:09 +0000 (06:35 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 23 Jul 2008 06:35:09 +0000 (06:35 +0000) |
-Fixed Problem with checkboxes for Shared Networks.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11754 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11754 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPlugin.inc | patch | blob | history | |
gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSharedNetwork.inc | patch | blob | history |
diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPlugin.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpPlugin.inc
index ac8d0f86a81496ff030cc1191ce32d5ccc8ca6dd..f6b9f39b3c5d0e819e37e97b388cce5d35ae349e 100644 (file)
} else {
$value= preg_replace('/^[^\s]+\s/', '', $opt);
}
- $this->statements[$idx]= $value;
+
+ if(preg_match("/^allow\s/",$opt) || preg_match("/^deny\s/",$opt)){
+ $this->statements[$opt]= "";
+ }else{
+ $this->statements[$idx]= $value;
+ }
}
}
-
} else {
/* We keep the parent dn here if it's new */
$this->dn= $attrs;
}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>
diff --git a/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSharedNetwork.inc b/gosa-plugins/dhcp/admin/systems/services/dhcp/class_dhcpSharedNetwork.inc
index 15ead8eeb2d6196a84f9463c44509522dcd395db..a2b4d69f98aa5950f0a31a9d6b28d8e3a8ff06cd 100644 (file)
dhcpPlugin::dhcpPlugin($parent,$attrs);
$this->advanced->setAutoStatements(array("server-identifier", "default-lease-time",
- "max-lease-time", "min-lease-time", "authoritative", "deny-unknown-clients",
- "deny-bootp", "deny-booting"));
+ "max-lease-time", "min-lease-time", "authoritative", "deny unknown-clients",
+ "deny bootp", "deny booting", "allow unknown-clients",
+ "allow bootp", "allow booting"));
}
/* Merge arrays for advanced view */
$this->fix_options();
+
+ /* Remove states configured by checkboxes.
+ */
+ foreach(array("deny unknown-clients",
+ "deny bootp", "deny booting", "allow unknown-clients",
+ "allow bootp", "allow booting") as $name){
+ if(isset($this->advanced->statements[$name])){
+ unset($this->advanced->statements[$name]);
+ unset($this->network->statements[$name]);
+ }
+ }
+
foreach (array("options", "statements") as $type){
$this->advanced->$type= $this->$type + $this->network->$type;
}
}
+// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
?>