2014-11-13 18:31:36 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* EGroupware API: VFS sharing
|
|
|
|
*
|
|
|
|
* @link http://www.egroupware.org
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
|
|
|
* @package api
|
|
|
|
* @author Ralf Becker <rb@stylite.de>
|
2016-03-20 17:19:53 +01:00
|
|
|
* @copyright (c) 2014-16 by Ralf Becker <rb@stylite.de>
|
2014-11-13 18:31:36 +01:00
|
|
|
* @version $Id$
|
|
|
|
*/
|
|
|
|
|
2018-05-30 17:39:17 +02:00
|
|
|
require_once(__DIR__.'/api/src/Sharing.php');
|
2016-03-20 17:19:53 +01:00
|
|
|
|
2018-05-30 17:39:17 +02:00
|
|
|
use EGroupware\Api\Sharing;
|
2014-11-18 13:55:32 +01:00
|
|
|
|
2014-11-13 18:31:36 +01:00
|
|
|
$GLOBALS['egw_info'] = array(
|
|
|
|
'flags' => array(
|
2014-11-18 13:55:32 +01:00
|
|
|
'disable_Template_class' => true,
|
|
|
|
'noheader' => true,
|
|
|
|
'nonavbar' => 'always', // true would cause eTemplate to reset it to false for non-popups!
|
2018-05-30 17:39:17 +02:00
|
|
|
'currentapp' => 'api',
|
|
|
|
'autocreate_session_callback' => 'EGroupware\\Api\\Sharing::create_session',
|
2023-08-03 23:10:58 +02:00
|
|
|
'no_exception_handler' => true, // we send our own errors
|
2014-11-13 18:31:36 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
include('./header.inc.php');
|
|
|
|
|
2021-03-12 01:00:16 +01:00
|
|
|
if (!isset($GLOBALS['egw']->sharing) || !array_key_exists(Sharing::get_token(), $GLOBALS['egw']->sharing))
|
2014-11-18 13:55:32 +01:00
|
|
|
{
|
2016-03-20 17:19:53 +01:00
|
|
|
Sharing::create_session(true); // true = mount into existing session
|
2014-11-18 13:55:32 +01:00
|
|
|
}
|
2021-03-12 01:00:16 +01:00
|
|
|
$GLOBALS['egw']->sharing[Sharing::get_token()]->ServeRequest();
|