-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathindex.php
executable file
·41 lines (35 loc) · 1.46 KB
/
index.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
35
36
37
38
39
40
41
<?php
/**
* EGroupware - eSync - ActiveSync protocol based on Z-Push
*
* @link http://www.egroupware.org
* @package esync
* @author Ralf Becker <[email protected]>
* @author EGroupware GmbH <[email protected]>
* @author Philip Herbert <[email protected]>
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
*/
// disable globally enabled compression, as this causes issues with some devices
// z-push handles output compression
ini_set("zlib.output_compression",0);
if (!isset($GLOBALS['egw_info']))
{
$GLOBALS['egw_info'] = array(
'flags' => array(
'disable_Template_class' => true,
'noheader' => true,
'currentapp' => 'login',
'no_exception_handler' => 'errorlog', // only logs exceptions
));
require(__DIR__.'/../header.inc.php');
// turn off output buffering turned on in our header.inc.php, as z-push cant kope with it
// (ItemOperations of big attachments send wrong size Content-Length header)
while(ob_end_clean()) { }
}
// EGroupware specific ZPush version, overwriting version.php from stock ZPush
define('ZPUSH_VERSION', 'EGroupware-'.EGroupware\Api\Framework::api_version());
// use Composer installed egroupware/z-push-dev from global vendor directory
$_SERVER['SCRIPT_FILENAME'] = EGW_SERVER_ROOT.'/vendor/egroupware/z-push-dev/src/index.php';
chdir(dirname($_SERVER['SCRIPT_FILENAME']));
define('ZPUSH_CONFIG', __DIR__.'/inc/config.php');
include($_SERVER['SCRIPT_FILENAME']);