It's not a title object, it's a string of what title= in the URL. If you want that, use WebRequest::getText() or something. Using this string is *wrong* and any extensions should be fixed (I didn't check because $title is a PITA to grep for). Don't backport to 1.17 because this is trivial, harmless, and may Break Something.
(Also made fileCachedPage private since it has no outside callers and I can't see any reason why you should)
return $trygoogle;
}
- function fileCachedPage() {
- global $wgTitle, $title, $wgLang, $wgOut;
+ private function fileCachedPage() {
+ global $wgTitle, $wgLang, $wgOut;
if ( $wgOut->isDisabled() ) {
return; // Done already?
$mainpage = 'Main Page';
if ( $wgLang instanceof Language ) {
- $mainpage = htmlspecialchars( $wgLang->getMessage( 'mainpage' ) );
+ $mainpage = htmlspecialchars( $wgLang->getMessage( 'mainpage' ) );
}
if ( $wgTitle ) {
$t =& $wgTitle;
- } elseif ( $title ) {
- $t = Title::newFromURL( $title );
} else {
$t = Title::newFromText( $mainpage );
}