X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%2C%22id_auteur=%24connecte%22%29%20.%20%22?a=blobdiff_plain;f=includes%2FLinker.php;h=f0b16ab981b0055a440332a4945a902028aacc83;hb=abb5869cba1cca1c7d9bedfda6d3831bf2fc11a0;hp=1991694036759c1aeec7e78ca034db7fad812f60;hpb=dc1ca51969959c0989123d152ce260ee5e7cf2cf;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Linker.php b/includes/Linker.php index 1991694036..f0b16ab981 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -25,7 +25,7 @@ * for primarily page content: links, embedded images, table of contents. Links * are also used in the skin. * - * @todo: turn this into a legacy interface for HtmlPageLinkRenderer and similar services. + * @todo turn this into a legacy interface for HtmlPageLinkRenderer and similar services. * * @ingroup Skins */ @@ -259,6 +259,7 @@ class Linker { /** * Identical to link(), except $options defaults to 'known'. + * @see Linker::link * @return string */ public static function linkKnown( @@ -272,7 +273,7 @@ class Linker { * Returns the Url used to link to a Title * * @param Title $target - * @param array $query query parameters + * @param array $query Query parameters * @param array $options * @return string */ @@ -702,6 +703,7 @@ class Linker { * frame parameters supplied by the Parser. * @param array $frameParams The frame parameters * @param string $query An optional query string to add to description page links + * @param Parser|null $parser * @return array */ private static function getImageLinkMTOParams( $frameParams, $query = '', $parser = null ) { @@ -770,7 +772,6 @@ class Linker { public static function makeThumbLink2( Title $title, $file, $frameParams = array(), $handlerParams = array(), $time = false, $query = "" ) { - global $wgStylePath, $wgContLang; $exists = $file && $file->exists(); # Shortcuts @@ -879,12 +880,7 @@ class Linker { 'href' => $url, 'class' => 'internal', 'title' => wfMessage( 'thumbnail-more' )->text() ), - Html::element( 'img', array( - 'src' => $wgStylePath . '/common/images/magnify-clip' - . ( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png', - 'width' => 15, - 'height' => 11, - 'alt' => "" ) ) ) ); + "" ) ); } } $s .= '
' . $zoomIcon . $fp['caption'] . "
"; @@ -913,10 +909,10 @@ class Linker { $thumb15 = $file->transform( $hp15 ); $thumb20 = $file->transform( $hp20 ); - if ( $thumb15 && $thumb15->getUrl() !== $thumb->getUrl() ) { + if ( $thumb15 && !$thumb15->isError() && $thumb15->getUrl() !== $thumb->getUrl() ) { $thumb->responsiveUrls['1.5'] = $thumb15->getUrl(); } - if ( $thumb20 && $thumb20->getUrl() !== $thumb->getUrl() ) { + if ( $thumb20 && !$thumb20->isError() && $thumb20->getUrl() !== $thumb->getUrl() ) { $thumb->responsiveUrls['2'] = $thumb20->getUrl(); } } @@ -937,7 +933,7 @@ class Linker { $query = '', $unused1 = '', $unused2 = '', $time = false ) { global $wgEnableUploads, $wgUploadMissingFileUrl, $wgUploadNavigationUrl; - if ( ! $title instanceof Title ) { + if ( !$title instanceof Title ) { return "" . htmlspecialchars( $label ); } wfProfileIn( __METHOD__ ); @@ -2202,7 +2198,7 @@ class Linker { * * @param User $user * @param Revision $rev - * @param Revision $title + * @param Title $title * @return string HTML fragment */ public static function getRevDeleteLink( User $user, Revision $rev, Title $title ) {