From 206bb297b31dff0a1b49b654c249518f1dde7b94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Tue, 6 Jun 2017 00:38:38 +0200 Subject: [PATCH 1/2] Fix create more then 2 universes Fixes #301 --- includes/pages/adm/ShowUniversePage.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/includes/pages/adm/ShowUniversePage.php b/includes/pages/adm/ShowUniversePage.php index 16189ed43..b95a60319 100644 --- a/includes/pages/adm/ShowUniversePage.php +++ b/includes/pages/adm/ShowUniversePage.php @@ -97,14 +97,7 @@ function ShowUniversePage() { $universeCount = count(Universe::availableUniverses()); // Check Multiuniverse Support $ch = curl_init(); - if($universeCount == 1) - { - curl_setopt($ch, CURLOPT_URL, PROTOCOL.HTTP_HOST.HTTP_BASE."uni".ROOT_UNI."/"); - } - else - { - curl_setopt($ch, CURLOPT_URL, PROTOCOL.HTTP_HOST.HTTP_BASE); - } + curl_setopt($ch, CURLOPT_URL, PROTOCOL.HTTP_HOST.HTTP_BASE."uni".ROOT_UNI."/"); curl_setopt($ch, CURLOPT_HTTPGET, true); curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); @@ -185,4 +178,4 @@ function ShowUniversePage() { )); $template->show('UniversePage.tpl'); -} \ No newline at end of file +} From 5ba3b8a5c31614d3760ebb63191bda7a010b946a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Thu, 27 Dec 2018 22:01:25 +0100 Subject: [PATCH 2/2] Additional fix --- includes/pages/adm/ShowUniversePage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/pages/adm/ShowUniversePage.php b/includes/pages/adm/ShowUniversePage.php index b95a60319..963fae26d 100644 --- a/includes/pages/adm/ShowUniversePage.php +++ b/includes/pages/adm/ShowUniversePage.php @@ -97,7 +97,7 @@ function ShowUniversePage() { $universeCount = count(Universe::availableUniverses()); // Check Multiuniverse Support $ch = curl_init(); - curl_setopt($ch, CURLOPT_URL, PROTOCOL.HTTP_HOST.HTTP_BASE."uni".ROOT_UNI."/"); + curl_setopt($ch, CURLOPT_URL, PROTOCOL.HTTP_HOST.HTTP_BASE."uni".($universeCount + 1)."/"); curl_setopt($ch, CURLOPT_HTTPGET, true); curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);