From 9398de0199e43fa79596794650ff3133c596bbfa Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Fri, 20 May 2005 22:41:17 +0000 Subject: [PATCH] (bug 2110) "noarticletext" should not display on Image page for "sharedupload" media --- RELEASE-NOTES | 1 + includes/ImagePage.php | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 4b3eb0448d..4f8523c999 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -195,6 +195,7 @@ Various bugfixes, small features, and a few experimental things: crystalsvg theme. * Fixed a bug in Special:Newimages that made it impossible to search for '0' * (bug 2095) Triple-closing-bracket thing partly fixed +* (bug 2110) "noarticletext" should not display on Image page for "sharedupload" media === Caveats === diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 7d2dc3e28f..66f6628630 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -99,6 +99,20 @@ class ImagePage extends Article { return substr($r, 0, -3) . '|}'; } + /** + * Overloading Article's getContent method. + * Omit noarticletext if sharedupload + * + * @param $noredir If true, do not follow redirects + */ + function getContent( $noredir ) + { + if ( $this->img && $this->img->fromSharedDirectory && 0 == $this->getID() ) { + return ''; + } + return Article::getContent( $noredir ); + } + function openShowImage() { global $wgOut, $wgUser, $wgImageLimits, $wgRequest, -- 2.20.1