Code

Fixed problem with different dialog types
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 17 Mar 2006 11:09:55 +0000 (11:09 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 17 Mar 2006 11:09:55 +0000 (11:09 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2858 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index 6870431ba8cc71cb14c0b58a9adec9a3925df943..9fe4453df7ed071c9789db78b33895ee7357b83e 100644 (file)
@@ -39,6 +39,7 @@ class printgeneric extends plugin
   var $dialog           =NULL;
 
   var $netConfigDNS;
+  var $baseSelection    = false;
 
   /* attribute list for save action */
   var $attributes     = array("cn", "description", "l", "labeledURI", "gotoPrinterPPD","gotoUserPrinter");
@@ -253,6 +254,7 @@ class printgeneric extends plugin
         $once = false;
         $this->dialog = new baseSelectDialog($this->config);
         $this->dialog->setCurrentBase($this->base);
+        $this->baseSelection = true;
       }
     }
 
@@ -260,14 +262,17 @@ class printgeneric extends plugin
     if(is_object($this->dialog)){
       /* Must be called before save_object */
       $this->dialog->save_object();
-
-      if($this->dialog->isClosed()){
-        $this->dialog = false;
-      }elseif($this->dialog->isSelected()){
-        $this->base = $this->dialog->isSelected();
-        $this->dialog= false;
-      }else{
-        return($this->dialog->execute());
+      if($this->baseSelection){
+        if($this->dialog->isClosed()){
+          $this->dialog = false;
+          $this->baseSelection = false;
+        }elseif($this->dialog->isSelected()){
+          $this->base = $this->dialog->isSelected();
+          $this->dialog= false;
+          $this->baseSelection = false;
+        }else{
+          return($this->dialog->execute());
+        }
       }
     }