r47073 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47072‎ | r47073 | r47074 >
Date:09:00, 10 February 2009
Author:mkroetzsch
Status:deferred
Tags:
Comment:
more lazy loading of messages
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_QP_RSSlink.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QP_RSSlink.php
@@ -39,13 +39,13 @@
4040 protected function getResultText($res, $outputmode) {
4141 global $smwgIQRunningNumber, $wgSitename, $wgServer, $smwgRSSEnabled, $wgRequest;
4242 $result = '';
43 - wfLoadExtensionMessages('SemanticMediaWiki');
4443 if ($outputmode == SMW_OUTPUT_FILE) { // make RSS feed
4544 if (!$smwgRSSEnabled) return '';
4645 if ($this->m_title == '') {
4746 $this->m_title = $wgSitename;
4847 }
4948 if ($this->m_description == '') {
 49+ wfLoadExtensionMessages('SemanticMediaWiki');
5050 $this->m_description = wfMsg('smw_rss_description', $wgSitename);
5151 }
5252
@@ -105,6 +105,7 @@
106106 if ($this->getSearchLabel($outputmode)) {
107107 $label = $this->getSearchLabel($outputmode);
108108 } else {
 109+ wfLoadExtensionMessages('SemanticMediaWiki');
109110 $label = wfMsgForContent('smw_rss_link');
110111 }
111112 $link = $res->getQueryLink($label);
@@ -194,7 +195,7 @@
195196 public function uri() {
196197 return $this->uri;
197198 }
198 -
 199+
199200 /**
200201 * Creates the RSS output for the single item.
201202 */
@@ -231,7 +232,7 @@
232233 */
233234 private function clean($t) {
234235 return trim(smwfXMLContentEncode($t));
235 - //return trim(str_replace(array('&','<','>'), array('&amp;','&lt;','&gt;'), strip_tags(html_entity_decode($t, null, 'UTF-8'))));
 236+ //return trim(str_replace(array('&','<','>'), array('&amp;','&lt;','&gt;'), strip_tags(html_entity_decode($t, null, 'UTF-8'))));
236237 }
237238 }
238239

Status & tagging log