[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgroupware index.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] phpgroupware index.php |
Date: |
Thu, 28 Dec 2006 04:09:50 +0000 |
CVSROOT: /sources/phpgroupware
Module name: phpgroupware
Changes by: Dave Hall <skwashd> 06/12/28 04:09:50
Modified files:
. : index.php
Log message:
notices and fix json handling
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/index.php?cvsroot=phpgroupware&r1=1.133&r2=1.134
Patches:
Index: index.php
===================================================================
RCS file: /sources/phpgroupware/phpgroupware/index.php,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -b -r1.133 -r1.134
--- index.php 9 Dec 2006 16:36:56 -0000 1.133
+++ index.php 28 Dec 2006 04:09:50 -0000 1.134
@@ -6,7 +6,7 @@
* @copyright Copyright (C) 2000-2005 Free Software Foundation, Inc.
http://www.fsf.org/
* @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
* @package phpgroupware
- * @version $Id: index.php,v 1.133 2006/12/09 16:36:56 sigurdne Exp $
+ * @version $Id: index.php,v 1.134 2006/12/28 04:09:50 skwashd Exp $
*/
$phpgw_info = array();
@@ -81,10 +81,11 @@
{
if ( isset($_GET['phpgw_return_as']) &&
$_GET['phpgw_return_as'] == 'json' )
{
+ Header('Content-Type: text/javascript');
$return_data = $GLOBALS[$class]->$method();
echo execMethod('phpgwapi.Services_JSON.encode',
$return_data);
- // $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
- die();
+ $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+ $GLOBALS['phpgw']->common->phpgw_exit();
}
else
{
@@ -109,7 +110,11 @@
));
}
- if ( ! is_array($GLOBALS[$class]->public_functions) || !
$GLOBALS[$class]->public_functions[$method] && $method)
+ if ( ( !isset($GLOBALS[$class]->public_functions)
+ || !is_array($GLOBALS[$class]->public_functions)
+ || !isset($GLOBALS[$class]->public_functions[$method])
+ || !$GLOBALS[$class]->public_functions[$method] )
+ && $method)
{
$GLOBALS['phpgw']->log->message(array(
'text' => 'W-BadmenuactionVariable, attempted
to access private method: %1',
@@ -122,6 +127,5 @@
$GLOBALS['phpgw']->redirect_link('/home.php');
}
-
$GLOBALS['phpgw']->common->phpgw_footer();
?>