diff MoinMoin/items/__init__.py @ 98:29f2e129dd36

use log_remote_addr / log_reverse_dns_lookups settings
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 07 Mar 2011 22:21:10 +0100
parents dab51965d605
children 856945a6d936
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Mon Mar 07 21:06:26 2011 +0100
+++ b/MoinMoin/items/__init__.py	Mon Mar 07 22:21:10 2011 +0100
@@ -472,8 +472,10 @@
         """
         remote_addr = request.remote_addr
         if remote_addr:
-            newrev[ADDRESS] = unicode(remote_addr)
-            newrev[HOSTNAME] = unicode(wikiutil.get_hostname(remote_addr))
+            if app.cfg.log_remote_addr:
+                newrev[ADDRESS] = unicode(remote_addr)
+                if app.cfg.log_reverse_dns_lookups:
+                    newrev[HOSTNAME] = unicode(wikiutil.get_hostname(remote_addr))
         if flaskg.user.valid:
             newrev[USERID] = unicode(flaskg.user.id)