Generate 'Enlarge' image in CSS rather than HTML (Linker)
[lhc/web/wiklou.git] / includes / Linker.php
index 7d88f25..3805c5f 100644 (file)
@@ -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
  */
@@ -272,7 +272,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 +702,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 +771,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 +879,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 .= '  <div class="thumbcaption">' . $zoomIcon . $fp['caption'] . "</div></div></div>";
@@ -937,7 +932,7 @@ class Linker {
                $query = '', $unused1 = '', $unused2 = '', $time = false
        ) {
                global $wgEnableUploads, $wgUploadMissingFileUrl, $wgUploadNavigationUrl;
-               if ( ! $title instanceof Title ) {
+               if ( !$title instanceof Title ) {
                        return "<!-- ERROR -->" . htmlspecialchars( $label );
                }
                wfProfileIn( __METHOD__ );
@@ -1379,7 +1374,7 @@ class Linker {
                                                . '<span dir="auto">' . $auto . $post . '</span>';
                                }
                                return $comment;
-               },
+                       },
                        $comment
                );
        }
@@ -1418,7 +1413,11 @@ class Linker {
 
                                # fix up urlencoded title texts (copied from Parser::replaceInternalLinks)
                                if ( strpos( $match[1], '%' ) !== false ) {
-                                       $match[1] = str_replace( array( '<', '>' ), array( '&lt;', '&gt;' ), rawurldecode( $match[1] ) );
+                                       $match[1] = str_replace(
+                                               array( '<', '>' ),
+                                               array( '&lt;', '&gt;' ),
+                                               rawurldecode( $match[1] )
+                                       );
                                }
 
                                # Handle link renaming [[foo|text]] will show link as "text"