[Sugar-devel] [PATCH InfoSlicer] Follow redirects properly SL #3088

Manuel Kaufmann humitos at gmail.com
Wed May 16 10:38:54 EDT 2012


Handle wiki redirection properly using the same wiki engine that the
user used for his query.

Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
---
 infoslicer/processing/MediaWiki_Helper.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/infoslicer/processing/MediaWiki_Helper.py b/infoslicer/processing/MediaWiki_Helper.py
index 3e07dbb..360aba0 100644
--- a/infoslicer/processing/MediaWiki_Helper.py
+++ b/infoslicer/processing/MediaWiki_Helper.py
@@ -70,7 +70,7 @@ class MediaWiki_Helper:
             return title
         #if there is a redirect, recursively follow the chain
         else:
-            return self.resolveTitle(redirectList[0].attributes["to"].value)
+            return self.resolveTitle(redirectList[0].attributes["to"].value, wiki=wiki)
     
     def resolveRevision(self, revision, wiki=defaultWiki):
         """ get an article by revision number.
-- 
1.7.10



More information about the Sugar-devel mailing list