r28149 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r28148‎ | r28149 | r28150 >
Date:17:25, 4 December 2007
Author:erik
Status:old
Tags:
Comment:
single load point for UI messages
Modified paths:
  • /trunk/extensions/LiquidThreads/LqtPages.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/LqtPages.php
@@ -43,6 +43,7 @@
4444
4545 require_once('LqtBaseView.php');
4646
 47+$wgExtensionFunctions[] = 'wfLqtInitMsg';
4748 $wgExtensionFunctions[] = 'wfLqtSpecialDeleteThread';
4849 $wgExtensionFunctions[] = 'wfLqtSpecialMoveThreadToAnotherPage';
4950 $wgExtensionFunctions[] = 'wfLqtSpecialNewMessages';
@@ -53,6 +54,13 @@
5455 $wgSpecialPages['NewMessages'] = 'SpecialNewMessages';
5556
5657 /**
 58+ * Initialize LiquidThreads user interface messages
 59+ */
 60+function wfLqtInitMsg() {
 61+ wfLoadExtensionMessages( 'LiquidThreads' );
 62+}
 63+
 64+/**
5765 * Recreate the original associative array so that a new pair with the given key
5866 * and value is inserted before the given existing key. $original_array gets
5967 * modified in-place.
@@ -109,8 +117,6 @@
110118 $threads = $this->queries->query('recently-archived');
111119 $threadlinks = $this->permalinksForThreads($threads);
112120
113 - wfLoadExtensionMessages( 'LiquidThreads' );
114 -
115121 if ( count($threadlinks) > 0 ) {
116122 $this->openDiv('lqt_archive_teaser');
117123 $this->output->addHTML(wfMsg('lqt_recently_archived'));
@@ -130,7 +136,6 @@
131137 function showHeader() {
132138 /* Show the contents of the actual talkpage article if it exists. */
133139
134 - wfLoadExtensionMessages( 'LiquidThreads' );
135140 $article = new Article( $this->title );
136141 $revision = Revision::newFromId($article->getLatest());
137142 if( $revision ) $article_text = $revision->getRawText();
@@ -886,7 +891,6 @@
887892
888893 function execute( $par = null ) {
889894 global $wgOut, $wgRequest, $wgTitle, $wgUser;
890 - wfLoadExtensionMessages( 'LiquidThreads' );
891895 $this->user = $wgUser;
892896 $this->output = $wgOut;
893897 $this->request = $wgRequest;
@@ -1017,7 +1021,6 @@
10181022
10191023 function execute( $par = null ) {
10201024 global $wgOut, $wgRequest, $wgTitle, $wgUser;
1021 - wfLoadExtensionMessages( 'LiquidThreads' );
10221025 $this->user = $wgUser;
10231026 $this->output = $wgOut;
10241027 $this->request = $wgRequest;
@@ -1202,7 +1205,6 @@
12031206
12041207 function execute( $par = null ) {
12051208 global $wgOut, $wgRequest, $wgTitle, $wgUser;
1206 - wfLoadExtensionMessages( 'LiquidThreads' );
12071209 $this->user = $wgUser;
12081210 $this->output = $wgOut;
12091211 $this->request = $wgRequest;

Status & tagging log