r44125 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44124‎ | r44125 | r44126 >
Date:19:21, 1 December 2008
Author:yaron
Status:deferred
Tags:
Comment:
Added check for ImagePage::getDisplayedFile(); it's a fairly recent method
Modified paths:
  • /trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticCompoundQueries/SCQ_QueryProcessor.php
@@ -132,8 +132,11 @@
133133 if ($key == 'icon') {
134134 $icon_title = Title::newFromText($value);
135135 $icon_image_page = new ImagePage($icon_title);
136 - $icon_url = $icon_image_page->getDisplayedFile()->getURL();
137 - $query_result->display_options['icon'] = $icon_url;
 136+ // method was only added in MW 1.13
 137+ if (method_exists('ImagePage', 'getDisplayedFile')) {
 138+ $icon_url = $icon_image_page->getDisplayedFile()->getURL();
 139+ $query_result->display_options['icon'] = $icon_url;
 140+ }
138141 } else {
139142 $query_result->display_options[$key] = $value;
140143 }

Status & tagging log