From c5983034b0e6d9d91733fa0496da56614256afc3 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Wed, 13 Dec 2006 20:26:16 +0100
Subject: [PATCH] fix for feed whith Apache auth and no ACL #981

darcs-hash:20061213192616-7ad00-526c26ebf249c07c6188f0062e928d70c7ee89db.gz
---
 feed.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/feed.php b/feed.php
index f477de31b..298c20a65 100644
--- a/feed.php
+++ b/feed.php
@@ -161,7 +161,7 @@ function rssRecentChanges(&$rss,$num,$ltype,$ns,$minor){
         $user = @$recent['user']; // the @ spares time repeating lookup
         $item->author = '';
 
-        if($user){
+        if($user && $conf['useacl']){
             $userInfo = $auth->getUserData($user);
             $item->author = $userInfo['name'];
             if($guardmail) {
@@ -170,6 +170,10 @@ function rssRecentChanges(&$rss,$num,$ltype,$ns,$minor){
             }else{
                 $item->authorEmail = $userInfo['mail'];
             }
+        }elseif($user){
+            // this happens when no ACL but some Apache auth is used
+            $item->author      = $user;
+            $item->authorEmail = $user.'@'.$recent['ip'];
         }else{
             $item->authorEmail = 'anonymous@'.$recent['ip'];
         }
-- 
GitLab