##language:zh #pragma section-numbers on ''' ''' ::-- ZoomQuiet [<>] <> ## 默许导航,请保留 <> = 优化LikePages = * 根据 [修改Moin不查找带有日期的页面 http://my.opera.com/zhangyunfeng/blog/show.dml/411044] 升级 `LikePage.py`{{{#!python # -*- coding: utf-8 -*- """ MoinMoin - Create list of LikePages @copyright: 2004 by Johannes Berg @license: GNU GPL, see COPYING for details. 070522 base http://my.opera.com/zhangyunfeng/blog/show.dml/411044 cancel date like page """ Dependencies = ['namespace'] from MoinMoin.action import LikePages import re date = re.compile(r'\d{4}-\d{2}-\d{2}') def execute(macro, args): request = macro.request pagename = macro.formatter.page.page_name # 检查页面是否带有日期形式字符串 if re.search(date, pagename): return 'Calendar Page will not be searched.' # Get matches start, end, matches = LikePages.findMatches(pagename, request) # Render matches if matches and not isinstance(matches, (str, unicode)): return request.redirectedOutput(LikePages.showMatches, pagename, request, start, end, matches, False) return args }}} 加速创建文章时的相似页面列表行为 = 反馈 =