Code

Applying fix for Trac #2090 from Sebastian Harl
authorpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Jun 2009 10:22:40 +0000 (10:22 +0000)
committerpsc <psc@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Jun 2009 10:22:40 +0000 (10:22 +0000)
- Fix wrong mountpoint display and wrong partition type,
by setting mountpoint explicit to - (as required for FAI)
- Fix undo of preserve Flag by setting FAIpartitionFlags to
" " explicit

git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@13742 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index 0efc24c103d918707367f568079cf81cc2846e8c..f583fec839a3498fa7bc35b92666cd43b37a3734 100644 (file)
@@ -272,13 +272,13 @@ class faiPartitionTableEntry extends plugin
                                  "changeState('FAIfsOptions_".$key."') ; \"";
   
         if($this->acl_is_writeable("FAIpartitionFlags")){
-          if($part['FAIpartitionFlags']!=false){
+          if($part['FAIpartitionFlags']=="preserve"){
             $str .= "\n<td><input type='checkbox' name='FAIpartitionFlags_".$key."' value='preserve' checked ".$changeState." ".$disableALL."></td>";
           }else{
             $str .= "\n<td><input type='checkbox' name='FAIpartitionFlags_".$key."' value='preserve' ".$changeState." ".$disableALL."></td>";
           }
         }else{
-          if($part['FAIpartitionFlags']!=false){
+          if($part['FAIpartitionFlags']=="preserve"){
             $str .= "<td>"._("False")."</td>";
           }else{
             $str .= "<td>"._("True")."</td>";
@@ -346,6 +346,10 @@ class faiPartitionTableEntry extends plugin
               $this->partitions[$key][$attrs] = false;
             }
           }
+
+          if(!$this->partitions[$key]['FAIpartitionFlags']){
+            $this->partitions[$key]['FAIpartitionFlags'] = " ";
+          }
         }
 
         /* Adapt ext3 to have -j option */
@@ -388,6 +392,7 @@ class faiPartitionTableEntry extends plugin
   
       /* Skip all checks, if preserve is set */ 
       if($part['FAIpartitionFlags'] == "preserve"){
+        $this->partitions[$key]['FAImountPoint']    = "-";
         $this->partitions[$key]['FAIfsType']        = "preserve";
         $this->partitions[$key]['FAIpartitionSize'] = "preserve";
         continue;