Revision: 5400 Author: nicdumz Date: 2008-05-18 19:09:01 +0000 (Sun, 18 May 2008)
Log Message: ----------- * Correcting an es: message * Avoiding #REDIRECT[[]] redirects. They are not considered as redirects by mediawiki, and still they were raising IsRedirectPage
Modified Paths: -------------- trunk/pywikipedia/reflinks.py trunk/pywikipedia/wikipedia.py
Modified: trunk/pywikipedia/reflinks.py =================================================================== --- trunk/pywikipedia/reflinks.py 2008-05-18 15:32:13 UTC (rev 5399) +++ trunk/pywikipedia/reflinks.py 2008-05-18 19:09:01 UTC (rev 5400) @@ -52,7 +52,7 @@ 'de':u'Bot: Korrektes Referenzformat (siehe [[:en:User:DumZiBoT/refLinks]])', 'hu':u'Robot: Forráshivatkozások kibővítése a hivatkozott oldal címével', 'ko':u'봇: url만 있는 주석을 보강, (영문)[[:en:User:DumZiBoT/refLinks]] 참조', - 'es':u'Formateando las referencias que no tuvieran titulos (Pruebas por [[Wikipedia:Bot/Autorizaciones#DumZiBoT]] )', + 'es':u'Formateando las referencias que no tuvieran títulos (Pruebas por [[Wikipedia:Bot/Autorizaciones#DumZiBoT]] )', 'en':u'Bot: Converting bare references, see [[User:DumZiBoT/refLinks|FAQ]]'}
deadLinkTag = {'fr':u'%s {{lien mort}}',
Modified: trunk/pywikipedia/wikipedia.py =================================================================== --- trunk/pywikipedia/wikipedia.py 2008-05-18 15:32:13 UTC (rev 5399) +++ trunk/pywikipedia/wikipedia.py 2008-05-18 19:09:01 UTC (rev 5400) @@ -792,10 +792,12 @@ redirtarget = "%s#%s" % (m.group(1), self.section()) else: redirtarget = m.group(1) - if get_redirect: - self._redirarg = redirtarget - elif not nofollow_redirects: - raise IsRedirectPage(redirtarget) + #avoid dummy #REDIRECT[[]] + if redirtarget: + if get_redirect: + self._redirarg = redirtarget + elif not nofollow_redirects: + raise IsRedirectPage(redirtarget) if self.section(): # TODO: What the hell is this? Docu please. m = re.search(".3D_*(.27.27+)?(.5B.5B)?_*%s_*(.5B.5B)?(.27.27+)?_*.3D" % re.escape(self.section()), sectionencode(text,self.site().encoding()))
pywikipedia-l@lists.wikimedia.org