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$
|
|
|
|
*/
|
|
|
|
|
2016-03-20 17:19:53 +01:00
|
|
|
require_once(__DIR__.'/api/src/Vfs/Sharing.php');
|
|
|
|
|
|
|
|
use EGroupware\Api\Vfs\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!
|
|
|
|
'currentapp' => 'filemanager',
|
2016-03-20 17:19:53 +01:00
|
|
|
'autocreate_session_callback' => 'EGroupware\\Api\\Vfs\\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');
|
|
|
|
|
2014-11-18 13:55:32 +01:00
|
|
|
if (!$GLOBALS['egw']->sharing)
|
|
|
|
{
|
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();
|