Index: trunk/extensions/LiquidThreads/LqtPages.php |
— | — | @@ -43,6 +43,7 @@ |
44 | 44 | |
45 | 45 | require_once('LqtBaseView.php'); |
46 | 46 | |
| 47 | +$wgExtensionFunctions[] = 'wfLqtInitMsg'; |
47 | 48 | $wgExtensionFunctions[] = 'wfLqtSpecialDeleteThread'; |
48 | 49 | $wgExtensionFunctions[] = 'wfLqtSpecialMoveThreadToAnotherPage'; |
49 | 50 | $wgExtensionFunctions[] = 'wfLqtSpecialNewMessages'; |
— | — | @@ -53,6 +54,13 @@ |
54 | 55 | $wgSpecialPages['NewMessages'] = 'SpecialNewMessages'; |
55 | 56 | |
56 | 57 | /** |
| 58 | + * Initialize LiquidThreads user interface messages |
| 59 | + */ |
| 60 | +function wfLqtInitMsg() { |
| 61 | + wfLoadExtensionMessages( 'LiquidThreads' ); |
| 62 | +} |
| 63 | + |
| 64 | +/** |
57 | 65 | * Recreate the original associative array so that a new pair with the given key |
58 | 66 | * and value is inserted before the given existing key. $original_array gets |
59 | 67 | * modified in-place. |
— | — | @@ -109,8 +117,6 @@ |
110 | 118 | $threads = $this->queries->query('recently-archived'); |
111 | 119 | $threadlinks = $this->permalinksForThreads($threads); |
112 | 120 | |
113 | | - wfLoadExtensionMessages( 'LiquidThreads' ); |
114 | | - |
115 | 121 | if ( count($threadlinks) > 0 ) { |
116 | 122 | $this->openDiv('lqt_archive_teaser'); |
117 | 123 | $this->output->addHTML(wfMsg('lqt_recently_archived')); |
— | — | @@ -130,7 +136,6 @@ |
131 | 137 | function showHeader() { |
132 | 138 | /* Show the contents of the actual talkpage article if it exists. */ |
133 | 139 | |
134 | | - wfLoadExtensionMessages( 'LiquidThreads' ); |
135 | 140 | $article = new Article( $this->title ); |
136 | 141 | $revision = Revision::newFromId($article->getLatest()); |
137 | 142 | if( $revision ) $article_text = $revision->getRawText(); |
— | — | @@ -886,7 +891,6 @@ |
887 | 892 | |
888 | 893 | function execute( $par = null ) { |
889 | 894 | global $wgOut, $wgRequest, $wgTitle, $wgUser; |
890 | | - wfLoadExtensionMessages( 'LiquidThreads' ); |
891 | 895 | $this->user = $wgUser; |
892 | 896 | $this->output = $wgOut; |
893 | 897 | $this->request = $wgRequest; |
— | — | @@ -1017,7 +1021,6 @@ |
1018 | 1022 | |
1019 | 1023 | function execute( $par = null ) { |
1020 | 1024 | global $wgOut, $wgRequest, $wgTitle, $wgUser; |
1021 | | - wfLoadExtensionMessages( 'LiquidThreads' ); |
1022 | 1025 | $this->user = $wgUser; |
1023 | 1026 | $this->output = $wgOut; |
1024 | 1027 | $this->request = $wgRequest; |
— | — | @@ -1202,7 +1205,6 @@ |
1203 | 1206 | |
1204 | 1207 | function execute( $par = null ) { |
1205 | 1208 | global $wgOut, $wgRequest, $wgTitle, $wgUser; |
1206 | | - wfLoadExtensionMessages( 'LiquidThreads' ); |
1207 | 1209 | $this->user = $wgUser; |
1208 | 1210 | $this->output = $wgOut; |
1209 | 1211 | $this->request = $wgRequest; |