From: River Tarnell Date: Mon, 4 Jul 2005 02:59:23 +0000 (+0000) Subject: show article text before commons text X-Git-Tag: 1.5.0beta2~28 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=c08b3a2bd1a92e71275391c2a123b167e86c366c;p=lhc%2Fweb%2Fwiklou.git show article text before commons text --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index f950dcaa1e..1105661288 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -18,6 +18,7 @@ require_once( 'Image.php' ); class ImagePage extends Article { /* private */ var $img; // Image object this page is shown for + var $mExtraDescription = false; function render() { global $wgOut; @@ -58,6 +59,9 @@ class ImagePage extends Article { $this->viewUpdates(); } + if ($this->mExtraDescription) + $wgOut->addWikiText($this->mExtraDescription); + $this->closeShowImage(); $this->imageHistory(); $this->imageLinks(); @@ -251,10 +255,10 @@ class ImagePage extends Article { if ($wgRepositoryBaseUrl && $wgFetchCommonsDescriptions) { $ur = ini_set('allow_url_fopen', true); - $text = @file_get_contents($url . '?action=render'); + $text = wfGetHTTP($url . '?action=render'); ini_set('allow_url_fopen', $ur); if ($text) - $wgOut->addHTML($text); + $this->mExtraDescription = $text; } }