Skip to content

Commit

Permalink
Cron: Get access url from $_configuration['access_url'] in scripts/cron
Browse files Browse the repository at this point in the history
Calls of api_get_current_access_url_id() can be portal specific when
using php scripts in the console.
  • Loading branch information
jmontoyaa committed Sep 21, 2020
1 parent 8dd7687 commit bc972a5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main/inc/lib/api.lib.php
Expand Up @@ -6568,6 +6568,13 @@ function api_request_uri()
*/
function api_get_current_access_url_id()
{
if ('cli' === PHP_SAPI) {
$accessUrlId = api_get_configuration_value('access_url');
if (!empty($accessUrlId)) {
return $accessUrlId;
}
}

static $id;
if (!empty($id)) {
return (int) $id;
Expand Down

0 comments on commit bc972a5

Please sign in to comment.