Add index on logging.log_user_text
[lhc/web/wiklou.git] / includes / Linker.php
index 1c1d82e..f303a17 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,
@@ -749,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,
@@ -775,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();
 
@@ -898,7 +898,7 @@ class Linker {
         * applicable.
         *
         * @param File $file
-        * @param MediaOutput $thumb
+        * @param MediaTransformOutput $thumb
         * @param array $hp image parameters
         */
        public static function processResponsiveImages( $file, $thumb, $hp ) {
@@ -915,11 +915,11 @@ class Linker {
 
                        $thumb15 = $file->transform( $hp15 );
                        $thumb20 = $file->transform( $hp20 );
-                       if ( $thumb15->url !== $thumb->url ) {
-                               $thumb->responsiveUrls['1.5'] = $thumb15->url;
+                       if ( $thumb15 && $thumb15->getUrl() !== $thumb->getUrl() ) {
+                               $thumb->responsiveUrls['1.5'] = $thumb15->getUrl();
                        }
-                       if ( $thumb20->url !== $thumb->url ) {
-                               $thumb->responsiveUrls['2'] = $thumb20->url;
+                       if ( $thumb20 && $thumb20->getUrl() !== $thumb->getUrl() ) {
+                               $thumb->responsiveUrls['2'] = $thumb20->getUrl();
                        }
                }
        }
@@ -1470,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;