* Fixed a typo that caused warnings
[lhc/web/wiklou.git] / includes / Linker.php
index 88cb3f2..3f35d9c 100644 (file)
@@ -20,7 +20,7 @@ class Linker {
        function Linker() {}
 
        /**
-        * OBSOLETE
+        * @deprecated
         */
        function postParseLinkColour( $s = NULL ) {
                return NULL;
@@ -130,7 +130,7 @@ class Linker {
        /**
         * Pass a title object, not a title string
         */
-       function makeLinkObj( &$nt, $text= '', $query = '', $trail = '', $prefix = '' ) {
+       function makeLinkObj( $nt, $text= '', $query = '', $trail = '', $prefix = '' ) {
                global $wgOut, $wgUser;
                $fname = 'Linker::makeLinkObj';
                wfProfileIn( $fname );
@@ -368,7 +368,7 @@ class Linker {
        }
 
        /** @todo document */
-       function makeImageLinkObj( &$nt, $label, $alt, $align = '', $width = false, $height = false, $framed = false, 
+       function makeImageLinkObj( $nt, $label, $alt, $align = '', $width = false, $height = false, $framed = false, 
          $thumb = false, $manual_thumb = '' ) 
        {
                global $wgContLang, $wgUser, $wgThumbLimits;
@@ -489,7 +489,7 @@ class Linker {
                        $boxheight = $height;
                        $thumbUrl  = $url;
                } else {
-                       $h  = intval( $height/($width/$boxwidth) );
+                       $h  = round( $height/($width/$boxwidth) );
                        $oboxwidth = $boxwidth + 2;
                        if ( ( ! $boxheight === false ) &&  ( $h > $boxheight ) )
                        {
@@ -523,7 +523,7 @@ class Linker {
 
                $s = "<div class=\"thumb t{$align}\"><div style=\"width:{$oboxwidth}px;\">";
                if ( $thumbUrl == '' ) {
-                       $s .= $this->makeBrokenImageLinkObj( $img->getTitle );
+                       $s .= $this->makeBrokenImageLinkObj( $img->getTitle() );
                        $zoomicon = '';
                } else {
                        $s .= '<a href="'.$u.'" class="internal" title="'.$alt.'">'.
@@ -546,7 +546,7 @@ class Linker {
        /**
         * Pass a title object, not a title string
         */
-       function makeBrokenImageLinkObj( &$nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
+       function makeBrokenImageLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
                # Fail gracefully
                if ( ! isset($nt) ) {
                        # wfDebugDieBacktrace();