From: Alex Z Date: Sat, 23 Jan 2010 02:00:38 +0000 (+0000) Subject: Fix for r61391, which broke user JS. Use makeTitleSafe() instead of X-Git-Tag: 1.31.0-rc.0~38150 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=d2a3a4b444764cfe68937ae93f672b74f5420b56;p=lhc%2Fweb%2Fwiklou.git Fix for r61391, which broke user JS. Use makeTitleSafe() instead of newFromText(), use the NS_USER constant directly. --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 04f1f0480f..2d1ea8c5de 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1725,9 +1725,9 @@ class OutputPage { $this->addInlineScript( $wgRequest->getText( 'wpTextbox1' ) ); } else { $userpage = $wgUser->getUserPage(); - $scriptpage = Title::newFromText( - $userpage->getNamespace(), - $userpage->getPrefixedText() . '/' . $sk->getSkinName() . '.js' + $scriptpage = Title::makeTitleSafe( + NS_USER, + $userpage->getDBkey() . '/' . $sk->getSkinName() . '.js' ); if ( $scriptpage && $scriptpage->exists() ) { $userjs = Skin::makeUrl( $scriptpage->getPrefixedText(), 'action=raw&ctype=' . $wgJsMimeType );