Code

Updated msg_dialog
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 27 Sep 2007 13:25:44 +0000 (13:25 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 27 Sep 2007 13:25:44 +0000 (13:25 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7427 594d385d-05f5-0310-b6e9-bd551577e9d8

ihtml/themes/default/msg_dialog.tpl
include/class_msg_dialog.inc
include/functions_debug.inc
plugins/admin/users/class_userManagement.inc

index 654453dcec6301fb3a5afa660c69ad68c3e7714e..3d870e7284d6a537da41c628892e3aaa90524c44 100644 (file)
 
 {/if}
 {else}
+
+       {if $s_Trace != ""}
+       <div id='trace_{$i_ID}' style='visibility:hidden;'>
+               {$s_Trace}
+       </div>
+       
+       {/if}
+
        <div id='e_layer{$i_ID}'
                        style='
                                width:60%;
                                        <br>
                                        <br>
                                </td>
+                               {if $s_Trace}
+                               <td style='width:20px; vertical-align:top; cursor:pointer;'>
+                                       <div onClick="toggle('trace_{$i_ID}')"><u>Trace</u></div>
+                               </td>
+                               {/if}
                        </tr>
                        <tr>
                                <td colspan='2' align='center'>
index d166ad328fa91ac3f7f18db8568af49f7ac9757d..b72e61b4e1f85f029540d67b10bec9e5ac9d2b55 100644 (file)
@@ -11,6 +11,7 @@ class msg_dialog
        private $s_Message      = "Undefined";
        private $i_Type         = INFO_DIALOG ;
        private $i_ID           = 0;
+       private $a_Trace        = array();
 
        public function __construct($s_title,$s_message,$i_type)
        {
@@ -23,6 +24,7 @@ class msg_dialog
                $this->s_Title   = $s_title;
                $this->s_Message = $s_message;
                $this->i_Type    = $i_type;
+               $this->a_Trace   = debug_backtrace();
                if(!isset($_SESSION['msg_dialogs'])){
                        $_SESSION['msg_dialogs'] = array();
                }
@@ -31,7 +33,7 @@ class msg_dialog
 
        public static function display($s_title,$s_message,$i_type = INFO_DIALOG)
        {
-               $box = new msg_dialog($s_title,$s_message,$i_type);     
+               new msg_dialog($s_title,$s_message,$i_type);    
        }
 
        public function get_ID()
@@ -42,6 +44,7 @@ class msg_dialog
        public function execute()
        {
                $smarty = get_smarty();
+               $smarty->assign("s_Trace",print_a($this->a_Trace,TRUE));
                $smarty->assign("i_Type",$this->i_Type);
                $smarty->assign("s_Message",$this->s_Message);
                $smarty->assign("s_Title",$this->s_Title);
index 5e5c84f6ea9fe75306edacd177e3c1f1db11b00a..9c30cec399e8580bfde673549ad827acd33a2e99 100644 (file)
@@ -127,7 +127,7 @@ class Print_a_class {
                }
                
                # build a single table ... may be nested
-               $this->output .= '<table summary=\"\" style="border:none;" cellspacing="1" '.( !$iteration && $this->export_flag ? 'onClick="document.getElementById(\'pa_form_'.$this->export_hash.'\').submit();" )' : '' ).'>';
+               $this->output .= '<table summary="" style="border:none;" cellspacing="1" '.( !$iteration && $this->export_flag ? 'onClick="document.getElementById(\'pa_form_'.$this->export_hash.'\').submit();" )' : '' ).'>';
                foreach( $array as $key => $value ) {
                        
                        $value_style = 'color:black;';
@@ -276,7 +276,7 @@ function print_result($RESULT) {
                </script>
        ';
 
-       print '<table summary=\"\" border="0" bgcolor="#000000" cellspacing="1" cellpadding="1">';
+       print '<table summary="" border="0" bgcolor="#000000" cellspacing="1" cellpadding="1">';
        
        print '<tr>';
        foreach($tables as $tableName => $tableCount) {
index 2760cfab1c27eb51f812cb8a94eef462c5984f72..44c6dc30ad0d2d217558d87ffa2030ef57b32f80 100644 (file)
@@ -357,7 +357,9 @@ class userManagement extends plugin
 
       /* Confirmation for deletion has been passed. Users should be deleted. */
       if ($this->current_action == "del_multiple" && is_object($this->msg_dialog) && $this->msg_dialog->is_confirmed()){
-
+        
+        $this->current_action = "";  
+        
         /* Remove user by user and check acls before removeing them */
         foreach($this->dns as $key => $dn){
 
@@ -473,6 +475,8 @@ class userManagement extends plugin
     /* Confirmation for deletion has been passed. User should be deleted. */
     if ($this->current_action == "del" && is_object($this->msg_dialog) && $this->msg_dialog->is_confirmed()){
 
+      $this->current_action = ""; 
       /* Some nice guy may send this as POST, so we've to check
          for the permissions again. */