mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
useing dirname(__FILE__) to get asyncservice working on system where the current working dir is not the scripts directory, that should solve bug [ 863462 ] asyncservices fail in cron
This commit is contained in:
parent
390dc7737b
commit
c1c9b87bb1
@ -23,19 +23,19 @@
|
|||||||
|
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
$path_to_phpgroupware = '../..'; // need to be adapted if this script is moved somewhere else
|
$path_to_egroupware = realpath(dirname(__FILE__).'/../..'); // need to be adapted if this script is moved somewhere else
|
||||||
$_GET['domain'] = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : 'default';
|
$_GET['domain'] = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : 'default';
|
||||||
|
|
||||||
$GLOBALS['phpgw_info']['flags'] = array(
|
$GLOBALS['phpgw_info']['flags'] = array(
|
||||||
'currentapp' => 'login',
|
'currentapp' => 'login',
|
||||||
'noapi' => True // this stops header.inc.php to include phpgwapi/inc/function.inc.php
|
'noapi' => True // this stops header.inc.php to include phpgwapi/inc/function.inc.php
|
||||||
);
|
);
|
||||||
if (!is_readable($path_to_phpgroupware.'/header.inc.php'))
|
if (!is_readable($path_to_egroupware.'/header.inc.php'))
|
||||||
{
|
{
|
||||||
echo "asyncservice.php: Could not find '$path_to_phpgroupware/header.inc.php', exiting !!!\n";
|
echo "asyncservice.php: Could not find '$path_to_egroupware/header.inc.php', exiting !!!\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
include($path_to_phpgroupware.'/header.inc.php');
|
include($path_to_egroupware.'/header.inc.php');
|
||||||
unset($GLOBALS['phpgw_info']['flags']['noapi']);
|
unset($GLOBALS['phpgw_info']['flags']['noapi']);
|
||||||
|
|
||||||
$db_type = $GLOBALS['phpgw_domain'][$_GET['domain']]['db_type'];
|
$db_type = $GLOBALS['phpgw_domain'][$_GET['domain']]['db_type'];
|
||||||
|
Loading…
Reference in New Issue
Block a user