comparison MoinMoin/wikiutil.py @ 1784:2668d470091f

wikiutil.getSysPage renamed to getLocalizedPage
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 18 Feb 2007 23:50:31 +0100
parents ec3625137c0d
children 6dd2e29acffe
comparison
equal deleted inserted replaced
1783:4cfb61592fe4 1784:2668d470091f
709 """ 709 """
710 func = request.cfg.cache.page_category_regex.search 710 func = request.cfg.cache.page_category_regex.search
711 return filter(func, pagelist) 711 return filter(func, pagelist)
712 712
713 713
714 # TODO: we may rename this to getLocalizedPage because it returns page 714 def getLocalizedPage(request, pagename): # was: getSysPage
715 # that have translations.
716 def getSysPage(request, pagename):
717 """ Get a system page according to user settings and available translations. 715 """ Get a system page according to user settings and available translations.
718 716
719 We include some special treatment for the case that <pagename> is the 717 We include some special treatment for the case that <pagename> is the
720 currently rendered page, as this is the case for some pages used very 718 currently rendered page, as this is the case for some pages used very
721 often, like FrontPage, RecentChanges etc. - in that case we reuse the 719 often, like FrontPage, RecentChanges etc. - in that case we reuse the
757 755
758 @param request: current request 756 @param request: current request
759 @rtype: Page object 757 @rtype: Page object
760 @return localized page_front_page, if there is a translation 758 @return localized page_front_page, if there is a translation
761 """ 759 """
762 return getSysPage(request, request.cfg.page_front_page) 760 return getLocalizedPage(request, request.cfg.page_front_page)
763 761
764 762
765 def getHomePage(request, username=None): 763 def getHomePage(request, username=None):
766 """ 764 """
767 Get a user's homepage, or return None for anon users and 765 Get a user's homepage, or return None for anon users and