overwrite isEmpty method for image node to check for url instead of value

This commit is contained in:
Rafal Leszczynski 2015-05-06 16:11:04 +02:00
parent f6a05dbfdf
commit 440b1e934b

View file

@ -15,6 +15,10 @@ class NodeImage extends Node {
return $node; return $node;
} }
public function isEmpty( $data ) {
return !( isset( $data[ 'url' ] ) ) || empty( $data[ 'url' ] );
}
public function resolveImageUrl( $filename ) { public function resolveImageUrl( $filename ) {
global $wgContLang; global $wgContLang;
$title = \Title::newFromText( \Wikia\PortableInfobox\Helpers\ImageFilenameSanitizer::getInstance() $title = \Title::newFromText( \Wikia\PortableInfobox\Helpers\ImageFilenameSanitizer::getInstance()