diff MoinMoin/config/multiconfig.py @ 5994:50e82729b826

implement backlink_method to solve the load issues caused by crawlers triggering too many linkto-fullsearches (see docs/CHANGES for details)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 08 Jun 2013 19:03:07 +0200
parents 0063e98b14aa
children
line wrap: on
line diff
--- a/MoinMoin/config/multiconfig.py	Sat Jun 08 17:51:06 2013 +0200
+++ b/MoinMoin/config/multiconfig.py	Sat Jun 08 19:03:07 2013 +0200
@@ -694,6 +694,9 @@
     # the options dictionary.
 
 
+_default_backlink_method = lambda cfg, req: 'backlink' if req.user.valid else 'pagelink'
+
+
 def _default_password_checker(cfg, request, username, password,
                               min_length=6, min_different=4):
     """ Check if a password is secure enough.
@@ -947,6 +950,9 @@
     ('show_version', False, "show moin's version at the bottom of a page"),
     ('show_rename_redirect', False, "if True, offer creation of redirect pages when renaming wiki pages"),
 
+    ('backlink_method', DefaultExpression('_default_backlink_method'),
+     "function determining how the (last part of the) pagename should be rendered in the title area"),
+
     ('packagepages_actions_excluded',
      ['setthemename',  # related to questionable theme stuff, see below
       'copythemefile', # maybe does not work, e.g. if no fs write permissions or real theme file path is unknown to moin