From: Kaldari Date: Thu, 6 Dec 2012 01:47:43 +0000 (-0800) Subject: Adding fragment support to SpecialPage::getTitleFor() X-Git-Tag: 1.31.0-rc.0~21386^2 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=912b5838197620f3910419526a8514770b571244;p=lhc%2Fweb%2Fwiklou.git Adding fragment support to SpecialPage::getTitleFor() Change-Id: I2007ad5166117b90af5560fd9bb1d0ee26e45cef --- diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 67aa2b33f4..e844d93a8c 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -254,13 +254,14 @@ class SpecialPage { * * @param $name String * @param $subpage String|Bool subpage string, or false to not use a subpage + * @param $fragment String the link fragment (after the "#") * @throws MWException * @return Title object */ - public static function getTitleFor( $name, $subpage = false ) { + public static function getTitleFor( $name, $subpage = false, $fragment = '' ) { $name = SpecialPageFactory::getLocalNameFor( $name, $subpage ); if ( $name ) { - return Title::makeTitle( NS_SPECIAL, $name ); + return Title::makeTitle( NS_SPECIAL, $name, $fragment ); } else { throw new MWException( "Invalid special page name \"$name\"" ); }