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',
|
2014-11-13 18:31:36 +01:00
|
|
|
'no_exception_handler' => 'basic_auth', // we use a basic auth exception handler (sends exception message as basic auth realm)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
include('./header.inc.php');
|
|
|
|
|
2021-03-11 17:50:12 +01:00
|
|
|
if (!isset($GLOBALS['egw']->sharing) || \EGroupware\Api\Sharing::get_token() !== $GLOBALS['egw']->sharing->get_token())
|
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
|
|
|
}
|
|
|
|
$GLOBALS['egw']->sharing->ServeRequest();
|