r102790 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102789‎ | r102790 | r102791 >
Date:15:28, 11 November 2011
Author:catrope
Status:ok
Tags:
Comment:
[RL2] Revert r102409, this is just getting in the way and causing underscores to be displayed. The issue it tried to address was fixed in r102789
Modified paths:
  • /branches/RL2/extensions/Gadgets/Gadgets.hooks.php (modified) (history)

Diff [purge]

Index: branches/RL2/extensions/Gadgets/Gadgets.hooks.php
@@ -19,7 +19,7 @@
2020 * @return string Gadget id or null if not a gadget definition page
2121 */
2222 public static function getIDFromTitle( Title $title ) {
23 - $id = $title->getDBKey();
 23+ $id = $title->getText();
2424 if ( $title->getNamespace() !== NS_GADGET_DEFINITION || !preg_match( '!\.js$!u', $id ) ) {
2525 // Not a gadget definition page
2626 return null;
@@ -418,7 +418,7 @@
419419
420420 public static function titleIsCssOrJsPage( $title, &$result ) {
421421 if ( ( $title->getNamespace() == NS_GADGET || $title->getNamespace() == NS_GADGET_DEFINITION ) &&
422 - preg_match( '!\.(css|js)$!u', $title->getDBKey() ) )
 422+ preg_match( '!\.(css|js)$!u', $title->getText() ) )
423423 {
424424 $result = true;
425425 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102409[RL2] Consistently use $title->getDBKey() instead of $title->getText() to bui...catrope16:10, 8 November 2011
r102789[RL2] Use custom names and IDs for gadgets on the preferences page, and set t...catrope15:19, 11 November 2011

Status & tagging log