From c1c9b87bb152ec3116fc9c93842b50ecaf6712db Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 23 May 2004 19:16:15 +0000 Subject: [PATCH] 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 --- phpgwapi/cron/asyncservices.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpgwapi/cron/asyncservices.php b/phpgwapi/cron/asyncservices.php index 30b17b74c7..3861bc5534 100644 --- a/phpgwapi/cron/asyncservices.php +++ b/phpgwapi/cron/asyncservices.php @@ -23,19 +23,19 @@ /* $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'; $GLOBALS['phpgw_info']['flags'] = array( 'currentapp' => 'login', '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); } - include($path_to_phpgroupware.'/header.inc.php'); + include($path_to_egroupware.'/header.inc.php'); unset($GLOBALS['phpgw_info']['flags']['noapi']); $db_type = $GLOBALS['phpgw_domain'][$_GET['domain']]['db_type'];