r98565 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98564‎ | r98565 | r98566 >
Date:21:10, 30 September 2011
Author:johnduhart
Status:ok (Comments)
Tags:
Comment:
Followup r98563, don't need those messages anymore
Modified paths:
  • /trunk/extensions/CategoryTree/CategoryTreeFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CategoryTree/CategoryTreeFunctions.php
@@ -161,29 +161,8 @@
162162 * @param OutputPage $outputPage
163163 */
164164 static function setHeaders( $outputPage ) {
165 - global $wgJsMimeType, $wgScriptPath, $wgContLang;
166 - global $wgCategoryTreeHijackPageCategories, $wgCategoryTreeExtPath, $wgCategoryTreeVersion;
167 -
168165 # Add the module
169166 $outputPage->addModules( 'ext.categoryTree' );
170 -
171 - # Add messages
172 - $outputPage->addScript(
173 - " <script type=\"{$wgJsMimeType}\">
174 - var categoryTreeCollapseMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-collapse' ) ) . "\";
175 - var categoryTreeExpandMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-expand' ) ) . "\";
176 - var categoryTreeCollapseBulletMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-collapse-bullet' ) ) . "\";
177 - var categoryTreeExpandBulletMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-expand-bullet' ) ) . "\";
178 - var categoryTreeLoadMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-load' ) ) . "\";
179 - var categoryTreeLoadingMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-loading' ) ) . "\";
180 - var categoryTreeNothingFoundMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-nothing-found' ) ) . "\";
181 - var categoryTreeNoSubcategoriesMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-no-subcategories' ) ) . "\";
182 - var categoryTreeNoParentCategoriesMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-no-parent-categories' ) ) . "\";
183 - var categoryTreeNoPagesMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-no-pages' ) ) . "\";
184 - var categoryTreeErrorMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-error' ) ) . "\";
185 - var categoryTreeRetryMsg = \"" . Xml::escapeJsString( wfMsgNoTrans( 'categorytree-retry' ) ) . "\";
186 - </script>\n"
187 - );
188167 }
189168
190169 static function getJsonCodec() {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98563Followup r98500, conversion of the Javascript to use jQuery fully. It also ma...johnduhart21:08, 30 September 2011

Comments

#Comment by Nikerabbit (talk | contribs)   06:15, 1 October 2011

Looks like the whole function is now useless, and could be replaced with direct call to addModules.

#Comment by Johnduhart (talk | contribs)   16:35, 1 October 2011

I agree however due to the spagetti mess that is CategoryTree it's probably easier to leave this for right now.

Status & tagging log