r61406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61405‎ | r61406 | r61407 >
Date:02:00, 23 January 2010
Author:mrzman
Status:ok
Tags:
Comment:
Fix for r61391, which broke user JS. Use makeTitleSafe() instead of
newFromText(), use the NS_USER constant directly.
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1725,9 +1725,9 @@
17261726 $this->addInlineScript( $wgRequest->getText( 'wpTextbox1' ) );
17271727 } else {
17281728 $userpage = $wgUser->getUserPage();
1729 - $scriptpage = Title::newFromText(
1730 - $userpage->getNamespace(),
1731 - $userpage->getPrefixedText() . '/' . $sk->getSkinName() . '.js'
 1729+ $scriptpage = Title::makeTitleSafe(
 1730+ NS_USER,
 1731+ $userpage->getDBkey() . '/' . $sk->getSkinName() . '.js'
17321732 );
17331733 if ( $scriptpage && $scriptpage->exists() ) {
17341734 $userjs = Skin::makeUrl( $scriptpage->getPrefixedText(), 'action=raw&ctype=' . $wgJsMimeType );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r61391Wrap skin specific user js addition inside Title::exists...nikerabbit20:39, 22 January 2010

Status & tagging log