Revision: 51821 Author: siebrand Date: 2009-06-13 13:41:48 +0000 (Sat, 13 Jun 2009)
Log Message: ----------- * deprecated makeMediaLink() to makeMediaLinkObj * add FIXME where I was not able to replace a deprecated method * add doxygen @deprecated where wfDeprecated() was present, but not the doc Should conclude replacing or tagging remaining deprecated Linker::make*Link*() in core. Linking to r51559 for code review Modified Paths: -------------- trunk/phase3/includes/Linker.php trunk/phase3/includes/specials/SpecialUpload.php Modified: trunk/phase3/includes/Linker.php =================================================================== --- trunk/phase3/includes/Linker.php 2009-06-13 12:39:00 UTC (rev 51820) +++ trunk/phase3/includes/Linker.php 2009-06-13 13:41:48 UTC (rev 51821) @@ -337,6 +337,7 @@ global $wgUser; $threshold = intval( $wgUser->getOption( 'stubthreshold' ) ); $colour = ( $size < $threshold ) ? 'stub' : ''; + // FIXME: replace deprecated makeColouredLinkObj by link() return $this->makeColouredLinkObj( $nt, $colour, $text, $query, $trail, $prefix ); } @@ -1046,7 +1047,8 @@ if( preg_match( '/^' . $medians . '(.*)$/i', $match[1], $submatch ) ) { # Media link; trail not supported. $linkRegexp = '/\[\[(.*?)\]\]/'; - $thelink = $this->makeMediaLink( $submatch[1], "", $text ); + $title = Title::makeTitleSafe( NS_FILE, $submatch[1] ); + $thelink = $this->makeMediaLinkObj( $title, $text ); } else { # Other kind of link if( preg_match( $wgContLang->linkTrail(), $match[4], $submatch ) ) { @@ -1740,6 +1742,7 @@ } else $style = ''; return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix, '', $style ); } + /** Obsolete alias */ function makeImage( $url, $alt = '' ) { wfDeprecated( __METHOD__ ); @@ -1795,6 +1798,7 @@ * Used to generate section edit links that point to "other" pages * (sections that are really part of included pages). * + * @deprecated use Linker::doEditSectionLink() * @param $title Title string. * @param $section Integer: section number. */ @@ -1805,6 +1809,7 @@ } /** + * @deprecated use Linker::doEditSectionLink() * @param $nt Title object. * @param $section Integer: section number. * @param $hint Link String: title, or default if omitted or empty Modified: trunk/phase3/includes/specials/SpecialUpload.php =================================================================== --- trunk/phase3/includes/specials/SpecialUpload.php 2009-06-13 12:39:00 UTC (rev 51820) +++ trunk/phase3/includes/specials/SpecialUpload.php 2009-06-13 13:41:48 UTC (rev 51821) @@ -634,6 +634,7 @@ if( $file->exists() ) { $dlink = $sk->linkKnown( $file->getTitle() ); if ( $file->allowInlineDisplay() ) { + // FIXME: replace deprecated makeImageLinkObj by link() $dlink2 = $sk->makeImageLinkObj( $file->getTitle(), wfMsgExt( 'fileexists-thumb', 'parseinline' ), $file->getName(), $align, array(), false, true ); } elseif ( !$file->allowInlineDisplay() && $file->isSafeFile() ) { @@ -659,6 +660,7 @@ # It's not forbidden but in 99% it makes no sense to upload the same filename with uppercase extension $dlink = $sk->linkKnown( $nt_lc ); if ( $file_lc->allowInlineDisplay() ) { + // FIXME: replace deprecated makeImageLinkObj by link() $dlink2 = $sk->makeImageLinkObj( $nt_lc, wfMsgExt( 'fileexists-thumb', 'parseinline' ), $nt_lc->getText(), $align, array(), false, true ); } elseif ( !$file_lc->allowInlineDisplay() && $file_lc->isSafeFile() ) { @@ -684,6 +686,7 @@ # Check if an image without leading '180px-' (or similiar) exists $dlink = $sk->linkKnown( $nt_thb ); if ( $file_thb->allowInlineDisplay() ) { + // FIXME: replace deprecated makeImageLinkObj by link() $dlink2 = $sk->makeImageLinkObj( $nt_thb, wfMsgExt( 'fileexists-thumb', 'parseinline' ), $nt_thb->getText(), $align, array(), false, true ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs