diff --git a/services/Parser/Nodes/NodeImage.php b/services/Parser/Nodes/NodeImage.php index b61074d..4206707 100644 --- a/services/Parser/Nodes/NodeImage.php +++ b/services/Parser/Nodes/NodeImage.php @@ -41,8 +41,8 @@ class NodeImage extends Node { */ public function resolveImageUrl( $title ) { if ( $title ) { - $file = \WikiaFileHelper::getFileFromTitle($title); - if ($file) { + $file = \WikiaFileHelper::getFileFromTitle( $title ); + if ( $file ) { return $file->getUrl(); } } diff --git a/services/PortableInfoboxRenderService.class.php b/services/PortableInfoboxRenderService.class.php index 80248b1..c31c2af 100644 --- a/services/PortableInfoboxRenderService.class.php +++ b/services/PortableInfoboxRenderService.class.php @@ -185,7 +185,7 @@ class PortableInfoboxRenderService extends WikiaService { private function createVignetteThumbnail( $url ) { return VignetteRequest::fromUrl( $url ) ->thumbnailDown() - ->width(F::app()->checkSkin( 'wikiamobile' ) ? + ->width( F::app()->checkSkin( 'wikiamobile' ) ? self::MOBILE_THUMBNAIL_WIDTH : self::DESKTOP_THUMBNAIL_WIDTH ) @@ -197,15 +197,15 @@ class PortableInfoboxRenderService extends WikiaService { * @desc If the image is served from an old * service we have to again obtain file to * call the createThumb function - * @param $name + * @param $title * @return mixed */ - private function createOldThumbnail( $name ) + private function createOldThumbnail( $title ) { - $file = wfFindFile( $name ); + $file = \WikiaFileHelper::getFileFromTitle( $title ); if ( $file ) { return $file->createThumb( - F::app()->checkSkin('wikiamobile') ? + F::app()->checkSkin( 'wikiamobile' ) ? self::MOBILE_THUMBNAIL_WIDTH : self::DESKTOP_THUMBNAIL_WIDTH );