Merge branch 'fs#81-get-reddisc-link' into fs#25-mark-done

This commit is contained in:
2016-08-27 19:48:24 +02:00

View File

@@ -462,6 +462,31 @@ class RedFamWorker( RedFam ):
self._status = 3
def get_disc_link( self ):
"""
Constructs and returns the link to Redundancy discussion
@returns Link to diskussion
@rtype str
"""
# We need to Replace Links with their linktext
anchor_code = mwparser.parse( self._mysql.data[ 'heading' ].strip() )
for link in anchor_code.ifilter_wikilinks():
if link.text:
text = link.text
else:
text = link.title
anchor_code.replace( link, text )
# Whitespace is replaced with underscores
anchor_code.replace( " ", "_" )
# We try it with out any more parsing as mw will do while parsing page
return ( self.redpagetitle + "#" +
str(anchor_code).strip() )
@classmethod
def list_by_status( cls, status ):
"""