From 9b99e3b5c32c68e43367a616cef276d17f27fba5 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Thu, 17 Oct 2024 06:46:33 +0000 Subject: [PATCH] set base url for urlhelper early in jsonapi.php (and remove some clutter), fixes #4712 Closes #4712 Merge request studip/studip!3505 --- public/jsonapi.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/public/jsonapi.php b/public/jsonapi.php index ba73885a3cc..4b2ba4bfef3 100644 --- a/public/jsonapi.php +++ b/public/jsonapi.php @@ -1,13 +1,14 @@ <?php -use DI\ContainerBuilder; use Slim\Factory\AppFactory; require '../lib/bootstrap.php'; -require '../composer/autoload.php'; \StudipAutoloader::addAutoloadPath($GLOBALS['STUDIP_BASE_PATH'] . DIRECTORY_SEPARATOR . 'vendor/oauth-php/library/'); +// Set base url for URLHelper class +URLHelper::setBaseUrl($GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP']); + page_open([ 'sess' => 'Seminar_Session', 'auth' => 'Seminar_Default_Auth', @@ -15,9 +16,6 @@ page_open([ 'user' => 'Seminar_User', ]); -// Set base url for URLHelper class -URLHelper::setBaseUrl($GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP']); - // Instantiate the app $container = app(); AppFactory::setContainer($container); -- GitLab