From b7eb5f5e90debb9a589b0cc2dc7a6592c844fc68 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Thu, 4 Dec 2008 01:58:45 +0000 Subject: [PATCH] Followup to r44204. Hardcoding image because it should (in theory) work always and forever. If you have a wiki acting as repo and you've overridden the canonical name Image: it's your own fault. --- includes/filerepo/FileRepo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 6208976c93..bc76c13619 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -262,10 +262,10 @@ abstract class FileRepo { if ( is_null( $this->descBaseUrl ) ) { if ( !is_null( $this->articleUrl ) ) { $this->descBaseUrl = str_replace( '$1', - wfUrlencode( MWNamespace::getCanonicalName( NS_FILE ) ) . ':', $this->articleUrl ); + wfUrlencode( 'Image:', $this->articleUrl ); } elseif ( !is_null( $this->scriptDirUrl ) ) { $this->descBaseUrl = $this->scriptDirUrl . '/index.php?title=' . - wfUrlencode( MWNamespace::getCanonicalName( NS_FILE ) ) . ':'; + wfUrlencode( 'Image:'; } else { $this->descBaseUrl = false; } -- 2.20.1