phpgroupware-cvs
[Top][All Lists]
Advanced

[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, 17 Aug 2006 23:07:35 +0000

CVSROOT:        /cvsroot/phpgroupware
Module name:    phpgroupware
Changes by:     Dave Hall <skwashd>     06/08/17 23:07:35

Modified files:
        .              : index.php 

Log message:
        add json support

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgroupware/index.php?cvsroot=phpgroupware&r1=1.127&r2=1.128

Patches:
Index: index.php
===================================================================
RCS file: /cvsroot/phpgroupware/phpgroupware/index.php,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -b -r1.127 -r1.128
--- index.php   16 Aug 2006 02:47:52 -0000      1.127
+++ index.php   17 Aug 2006 23:07:34 -0000      1.128
@@ -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.127 2006/08/16 02:47:52 skwashd Exp $
+       * @version $Id: index.php,v 1.128 2006/08/17 23:07:34 skwashd Exp $
        */
 
        $phpgw_info = array();
@@ -76,7 +76,16 @@
                && $GLOBALS[$class]->public_functions[$method] )
 
        {
+               if ( isset($_GET['phpgw_return_as']) && 
$_GET['phpgw_return_as'] == 'json' )
+               {
+                       $return_data = $GLOBALS[$class]->$method();
+                       echo execMethod('phpgwapi.Services_JSON.encode', 
$return_data);
+                       $GLOBALS['phpgw_info']['nofooter'] = true;
+               }
+               else
+               {
                $GLOBALS[$class]->$method();
+               }
                unset($app);
                unset($class);
                unset($method);




reply via email to

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