From 45e1aa42339a18993eb7d8954edc0cf9751f97fc Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Wed, 15 Mar 2017 17:17:48 +0100
Subject: [PATCH] hide logs for unauthenticated users; fix warning for $sPhpout
 variable

---
 public_html/deployment/index.php           | 16 ++++++++++------
 public_html/deployment/pages/act_login.php |  2 +-
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/public_html/deployment/index.php b/public_html/deployment/index.php
index 2c3f9044..a076b96b 100644
--- a/public_html/deployment/index.php
+++ b/public_html/deployment/index.php
@@ -74,14 +74,18 @@ if ($oUser->hasPermission('page_'.$sAction)){
 
     $oCLog->add("adding actionlog.class");
 
-    require_once("./classes/actionlog.class.php");
-    $oLog=new Actionlog($sPrj);
-    $aFilter=array('limit'=>'0, 10');
-    if ($sPrj && $sPrj!="all")$aFilter['project']=$sPrj;
-    $sPhpOut.='<div class="logs">' . $oLog->renderLogs($aFilter).'</div>';
+    if ($oUser->getUsername()){
+        require_once("./classes/actionlog.class.php");
+        $aFilter=array('limit'=>'0, 10');
+        if ($sPrj && $sPrj!="all"){
+            $aFilter['project']=$sPrj;
+        }
+        $oLog=new Actionlog($sPrj);
+        $sPhpOut.='<div class="logs">' . $oLog->renderLogs($aFilter).'</div>';
+    }
     $oCLog->add("adding actionlog.class done");
 } else {
-    $sPhpOut.=$oUser->showDenied();
+    $sPhpOut=$oUser->showDenied();
     // return false;
 }
 
diff --git a/public_html/deployment/pages/act_login.php b/public_html/deployment/pages/act_login.php
index 39e79dda..57fe7d23 100644
--- a/public_html/deployment/pages/act_login.php
+++ b/public_html/deployment/pages/act_login.php
@@ -121,7 +121,7 @@ if ($oUser->getUsername()) {
     $sOut.= $oForm->renderHtml("login")
             . '</div>';
 }
-$sOut.= '<div id="navbuttom">' . aPrjHome() . '</div>';
+// $sOut.= '<div id="navbuttom">' . aPrjHome() . '</div>';
 
 // -- Ausgabe
 echo $sOut;
-- 
GitLab