summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 90a15bb)
raw | patch | inline | side by side (parent: 90a15bb)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Aug 2007 11:00:39 +0000 (11:00 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 9 Aug 2007 11:00:39 +0000 (11:00 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7028 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/systems/class_dhcpAdvanced.inc b/plugins/admin/systems/class_dhcpAdvanced.inc
index 271c4ed6e2f8b92a3501042f4ba6fa0292df3720..74094f73c83c421e4ab14fe723028893fec284cc 100644 (file)
{
/* Check for interaction */
if (isset($_POST['add_statement']) && $_POST['addstatement'] != ""){
- $key= preg_replace('/^([a-z0-9-]+)\s(.*)$/', '\\1', $_POST['addstatement']);
- $val= preg_replace("/^$key\s*/", '', $_POST['addstatement']);
+ $key= preg_replace('/^([a-z0-9-]+)\s(.*)$/', '\\1', get_post('addstatement'));
+ $val= preg_replace("/^$key\s*/", '', get_post('addstatement'));
$this->statements[$key]= $val;
}
if (isset($_POST['delete_statement']) && isset($_POST['dhcpstatements'])){
- $key= preg_replace('/([a-z0-9-]+)\s(.*)$/', '\\1', $_POST['dhcpstatements']);
+ $key= preg_replace('/([a-z0-9-]+)\s(.*)$/', '\\1', get_post('dhcpstatements'));
if (in_array($key, $this->autoStatements)){
print_red(_("Can't delete automatic statements. Please use the fields above."));
} else {
}
}
if (isset($_POST['add_option']) && $_POST['addoption'] != ""){
- $key= preg_replace('/^([a-z0-9-]+)\s(.*)$/', '\\1', $_POST['addoption']);
- $val= preg_replace("/^$key\s*/", '', $_POST['addoption']);
+ $key= preg_replace('/^([a-z0-9-]+)\s(.*)$/', '\\1', get_post('addoption'));
+ $val= preg_replace("/^$key\s*/", '', get_post('addoption'));
$this->options[$key]= $val;
}
if (isset($_POST['delete_option']) && isset($_POST['dhcpoptions'])){
- $key= preg_replace('/([a-z0-9-]+)\s(.*)$/', '\\1', $_POST['dhcpoptions']);
+ $key= preg_replace('/([a-z0-9-]+)\s(.*)$/', '\\1', get_post('dhcpoptions'));
if (in_array($key, $this->autoOptions)){
print_red(_("Can't delete automatic options. Please use the fields above."));
} else {
index 38c8421970ff27fe6e39c0a06ea30f8b6355d073..7e90215bfca6d1dd36fa9c398d36b77c45b6d8f8 100644 (file)
{
/* Save cn */
if (isset($_POST['cn'])){
- $this->cn= validate($_POST['cn']);
+ $this->cn= validate(get_post('cn'));
}
/* Handle global saving */
index 2adb6990af72c075d5070e60b708413f9133747b..5e9e00d22db84de518bae095f48336483cd8e601 100644 (file)
$this->dhcpHWaddress= $attrs['dhcpHWAddress'][0];
}
+ print_a($this);
+
$this->advanced->setAutoOptions(array("host-name"));
$this->advanced->setAutoStatements(array("fixed-address"));
}
if (isset($_POST['hwtype'])){
/* Assemble hwAddress */
- $this->dhcpHWAddress= $_POST['hwtype']." ".$_POST['dhcpHWAddress'];
- $this->cn= validate($_POST['cn']);
+ $this->dhcpHWAddress= get_post('hwtype')." ".get_post('dhcpHWAddress');
+ $this->cn= validate(get_post('cn'));
/* Save fixed address */
if ($_POST['fixedaddr'] != ""){
- $this->statements['fixed-address']= $_POST['fixedaddr'];
+ $this->statements['fixed-address']= get_post('fixedaddr');
} else {
unset ($this->statements['fixed-address']);
}
diff --git a/plugins/admin/systems/class_dhcpNetwork.inc b/plugins/admin/systems/class_dhcpNetwork.inc
index 9cef322e7e4eb4611d56565e62c5399974d8a3ef..76cc6fe9ac061c17a39feba63cbd1ff794fd018d 100644 (file)
{
/* Check for iteraction */
if (isset($_POST['add_dns']) && $_POST['addserver'] != ""){
- if (!preg_match('/^[0-9a-z.-]+$/', $_POST['addserver'])){
+ if (!preg_match('/^[0-9a-z.-]+$/', get_post('addserver'))){
print_red(_("The name of the DNS server your're going to add is not valid!"));
} else {
$servers= array();
$servers[$val]= $val;
}
}
- $servers[$_POST['addserver']]= $_POST['addserver'];
+ $servers[get_post('addserver')]= get_post('addserver');
$tmp= "";
foreach($servers as $val){
$tmp.= $val.",";
}
}
if (isset($_POST['delete_dns']) && isset($_POST['dnsserver'])){
- $tmp= preg_replace("/(\s*,\s*)?".$_POST['dnsserver']."/i", '',
+ $tmp= preg_replace("/(\s*,\s*)?".get_post('dnsserver')."/i", '',
$this->options['domain-name-servers']);
$tmp= preg_replace("/(\s*)?,(\s*)?$/", '', $tmp);
if ($tmp != ""){
if ($_POST["$val"] == ''){
unset($this->options["$key"]);
} else {
- $this->options["$key"]= $_POST["$val"];
+ $this->options["$key"]= get_post("$val");
}
}
if ($_POST["$val"] == ''){
unset($this->statements["$key"]);
} else {
- $this->statements["$key"]= '"'.$_POST["$val"].'"';
+ $this->statements["$key"]= '"'.get_post("$val").'"';
}
}
index d1c016d58b3b3c385f84ae61fe06714bb6d252c3..1083a7872283d6bf57124b9c974e72ed073ca6f1 100644 (file)
function save_object()
{
if (isset($_POST['cn'])){
- $this->cn= validate($_POST['cn']);
- $this->range_start= validate($_POST['range_start']);
- $this->range_stop= validate($_POST['range_stop']);
+ $this->cn= validate(get_post('cn'));
+ $this->range_start= validate(get_post('range_start'));
+ $this->range_stop= validate(get_post('range_stop'));
}
dhcpPlugin::save_object();
diff --git a/plugins/admin/systems/class_dhcpService.inc b/plugins/admin/systems/class_dhcpService.inc
index c4a0a7e2cd391ce6296735cbe067b3500c1a8426..6faa7caa33c31389ebdb14ffd609cc6b074c054c 100644 (file)
foreach (array('max_lease_time', 'default_lease_time', 'ddns_update_style') as $val){
$tval= preg_replace('/_/', '-', $val);
if ($_POST[$val] != ""){
- $this->statements[$tval]= validate($_POST[$val]);
+ $this->statements[$tval]= validate(get_post($val));
} else {
unset ($this->statements[$tval]);
}
diff --git a/plugins/admin/systems/class_dhcpSharedNetwork.inc b/plugins/admin/systems/class_dhcpSharedNetwork.inc
index 0f9e54e9e39dc7eb3b0491b0f7b6bba3fea65cc1..03154b3401dc870e3151a83b1972432714586f54 100644 (file)
function save_object()
{
if (isset($_POST['cn'])){
- $this->cn= validate($_POST['cn']);
+ $this->cn= validate(get_post('cn'));
dhcpPlugin::save_object();
foreach (array("server-identifier", "default-lease-time",
"max-lease-time", "min-lease-time") as $attr){
if (isset($_POST[$attr]) && $_POST[$attr] != ""){
- $this->statements[$attr]= $_POST[$attr];
+ $this->statements[$attr]= get_post($attr);
} else {
unset($this->statements[$attr]);
}
diff --git a/plugins/admin/systems/class_dhcpSubnet.inc b/plugins/admin/systems/class_dhcpSubnet.inc
index 2620a7be0b411084d43088f88daa081f3649a6ed..0f3c712b00573d93ae2e0ddf4c140d6f2024da1a 100644 (file)
{
if(isset($_POST['dhcp_subnet_posted'])){
if (isset($_POST['cn'])){
- $this->cn= validate($_POST['cn']);
+ $this->cn= validate(get_post('cn'));
}
if (isset($_POST['dhcp_netmask'])){
- $this->dhcpNetMask= validate($_POST['dhcp_netmask']);
+ $this->dhcpNetMask= validate(get_post('dhcp_netmask'));
}
if (isset($_POST['use_range'])){
$this->use_range= TRUE;
- $this->range_start= validate($_POST['range_start']);
- $this->range_stop= validate($_POST['range_stop']);
+ $this->range_start= validate(get_post('range_start'));
+ $this->range_stop= validate(get_post('range_stop'));
} else {
$this->use_range= FALSE;
}