comparison MoinMoin/macro/OrphanedPages.py @ 2207:7ae581d79352

updated bot useragents list, reduce bot cpu usage of some macros (ported from 1.5 repo)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 14 May 2007 22:03:21 +0200
parents bb2e053067fb
children 09657fbd4aa2
comparison
equal deleted inserted replaced
2206:b9fa45f5c47f 2207:7ae581d79352
10 10
11 def execute(macro, args): 11 def execute(macro, args):
12 _ = macro.request.getText 12 _ = macro.request.getText
13 13
14 if macro.request.mode_getpagelinks: # prevent recursion 14 if macro.request.mode_getpagelinks: # prevent recursion
15 return ''
16 if macro.request.isSpiderAgent: # reduce bot cpu usage
15 return '' 17 return ''
16 18
17 # delete all linked pages from a dict of all pages 19 # delete all linked pages from a dict of all pages
18 pages = macro.request.rootpage.getPageDict() 20 pages = macro.request.rootpage.getPageDict()
19 orphaned = {} 21 orphaned = {}