Update of /cvsroot/phpwiki/phpwiki/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv20423
Modified Files:
config.php
Log Message:
Patch from "Scott R. Anderson" <sr...@di...> which allows the use
of $PHP_AUTH_USER if it's set; i.e. if a user is logged in their name
will appear in RecentChanges instead of REMOTE_HOST or REMOTE_ADDR.
Index: config.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/config.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** config.php 2000/11/13 14:54:08 1.16
--- config.php 2000/11/17 03:01:26 1.17
***************
*** 205,208 ****
--- 205,220 ----
$FieldSeparator = "\263";
+ if (isset($PHP_AUTH_USER)) {
+ $remoteuser = $PHP_AUTH_USER;
+ } else {
+
+ // Apache won't show REMOTE_HOST unless the admin configured it
+ // properly. We'll be nice and see if it's there.
+
+ getenv('REMOTE_HOST') ? ($remoteuser = getenv('REMOTE_HOST'))
+ : ($remoteuser = getenv('REMOTE_ADDR'));
+ }
+
+
// Apache won't show REMOTE_HOST unless the admin configured it
// properly. We'll be nice and see if it's there.
|