Merge branch 'fs#81-get-reddisc-link' into fs#25-mark-done
This commit is contained in:
@@ -462,6 +462,31 @@ class RedFamWorker( RedFam ):
|
|||||||
|
|
||||||
self._status = 3
|
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
|
@classmethod
|
||||||
def list_by_status( cls, status ):
|
def list_by_status( cls, status ):
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user