r80003 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80002‎ | r80003 | r80004 >
Date:13:41, 11 January 2011
Author:catrope
Status:ok
Tags:
Comment:
Apply array_unique() to module lists in OutputPage, should prevent lots of duplicate 'ext.liquidThreads' elements in the module array reported by thedj
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -233,7 +233,7 @@
234234 * @return Array of module names
235235 */
236236 public function getModules() {
237 - return $this->mModules;
 237+ return array_unique( $this->mModules );
238238 }
239239
240240 /**
@@ -252,7 +252,7 @@
253253 * @return array of module names
254254 */
255255 public function getModuleScripts() {
256 - return $this->mModuleScripts;
 256+ return array_unique( $this->mModuleScripts );
257257 }
258258
259259 /**
@@ -272,7 +272,7 @@
273273 * @return Array of module names
274274 */
275275 public function getModuleStyles() {
276 - return $this->mModuleStyles;
 276+ return array_unique( $this->mModuleStyles );
277277 }
278278
279279 /**
@@ -292,7 +292,7 @@
293293 * @return Array of module names
294294 */
295295 public function getModuleMessages() {
296 - return $this->mModuleMessages;
 296+ return array_unique( $this->mModuleMessages );
297297 }
298298
299299 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r80005Followup r80003: array_unique() preserves keys, so we got module arrays that ...catrope13:51, 11 January 2011
r810091.17: MFT r79839, r79862, r79863, r79895, r80003, r80005, r80164, r80692catrope00:20, 26 January 2011

Status & tagging log