Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -1725,10 +1725,14 @@ |
1726 | 1726 | $this->addInlineScript( $wgRequest->getText( 'wpTextbox1' ) ); |
1727 | 1727 | } else { |
1728 | 1728 | $userpage = $wgUser->getUserPage(); |
1729 | | - $userjs = Skin::makeUrl( |
1730 | | - $userpage->getPrefixedText() . '/' . $sk->getSkinName() . '.js', |
1731 | | - 'action=raw&ctype=' . $wgJsMimeType ); |
1732 | | - $this->addScriptFile( $userjs ); |
| 1729 | + $scriptpage = Title::newFromText( |
| 1730 | + $userpage->getNamespace(), |
| 1731 | + $userpage->getPrefixedText() . '/' . $sk->getSkinName() . '.js' |
| 1732 | + ); |
| 1733 | + if ( $scriptpage && $scriptpage->exists() ) { |
| 1734 | + $userjs = Skin::makeUrl( $scriptpage->getPrefixedText(), 'action=raw&ctype=' . $wgJsMimeType ); |
| 1735 | + $this->addScriptFile( $userjs ); |
| 1736 | + } |
1733 | 1737 | } |
1734 | 1738 | } |
1735 | 1739 | |