fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [17199] more on api-mode


From: sigurdne
Subject: [Fmsystem-commits] [17199] more on api-mode
Date: Fri, 27 Oct 2017 14:21:33 -0400 (EDT)

Revision: 17199
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17199
Author:   sigurdne
Date:     2017-10-27 14:21:33 -0400 (Fri, 27 Oct 2017)
Log Message:
-----------
more on api-mode

Modified Paths:
--------------
    trunk/phpgwapi/inc/class.login.inc.php

Modified: trunk/phpgwapi/inc/class.login.inc.php
===================================================================
--- trunk/phpgwapi/inc/class.login.inc.php      2017-10-27 13:36:03 UTC (rev 
17198)
+++ trunk/phpgwapi/inc/class.login.inc.php      2017-10-27 18:21:33 UTC (rev 
17199)
@@ -53,6 +53,27 @@
                                $_REQUEST['skip_remote']                        
         = true;
                        }
 
+                       if ( $_POST['mode'] == 'api' )
+                       {
+                               $_POST['submitit'] = true;
+                               $GLOBALS['phpgw_remote_user_fallback']   = 
'sql';
+                               $_REQUEST['skip_remote']                        
         = true;
+                               switch ($_POST['section'])
+                               {
+                                       case 'activitycalendarfrontend':
+                                               
$GLOBALS['phpgw_info']['flags']['session_name'] = 
'activitycalendarfrontendsession';
+                                               break;
+                                       case 'bookingfrontend':
+                                               
$GLOBALS['phpgw_info']['flags']['session_name'] = 'bookingfrontendsession';
+                                               break;
+                                       case 'eventplannerfrontend':
+                                               
$GLOBALS['phpgw_info']['flags']['session_name'] = 'eventplannerfrontendsession';
+                                               break;
+                                       default://nothing
+                                               break;
+                               }
+                       }
+
                        require_once dirname(realpath(__FILE__)) . 
'/sso/include_login.inc.php';
 
                        $lightbox                        = 
isset($_REQUEST['lightbox']) && $_REQUEST['lightbox'] ? true : false;
@@ -352,7 +373,7 @@
                                        exit;
                                }
 
-                               if ( phpgw::get_var('phpgw_return_as', 
'string', 'GET') == "json" )
+                               if ( phpgw::get_var('mode', 'string', 'POST') 
== 'api' )
                                {
                                        header('Content-Type: 
application/json');
                                        echo json_encode(array(




reply via email to

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