Show tags on deleted edits through the API
[lhc/web/wiklou.git] / includes / Linker.php
index 4dcdfd5..7c6bbc6 100644 (file)
@@ -264,8 +264,8 @@ class Linker {
         */
        public static function linkKnown(
                $target, $html = null, $customAttribs = array(),
-               $query = array(), $options = array( 'known', 'noclasses' ) )
-       {
+               $query = array(), $options = array( 'known', 'noclasses' )
+       {
                return self::link( $target, $html, $customAttribs, $query, $options );
        }
 
@@ -562,8 +562,8 @@ class Linker {
         * @return String: HTML for an image, with links, wrappers, etc.
         */
        public static function makeImageLink( /*Parser*/ $parser, Title $title, $file, $frameParams = array(),
-               $handlerParams = array(), $time = false, $query = "", $widthOption = null )
-       {
+               $handlerParams = array(), $time = false, $query = "", $widthOption = null
+       {
                $res = null;
                $dummy = new DummyLinker;
                if ( !wfRunHooks( 'ImageBeforeProduceHTML', array( &$dummy, &$title,
@@ -681,8 +681,7 @@ class Linker {
                                'valign' => isset( $fp['valign'] ) ? $fp['valign'] : false,
                                'img-class' => $fp['class'] );
                        if ( isset( $fp['border'] ) ) {
-                               // TODO: BUG? Both values are identical
-                               $params['img-class'] .= ( $params['img-class'] !== '' ) ? ' thumbborder' : 'thumbborder';
+                               $params['img-class'] .= ( $params['img-class'] !== '' ? ' ' : '' ) . 'thumbborder';
                        }
                        $params = self::getImageLinkMTOParams( $fp, $query, $parser ) + $params;
 
@@ -750,8 +749,8 @@ class Linker {
         * @return mixed
         */
        public static function makeThumbLinkObj( Title $title, $file, $label = '', $alt,
-               $align = 'right', $params = array(), $framed = false, $manualthumb = "" )
-       {
+               $align = 'right', $params = array(), $framed = false, $manualthumb = ""
+       {
                $frameParams = array(
                        'alt' => $alt,
                        'caption' => $label,
@@ -776,8 +775,8 @@ class Linker {
         * @return mixed
         */
        public static function makeThumbLink2( Title $title, $file, $frameParams = array(),
-               $handlerParams = array(), $time = false, $query = "" )
-       {
+               $handlerParams = array(), $time = false, $query = ""
+       {
                global $wgStylePath, $wgContLang;
                $exists = $file && $file->exists();
 
@@ -850,10 +849,10 @@ class Linker {
                if ( $page ) {
                        $url = wfAppendQuery( $url, array( 'page' => $page ) );
                }
-               if ( $manualthumb &&
-                    !isset( $fp['link-title'] ) &&
-                    !isset( $fp['link-url'] ) &&
-                    !isset( $fp['no-link'] ) ) {
+               if ( $manualthumb
+                       && !isset( $fp['link-title'] )
+                       && !isset( $fp['link-url'] )
+                       && !isset( $fp['no-link'] ) ) {
                        $fp['link-url'] = $url;
                }
 
@@ -871,7 +870,7 @@ class Linker {
                        $params = array(
                                'alt' => $fp['alt'],
                                'title' => $fp['title'],
-                               'img-class' => ( isset( $fp['class'] ) && $fp['class'] !== '' ) ? $fp['class'] . ' thumbimage' : 'thumbimage'
+                               'img-class' => ( isset( $fp['class'] ) && $fp['class'] !== '' ? $fp['class'] . ' ' : '' ) . 'thumbimage'
                        );
                        $params = self::getImageLinkMTOParams( $fp, $query ) + $params;
                        $s .= $thumb->toHtml( $params );
@@ -902,7 +901,7 @@ class Linker {
         * @param MediaOutput $thumb
         * @param array $hp image parameters
         */
-       protected static function processResponsiveImages( $file, $thumb, $hp ) {
+       public static function processResponsiveImages( $file, $thumb, $hp ) {
                global $wgResponsiveImages;
                if ( $wgResponsiveImages ) {
                        $hp15 = $hp;
@@ -1471,8 +1470,8 @@ class Linker {
                        $target = Title::newFromText( $linkTarget );
                        if ( $target ) {
                                if ( $target->getText() == '' && $target->getInterwiki() === ''
-                                       && !self::$commentLocal && self::$commentContextTitle )
-                               {
+                                       && !self::$commentLocal && self::$commentContextTitle
+                               {
                                        $newTarget = clone ( self::$commentContextTitle );
                                        $newTarget->setFragment( '#' . $target->getFragment() );
                                        $target = $newTarget;