From: <nel...@us...> - 2006-03-29 19:25:12
|
Update of /cvsroot/egroupware/etemplate/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32384 Modified Files: class.uietemplate.inc.php Log Message: allow etemplate to use xajax Index: class.uietemplate.inc.php =================================================================== RCS file: /cvsroot/egroupware/etemplate/inc/class.uietemplate.inc.php,v retrieving revision 1.150 retrieving revision 1.151 diff -C2 -d -r1.150 -r1.151 *** class.uietemplate.inc.php 27 Mar 2006 12:21:02 -0000 1.150 --- class.uietemplate.inc.php 29 Mar 2006 19:25:00 -0000 1.151 *************** *** 79,82 **** --- 79,86 ---- $GLOBALS['egw']->html =& CreateObject('phpgwapi.html'); } + if (!is_object($GLOBALS['egw']->template)) + { + $GLOBALS['egw']->template =& CreateObject('phpgwapi.template'); + } $this->html = &$GLOBALS['egw']->html; *************** *** 319,329 **** * @return mixed false if no sessiondata and $this->sitemgr, else the returnvalue of exec of the method-calls */ ! function process_exec() { //echo "process_exec: _POST ="; _debug_array($_POST); ! $session_data = $this->get_appsession($_POST['etemplate_exec_id']); //echo "<p>process_exec: session_data ="; _debug_array($session_data); ! if (!$_POST['etemplate_exec_id'] || !is_array($session_data) || count($session_data) < 10) { if ($this->sitemgr) return false; --- 323,337 ---- * @return mixed false if no sessiondata and $this->sitemgr, else the returnvalue of exec of the method-calls */ ! function process_exec($etemplate_exec_id = null, $submit_button = null, $exec = null ) { + if(!$etemplate_exec_id) $etemplate_exec_id = $_POST['etemplate_exec_id']; + if(!$submit_button) $submit_button = $_POST['submit_button']; + if(!$exec) $exec = $_POST; + //echo "process_exec: _POST ="; _debug_array($_POST); ! $session_data = $this->get_appsession($etemplate_exec_id); //echo "<p>process_exec: session_data ="; _debug_array($session_data); ! if (!$etemplate_exec_id || !is_array($session_data) || count($session_data) < 10) { if ($this->sitemgr) return false; *************** *** 332,340 **** $this->location(array('menuaction' => $_GET['menuaction'])); } ! if (isset($_POST['submit_button']) && !empty($_POST['submit_button'])) { ! $this->set_array($_POST,$_POST['submit_button'],'pressed'); } ! $content = $_POST['exec']; if (!is_array($content)) { --- 340,348 ---- $this->location(array('menuaction' => $_GET['menuaction'])); } ! if (isset($submit_button) && !empty($submit_button)) { ! $this->set_array($exec,$submit_button,'pressed'); } ! $content = $exec['exec']; if (!is_array($content)) { |