From: hickert Date: Mon, 24 Sep 2007 13:53:06 +0000 (+0000) Subject: Updated checks for sub dialogs. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f30bbc24410b0c4fe48f5416512251f967aa8972;p=gosa.git Updated checks for sub dialogs. 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 --- diff --git a/plugins/addons/gotomasses/class_goto_task.inc b/plugins/addons/gotomasses/class_goto_task.inc index 27684b094..d151e84a1 100644 --- a/plugins/addons/gotomasses/class_goto_task.inc +++ b/plugins/addons/gotomasses/class_goto_task.inc @@ -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()); } diff --git a/plugins/admin/fai/class_faiHook.inc b/plugins/admin/fai/class_faiHook.inc index fb8fa4e53..d9e0f2d13 100644 --- a/plugins/admin/fai/class_faiHook.inc +++ b/plugins/admin/fai/class_faiHook.inc @@ -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); diff --git a/plugins/admin/fai/class_faiPartitionTable.inc b/plugins/admin/fai/class_faiPartitionTable.inc index df1b8a53e..aa5c27c27 100644 --- a/plugins/admin/fai/class_faiPartitionTable.inc +++ b/plugins/admin/fai/class_faiPartitionTable.inc @@ -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()); } diff --git a/plugins/admin/fai/class_faiProfile.inc b/plugins/admin/fai/class_faiProfile.inc index 361cb8afd..19ae476c5 100644 --- a/plugins/admin/fai/class_faiProfile.inc +++ b/plugins/admin/fai/class_faiProfile.inc @@ -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()); } diff --git a/plugins/admin/fai/class_faiScript.inc b/plugins/admin/fai/class_faiScript.inc index bb0477613..243fdef95 100644 --- a/plugins/admin/fai/class_faiScript.inc +++ b/plugins/admin/fai/class_faiScript.inc @@ -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); diff --git a/plugins/admin/fai/class_faiTemplate.inc b/plugins/admin/fai/class_faiTemplate.inc index a57c7c084..5b166123c 100644 --- a/plugins/admin/fai/class_faiTemplate.inc +++ b/plugins/admin/fai/class_faiTemplate.inc @@ -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); diff --git a/plugins/admin/fai/class_faiVariable.inc b/plugins/admin/fai/class_faiVariable.inc index 56fd969f0..f52917cda 100644 --- a/plugins/admin/fai/class_faiVariable.inc +++ b/plugins/admin/fai/class_faiVariable.inc @@ -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); diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index 28c683586..18a5a0dc5 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -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 { diff --git a/plugins/admin/systems/class_servDNSeditZone.inc b/plugins/admin/systems/class_servDNSeditZone.inc index d1326ba92..4bf1a422e 100644 --- a/plugins/admin/systems/class_servDNSeditZone.inc +++ b/plugins/admin/systems/class_servDNSeditZone.inc @@ -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()); } diff --git a/plugins/admin/systems/class_termDNS.inc b/plugins/admin/systems/class_termDNS.inc index 79c26bfdb..9b067c0f7 100644 --- a/plugins/admin/systems/class_termDNS.inc +++ b/plugins/admin/systems/class_termDNS.inc @@ -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()); } diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 99e78e08c..2d90fd0ba 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -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();