mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-09 15:00:07 +01:00
Update async services to match changes to Multi-Domain support in functions.inc.php (rev 25860)
This commit is contained in:
parent
3e7cb195e6
commit
3dddb8d646
@ -13,7 +13,7 @@
|
|||||||
* @version $Id$
|
* @version $Id$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$_GET['domain'] = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : 'default';
|
$_REQUEST['domain'] = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : 'default';
|
||||||
$path_to_egroupware = realpath(dirname(__FILE__).'/../..'); // 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
|
||||||
|
|
||||||
// remove the comment from one of the following lines to enable loging
|
// remove the comment from one of the following lines to enable loging
|
||||||
@ -21,7 +21,7 @@
|
|||||||
// define('ASYNC_LOG','/tmp/async.log'); // Linux, Unix, ...
|
// define('ASYNC_LOG','/tmp/async.log'); // Linux, Unix, ...
|
||||||
if (defined('ASYNC_LOG'))
|
if (defined('ASYNC_LOG'))
|
||||||
{
|
{
|
||||||
$msg = date('Y/m/d H:i:s ').$_GET['domain'].": asyncservice started\n";
|
$msg = date('Y/m/d H:i:s ').$_REQUEST['domain'].": asyncservice started\n";
|
||||||
$f = fopen(ASYNC_LOG,'a+');
|
$f = fopen(ASYNC_LOG,'a+');
|
||||||
fwrite($f,$msg);
|
fwrite($f,$msg);
|
||||||
fclose($f);
|
fclose($f);
|
||||||
@ -45,10 +45,10 @@
|
|||||||
include($path_to_egroupware.'/header.inc.php');
|
include($path_to_egroupware.'/header.inc.php');
|
||||||
unset($GLOBALS['egw_info']['flags']['noapi']);
|
unset($GLOBALS['egw_info']['flags']['noapi']);
|
||||||
|
|
||||||
$db_type = $GLOBALS['egw_domain'][$_GET['domain']]['db_type'];
|
$db_type = $GLOBALS['egw_domain'][$_REQUEST['domain']]['db_type'];
|
||||||
if (!isset($GLOBALS['egw_domain'][$_GET['domain']]) || empty($db_type))
|
if (!isset($GLOBALS['egw_domain'][$_REQUEST['domain']]) || empty($db_type))
|
||||||
{
|
{
|
||||||
echo $msg = "asyncservice.php: Domain '$_GET[domain]' is not configured or renamed, exiting !!!\n";
|
echo $msg = "asyncservice.php: Domain '$_REQUEST[domain]' is not configured or renamed, exiting !!!\n";
|
||||||
if (defined('ASYNC_LOG'))
|
if (defined('ASYNC_LOG'))
|
||||||
{
|
{
|
||||||
$f = fopen(ASYNC_LOG,'a+');
|
$f = fopen(ASYNC_LOG,'a+');
|
||||||
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
$num = ExecMethod('phpgwapi.asyncservice.check_run','crontab');
|
$num = ExecMethod('phpgwapi.asyncservice.check_run','crontab');
|
||||||
|
|
||||||
$msg = date('Y/m/d H:i:s ').$_GET['domain'].': '.($num === false ? 'An error occured: can not obtain semaphore!' :
|
$msg = date('Y/m/d H:i:s ').$_REQUEST['domain'].': '.($num === false ? 'An error occured: can not obtain semaphore!' :
|
||||||
($num ? "$num job(s) executed" : 'Nothing to execute'))."\n\n";
|
($num ? "$num job(s) executed" : 'Nothing to execute'))."\n\n";
|
||||||
// if the following comment got removed, you will get an email from cron for every check performed (*nix only)
|
// if the following comment got removed, you will get an email from cron for every check performed (*nix only)
|
||||||
//echo $msg;
|
//echo $msg;
|
||||||
|
Loading…
Reference in New Issue
Block a user