*
* @param String $title
* @param String $action
- * @param OutputPage $output
- * @param WebRequest $request
- * @param Language $lang
* @return Title object to be $wgTitle
*/
- function checkInitialQueries( $title, $action, &$output, $request, $lang ) {
- if( $request->getVal( 'printable' ) == 'yes' ){
- $output->setPrintable();
+ function checkInitialQueries( $title, $action ) {
+ global $wgOut, $wgRequest, $wgContLang;
+ if( $wgRequest->getVal( 'printable' ) == 'yes' ){
+ $wgOut->setPrintable();
}
$ret = NULL;
if ( '' == $title && 'delete' != $action ) {
$ret = Title::newMainPage();
- } elseif ( $curid = $request->getInt( 'curid' ) ) {
+ } elseif ( $curid = $wgRequest->getInt( 'curid' ) ) {
# URLs like this are generated by RC, because rc_title isn't always accurate
$ret = Title::newFromID( $curid );
} else {
$ret = Title::newFromURL( $title );
// check variant links so that interwiki links don't have to worry
// about the possible different language variants
- if( count( $lang->getVariants() ) > 1 && !is_null( $ret ) && $ret->getArticleID() == 0 )
+ if( count( $wgContLang->getVariants() ) > 1 && !is_null( $ret ) && $ret->getArticleID() == 0 )
$lang->findVariantLink( $title, $ret );
}
- if ( ( $oldid = $request->getInt( 'oldid' ) )
+ if ( ( $oldid = $wgRequest->getInt( 'oldid' ) )
&& ( is_null( $ret ) || $ret->getNamespace() != NS_SPECIAL ) ) {
// Allow oldid to override a changed or missing title.
$rev = Revision::newFromId( $oldid );
$action = $wgRequest->getVal( 'action', 'view' );
$title = $wgRequest->getVal( 'title' );
-$wgTitle = $mediaWiki->checkInitialQueries( $title, $action, $wgOut, $wgRequest, $wgContLang );
+$wgTitle = $mediaWiki->checkInitialQueries( $title, $action );
if ($wgTitle == NULL) {
unset( $wgTitle );
}