-
Notifications
You must be signed in to change notification settings - Fork 98
/
share.php
34 lines (29 loc) · 1.01 KB
/
share.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?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 <[email protected]>
* @copyright (c) 2014-16 by Ralf Becker <[email protected]>
* @version $Id$
*/
require_once(__DIR__.'/api/src/Sharing.php');
use EGroupware\Api\Sharing;
$GLOBALS['egw_info'] = array(
'flags' => array(
'disable_Template_class' => true,
'noheader' => true,
'nonavbar' => 'always', // true would cause eTemplate to reset it to false for non-popups!
'currentapp' => 'api',
'autocreate_session_callback' => 'EGroupware\\Api\\Sharing::create_session',
'no_exception_handler' => true, // we send our own errors
)
);
include('./header.inc.php');
if (!isset($GLOBALS['egw']->sharing) || !array_key_exists(Sharing::get_token(), $GLOBALS['egw']->sharing))
{
Sharing::create_session(true); // true = mount into existing session
}
$GLOBALS['egw']->sharing[Sharing::get_token()]->ServeRequest();