From: Jens Frank Date: Fri, 20 May 2005 22:41:17 +0000 (+0000) Subject: (bug 2110) "noarticletext" should not display on Image page for "sharedupload" media X-Git-Tag: 1.5.0alpha2~144 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=9398de0199e43fa79596794650ff3133c596bbfa;p=lhc%2Fweb%2Fwiklou.git (bug 2110) "noarticletext" should not display on Image page for "sharedupload" media --- 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,