From 05e67b1d54135717096d46ba59b99a0190f276a3 Mon Sep 17 00:00:00 2001 From: Jeroen De Dauw Date: Wed, 21 Nov 2018 01:02:54 +0100 Subject: [PATCH] Fix file capitlization regression Fixes https://github.com/JeroenDeDauw/Maps/issues/491 --- RELEASE-NOTES.md | 1 + src/MapsFunctions.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index d16caec50..2fa49476c 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -9,6 +9,7 @@ Under development * The `rotate` control for Google Maps is now enabled by default (changeable via `$egMapsGMaps3Controls`) (by @acnetj) * The `layers` parameter for Google Maps now works again (5.2.0 regression) +* Files can again be referenced without capitalizing the first letter (3.0.0 regression) * Removed broken SMW `_gpo` data type ## Maps 6.0.4 diff --git a/src/MapsFunctions.php b/src/MapsFunctions.php index 3c248a4e7..b18462482 100644 --- a/src/MapsFunctions.php +++ b/src/MapsFunctions.php @@ -240,7 +240,7 @@ public static function getFileUrl( $file ): string { $titleWithoutPrefix = $colonPosition === false ? $file : substr( $file, $colonPosition + 1 ); - $title = Title::makeTitle( NS_FILE, trim( $titleWithoutPrefix ) ); + $title = Title::newFromText( trim( $titleWithoutPrefix ), NS_FILE ); if ( $title !== null && $title->exists() ) { $imagePage = new ImagePage( $title );