phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.163,1.164


From: Bettina Gille <address@hidden>
Subject: [Phpgroupware-cvs] CVS: phpgwapi/inc class.common.inc.php,1.163,1.164
Date: Thu, 17 Oct 2002 20:21:21 -0400

Update of /cvsroot/phpgroupware/phpgwapi/inc
In directory subversions:/tmp/cvs-serv18704

Modified Files:
        class.common.inc.php 
Log Message:
update msgbox to use xslt/fixed msgbox tpl error within apps

Index: class.common.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgwapi/inc/class.common.inc.php,v
retrieving revision 1.163
retrieving revision 1.164
diff -C2 -r1.163 -r1.164
*** class.common.inc.php        6 Oct 2002 03:06:03 -0000       1.163
--- class.common.inc.php        18 Oct 2002 00:20:53 -0000      1.164
***************
*** 994,998 ****
                */
  
!               function msgbox($text='',$type=True,$output='return')
                {
                        if($output != 'return')
--- 994,1074 ----
                */
  
!               function msgbox($text='',$type=True)
!               {
!                       if ($text=='' && 
@isset($GLOBALS['phpgw_info']['flags']['msgbox_data']))
!                       {
!                               $text = 
$GLOBALS['phpgw_info']['flags']['msgbox_data'];
!                               
unset($GLOBALS['phpgw_info']['flags']['msgbox_data']);
!                       }
!                       elseif($text=='')
!                       {
!                               return;
!                       }
! 
!               //      $GLOBALS['phpgw']->xslttpl->add_file(array('msgbox'));
!                       
$GLOBALS['phpgw']->xslttpl->add_file(array($GLOBALS['phpgw']->common->get_tpl_dir('phpgwapi','default')
 . SEP . 'msgbox'));
! 
!                       $prev_helper = 
$GLOBALS['phpgw']->translation->translator_helper;
!                       $GLOBALS['phpgw']->translation->translator_helper = '';
! 
!                       if (is_array($text))
!                       {
!                               reset($text);
! 
!                       //_debug_array($text);
!                               while (list($key,$value) = each($text))
!                               {
!                                       if ($value == True)
!                                       {
!                                               $img    = 
$this->image('phpgwapi','msgbox_good');
!                                               $alt    = lang('OK');
!                                       }
!                                       else
!                                       {
!                                               $img    = 
$this->image('phpgwapi','msgbox_bad');
!                                               $alt    = lang('ERROR');
!                                       }
! 
!                                       $data['msgbox_data'][] = array
!                                       (
!                                               'msgbox_text'                   
        => lang($key),
!                                               'msgbox_img'                    
        => $img,
!                                               'msgbox_img_alt'                
        => $alt,
!                                               'lang_msgbox_statustext'        
=> $alt
!                                       );
!                               }
! 
!                       //_debug_array($data);
! 
!                       }
!                       else
!                       {
!                               if ($type == True)
!                               {
!                                       $img    = 
$this->image('phpgwapi','msgbox_good');
!                                       $alt    = lang('OK');
!                               }
!                               else
!                               {
!                                       $img    = 
$this->image('phpgwapi','msgbox_bad');
!                                       $alt    = lang('ERROR');
!                               }
! 
!                               $data['msgbox_data'] = array
!                               (
!                                       'msgbox_text'                           
=> lang($text),
!                                       'msgbox_img'                            
=> $img,
!                                       'msgbox_img_alt'                        
=> $alt,
!                                       'lang_msgbox_statustext'        => $alt
!                               );
!                       }
! 
!                       $GLOBALS['phpgw']->translation->translator_helper = 
$prev_helper;
! 
!                       $GLOBALS['phpgw']->xslttpl->set_var('msgbox',$data);
!                       return $GLOBALS['phpgw']->xslttpl->parse();
!               }
! 
!               /*function msgbox($text='',$type=True,$output='return')
                {
                        if($output != 'return')
***************
*** 1014,1017 ****
--- 1090,1094 ----
                                return;
                        }
+ 
                        
$GLOBALS['phpgw']->template->set_block('msgbox','msgbox_start');
                        
$GLOBALS['phpgw']->template->set_block('msgbox','msgbox_row');
***************
*** 1077,1081 ****
                                return 
$GLOBALS['phpgw']->template->varvals[$output];
                        }
!               }
  
                /*!
--- 1154,1158 ----
                                return 
$GLOBALS['phpgw']->template->varvals[$output];
                        }
!               }*/
  
                /*!
***************
*** 1280,1286 ****
                        {
                                define('PHPGW_HEADER_RAN',True);
-                               $this->msgbox('',False,'phpgw_msgbox');
                                $this->get_css_url();
                                $this->load_phpgw_body_tags();
                                
$GLOBALS['phpgw']->template->set_block('phpgw','phpgw_head_javascript');
                                
$GLOBALS['phpgw']->template->pfp('out','phpgw_main_start');
--- 1357,1363 ----
                        {
                                define('PHPGW_HEADER_RAN',True);
                                $this->get_css_url();
                                $this->load_phpgw_body_tags();
+                               
$GLOBALS['phpgw']->template->set_var('phpgw_msgbox',$this->msgbox());
                                
$GLOBALS['phpgw']->template->set_block('phpgw','phpgw_head_javascript');
                                
$GLOBALS['phpgw']->template->pfp('out','phpgw_main_start');





reply via email to

[Prev in Thread] Current Thread [Next in Thread]