phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate.inc.php,1.44,1.4


From: Ralf Becker <address@hidden>
Subject: [Phpgroupware-cvs] CVS: etemplate/inc class.uietemplate.inc.php,1.44,1.45
Date: Tue, 15 Oct 2002 20:19:39 -0400

Update of /cvsroot/phpgroupware/etemplate/inc
In directory subversions:/tmp/cvs-serv20634

Modified Files:
        class.uietemplate.inc.php 
Log Message:
added support for hooks written with etemplates

Index: class.uietemplate.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/etemplate/inc/class.uietemplate.inc.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -C2 -r1.44 -r1.45
*** class.uietemplate.inc.php   14 Oct 2002 00:36:36 -0000      1.44
--- class.uietemplate.inc.php   16 Oct 2002 00:19:36 -0000      1.45
***************
*** 60,69 ****
  
                /*!
!               @function header
!               @abstract Abstracts a html-header call
                @discussion In other UI's than html this needs to call the 
methode, defined by menuaction or
                @discussion open a browser-window for any other links.
                */
!               function header($vars='')
                {
                        Header('Location: ' . $this->html->link(is_array($vars) 
? '/index.php' : $vars,
--- 60,69 ----
  
                /*!
!               @function location
!               @abstract Abstracts a html-location-header call
                @discussion In other UI's than html this needs to call the 
methode, defined by menuaction or
                @discussion open a browser-window for any other links.
                */
!               function location($vars='')
                {
                        Header('Location: ' . $this->html->link(is_array($vars) 
? '/index.php' : $vars,
***************
*** 111,114 ****
--- 111,116 ----
                                $changes = array();
                        }
+                       $hooked = 
$GLOBALS['phpgw']->template->get_var('phpgw_body');
+ 
                        $GLOBALS['phpgw']->common->phpgw_header();
                        if ($GLOBALS['phpgw_info']['flags']['currentapp'] != 
'etemplate')
***************
*** 141,145 ****
                                'to_process' => 
$GLOBALS['phpgw_info']['etemplate']['to_process'],
                                'java_script' => 
$GLOBALS['phpgw_info']['etemplate']['java_script'],
!                               'method' => $method
                        ),$id);
  
--- 143,148 ----
                                'to_process' => 
$GLOBALS['phpgw_info']['etemplate']['to_process'],
                                'java_script' => 
$GLOBALS['phpgw_info']['etemplate']['java_script'],
!                               'method' => $method,
!                               'hooked' => $hooked
                        ),$id);
  
***************
*** 151,156 ****
                        else
                        {
!                               echo $html;
!                               // this removes {} eg.'${test}' -> '$' 
$GLOBALS['phpgw']->template->set_var('phpgw_body',$html);
                        }
                }
--- 154,159 ----
                        else
                        {
!                               $html = str_replace('${','$&#x7b;',$html);      
// else {} eg.'${test}' -> '$' got removed by template-class
!                               
$GLOBALS['phpgw']->template->set_var('phpgw_body',$html,True);
                        }
                }
***************
*** 190,193 ****
--- 193,200 ----
                        if ($GLOBALS['phpgw_info']['etemplate']['loop'])
                        {
+                               if ($session_data['hooked'] != '')      // set 
previous phpgw_body if we are called as hook
+                               {
+                                       
$GLOBALS['phpgw']->template->set_var('phpgw_body',$session_data['hooked']);
+                               }
                                //echo "<p>process_exec($this->name): <font 
color=red>loop is set</font>, content=</p>\n"; _debug_array($content);
                                
$this->exec($session_data['method'],$session_data['content'],$session_data['sel_options'],





reply via email to

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