From c08b3a2bd1a92e71275391c2a123b167e86c366c Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Mon, 4 Jul 2005 02:59:23 +0000 Subject: [PATCH] show article text before commons text --- includes/ImagePage.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; } } -- 2.20.1