Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/contrib/php-xinha.php =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/contrib/php-xinha.php,v diff -u -r1.1 -r1.2 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/contrib/php-xinha.php 2 Feb 2007 21:04:45 -0000 1.1 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/contrib/php-xinha.php 13 May 2008 18:53:45 -0000 1.2 @@ -23,7 +23,7 @@ * */ - function xinha_pass_to_php_backend($Data, $KeyLocation = 'Xinha:BackendKey') + function xinha_pass_to_php_backend($Data, $KeyLocation = 'Xinha:BackendKey', $ReturnPHP = FALSE) { $bk = array(); @@ -57,8 +57,14 @@ // wouldn't have worked. $backend_data[session_name()] = session_id(); - echo 'backend_data = ' . xinha_to_js($backend_data) . "; \n"; - + if($ReturnPHP) + { + return array('backend_data' => $backend_data); + } + else + { + echo 'backend_data = ' . xinha_to_js($backend_data) . "; \n"; + } } /** Convert PHP data structure to Javascript */ @@ -199,4 +205,4 @@ } return $val; } -?> \ No newline at end of file +?>