From d86191d4afa24df9d482f31f357ac761110ec8d7 Mon Sep 17 00:00:00 2001 From: Dmitriy Simushev Date: Fri, 17 May 2013 14:50:45 +0000 Subject: [PATCH] Use get_app_location func in cron_get_uri func --- src/messenger/webim/libs/cron.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/messenger/webim/libs/cron.php b/src/messenger/webim/libs/cron.php index 01b7088c..e9c25e4f 100644 --- a/src/messenger/webim/libs/cron.php +++ b/src/messenger/webim/libs/cron.php @@ -211,18 +211,11 @@ function cron_index_messages() { /** * Generates cron URI * - * @global string $webimroot Path of the mibew instalation from server root. - * It defined in libs/config.php * @param string $cron_key Cron security key * @return string Cron URI */ function cron_get_uri($cron_key) { - global $webimroot; - - $path = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off') - ? 'http://' - : 'https://'; - $path .= $_SERVER['SERVER_NAME'] . $webimroot . '/cron.php'; + $path = get_app_location(true, is_secure_request()) . '/cron.php'; $path .= empty($cron_key) ? '' : '?cron_key='.$cron_key;