From: hickert Date: Tue, 30 Mar 2010 13:34:28 +0000 (+0000) Subject: Updated partitions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=743e6f251a2909137636a57e6875e40d4899e3e2;p=gosa.git Updated partitions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17399 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc index bde911a0a..2087089f4 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc @@ -181,8 +181,8 @@ class faiPartitionTable extends plugin /* New Listhandling */ foreach($_POST as $name => $value){ - if(preg_match("/^edit_/",$name)){ - $s_entry = preg_replace("/^edit_/","",$name); + if(preg_match("/^editEntry_/",$name)){ + $s_entry = preg_replace("/^editEntry_/","",$name); $s_entry = postDecode($s_entry); $s_action = "edit"; break; @@ -389,7 +389,7 @@ class faiPartitionTable extends plugin $acl = $this->ui->get_permissions($dn,"fai/faiPartitionTableEntry"); if(preg_match("/(r|w)/",$acl)) { - $act .= image('images/lists/edit.png','edit_%s',msgPool::editButton()); + $act .= image('images/lists/edit.png','editEntry_%s',msgPool::editButton()); if(preg_match("/d/",$acl) && !preg_match("/freeze/", $this->FAIstate)){ $act .= image('images/lists/trash.png','delete_%s',msgPool::delButton()); } diff --git a/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc b/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc index 5bacf93e0..dc743d172 100644 --- a/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc +++ b/gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc @@ -375,12 +375,13 @@ class faiPartitionTableEntry extends plugin } $tmp = explode("-",$part['FAIpartitionSize']); + switch (count($tmp)){ case 0: $message[]= msgPool::invalid(sprintf(_("partition %s size"),$key)); break; case 1: - if (!tests::is_id($tmp[0]) &&(!empty($tmp[1]))){ + if (!tests::is_id($tmp[0]) || empty($tmp[0])){ $message[]= msgPool::invalid(sprintf(_("partition %s size"),$key)); } break;