Code

Updated checks for sub dialogs.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Sep 2007 13:53:06 +0000 (13:53 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 24 Sep 2007 13:53:06 +0000 (13:53 +0000)
if($this->dialog) will return true, also when it is not a valid dialog.
Added is_object() to all those checks

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7392 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/gotomasses/class_goto_task.inc
plugins/admin/fai/class_faiHook.inc
plugins/admin/fai/class_faiPartitionTable.inc
plugins/admin/fai/class_faiProfile.inc
plugins/admin/fai/class_faiScript.inc
plugins/admin/fai/class_faiTemplate.inc
plugins/admin/fai/class_faiVariable.inc
plugins/admin/groups/class_groupApplication.inc
plugins/admin/systems/class_servDNSeditZone.inc
plugins/admin/systems/class_termDNS.inc
plugins/personal/environment/class_environment.inc

index 27684b0947b3e3a71d9522cbca4a4bb49d37b9ed..d151e84a1007fbfcd1d430e7439dd9408e39be75 100644 (file)
@@ -182,7 +182,7 @@ class goto_task extends plugin
     }
 
     /* Display object Listing */
-    if($this->dialog){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       return($this->dialog->execute());
     }
index fb8fa4e531e0aa2a9f6be41bfd6654b3df23c722..d9e0f2d134ffcb0a1eaa3efb49293c68c107a291 100644 (file)
@@ -290,7 +290,7 @@ class faiHook extends plugin
     }
 
     /* Print dialog if $this->dialog is set */
-    if($this->dialog){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       $display = $this->dialog->execute();
       return($display);
index df1b8a53e5b5ed0d6858e9a5b6dd65b5d2c9b23b..aa5c27c2701b16c928390284bad4a8734ccb7e2f 100644 (file)
@@ -262,7 +262,7 @@ class faiPartitionTable extends plugin
 
     /* Display dialog if one is defined
      */
-    if(isset($this->dialog)){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       return($this->dialog->execute());
     }
index 361cb8afd5fa712b2fd5dab64e75150ff3787490..19ae476c533ae076e84e846dafdd57b26bbfe2c7 100644 (file)
@@ -288,7 +288,7 @@ class faiProfile extends plugin
       $this->dialog=NULL;
     }
 
-    if(isset($this->dialog)){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       return($this->dialog->execute());
     }
index bb0477613aa67d5a411d09cd696f6c5b2151bf3e..243fdef9554458236feee2cf39c59c8c700cb0ac 100644 (file)
@@ -305,7 +305,7 @@ class faiScript extends plugin
     }
 
     /* Print dialog if $this->dialog is set */
-    if($this->dialog){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       $display = $this->dialog->execute();
       return($display);
index a57c7c084353edf7a68604a4b46356b986a046f4..5b166123cf4513056878d567b93553fcc22e9285 100644 (file)
@@ -265,7 +265,7 @@ class faiTemplate extends plugin
     }
 
     /* Print dialog if $this->dialog is set */
-    if($this->dialog){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       $display = $this->dialog->execute();
       return($display);
index 56fd969f0e3fa3820d037f3e5c1bdc6dc199c363..f52917cda96419e81c37c1da9005ac2bd9da7711 100644 (file)
@@ -209,7 +209,7 @@ class faiVariable extends plugin
     }
 
     /* Print dialog if $this->dialog is set */
-    if($this->dialog){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       $display = $this->dialog->execute();
       return($display);
index 28c683586c2f6660f2a2616496d846028ed82a27..18a5a0dc5b15e725412d2f18d3ea2cc80cccbccc 100644 (file)
@@ -840,7 +840,7 @@ class appgroup extends plugin
     }
 
     /* Show main page */
-    if ($this->dialog){
+    if (is_object($this->dialog)){
       $smarty->assign("table", $this->table);
       $display.= $smarty->fetch (get_template_path('application_options.tpl', TRUE,dirname(__FILE__)));
     } else {
index d1326ba9252b511a579f8c32681f3f47c080df44..4bf1a422eca4529efcd9c74088928d18538ce846 100644 (file)
@@ -249,7 +249,7 @@ class servdnseditZone extends plugin
 
     /* Display any type of open dialogs 
      */
-    if($this->dialog){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       return($this->dialog->execute());
     }
index 79c26bfdb39eef0202f9e208d7523a61871471bf..9b067c0f7bd8aea175ff92b62e3f8c660dbac780 100644 (file)
@@ -248,7 +248,7 @@ class termDNS extends plugin
       }
     }
 
-    if(isset($this->dialog) && $this->dialog != FALSE){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       return($this->dialog->execute());
     }
index 99e78e08c767caa191974b105fc577325002fb67..2d90fd0ba680e107507c653a08f289806b58939e 100644 (file)
@@ -914,7 +914,7 @@ class environment extends plugin
     $smarty->assign("gotoPrinterKeys",array_flip($this->printOutPrinterDevices()));
 
     /* General behavior */
-    if((isset($this->dialog))&&($this->dialog!==NULL)&&(!empty($this->dialog))){
+    if(is_object($this->dialog)){
       $this->dialog->save_object();
       $disp =$this->dialog->execute();