From 78f276c65cbcb1857ed548d93a94f399c016cdc1 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Mon, 23 May 2022 17:13:12 +0200
Subject: [PATCH] update admin: detect own external ip

---
 public_html/admin/index.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/public_html/admin/index.php b/public_html/admin/index.php
index d07c436..e4725e4 100644
--- a/public_html/admin/index.php
+++ b/public_html/admin/index.php
@@ -37,7 +37,7 @@ if (!$oR->isEnabled()){
 } else {
 
     $sUrl=(isset($_GET['url']) && $_GET['url']) ? $sUrl=$_GET['url'] : '';
-    $sMyIp=gethostbyname(gethostname($_SERVER['SERVER_NAME']));
+    $sMyIp=gethostbyname($_SERVER['SERVER_NAME']);
 
     if(!$sMyIp){
         $sErrors.='<li>Ip address of current host ['.$_SERVER['SERVER_NAME'].'] was not found.</li>';
-- 
GitLab