Code

Updated partitions
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Mar 2010 13:34:28 +0000 (13:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 30 Mar 2010 13:34:28 +0000 (13:34 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17399 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_faiPartitionTable.inc
gosa-plugins/fai/admin/fai/class_faiPartitionTableEntry.inc

index bde911a0a0a0ec9bc3b94a467a66f3dcbd853811..2087089f4cebb505e563a1c75d0caf8efca43b1a 100644 (file)
@@ -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());
         }
index 5bacf93e02bdc5b227e2bdc92e776e230637a622..dc743d1725b331d7b56cf8f6433b83a5ce7ba079 100644 (file)
@@ -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;