Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions formats/filtered/src/View/MapView.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use DataValues\Geo\Parsers\LatLongParser;
use Exception;
use MediaWiki\MediaWikiServices;
use SMW\DataValues\PropertyValue;
use SRF\Filtered\ResultItem;

Expand Down Expand Up @@ -294,7 +295,6 @@ private function getMarkerIcons() {
$actualParameters = self::getActualParameters()['map view marker icons'];

foreach ( $actualParameters as $relation ) {

$relation = explode( '=', $relation, 2 );

if ( count( $relation ) === 1 ) {
Expand All @@ -305,7 +305,9 @@ private function getMarkerIcons() {
$icon = $relation[1];
}

$file = \WikiPage::factory( \Title::newFromText( $icon, NS_FILE ) )->getFile();
$file = MediaWikiServices::getInstance()->getWikiPageFactory()->newFromTitle(
\Title::newFromText( $icon, NS_FILE )
)->getFile();

if ( $file->exists() ) {
$ret[$key] = $file->getUrl();
Expand Down