From: Chad Horohoe Date: Thu, 4 Dec 2008 01:58:45 +0000 (+0000) Subject: Followup to r44204. Hardcoding image because it should (in theory) work always and... X-Git-Tag: 1.31.0-rc.0~44132 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=b7eb5f5e90debb9a589b0cc2dc7a6592c844fc68;p=lhc%2Fweb%2Fwiklou.git 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. --- 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; }