$value) { wfDebug( "$name: $value\n" ); } wfDebug( "\n" ); # Query string fields # global $action, $title, $search, $go, $target, $printable; global $returnto, $diff, $oldid; $action = strtolower( trim( $action ) ); if ( "" == $action ) { $action = "view"; } if ( "yes" == $printable ) { $wgOut->setPrintable(); } if ( "" == $title && "delete" != $action ) { $wgTitle = Title::newFromText( wfMsg( "mainpage" ) ); } else { $wgTitle = Title::newFromURL( $title ); # if( $wgTitle->getInterwiki() != "" or $wgTitle->getDBkey() == "" or strncmp($wgTitle->getDBkey(),"_",1) == 0 ) { if( $wgTitle->getInterwiki() != "" or $wgTitle->getDBkey() == "" ) { $wgOut->errorpage( "badtitle", "badtitletext" ); $wgOut->output(); exit; } } wfProfileOut(); if ( -1 == $wgTitle->getNamespace() ) { wfSpecialPage(); } else if ( "" != $search ) { include_once( "$IP/SearchEngine.php" ); if($go) { wfGo ($search); } else { wfSearch( $search ); } } else { switch( $wgTitle->getNamespace() ) { case 6: include_once( "$IP/ImagePage.php" ); $wgArticle = new ImagePage( $wgTitle ); break; default: $wgArticle = new Article( $wgTitle ); } switch( $action ) { case "view": case "watch": case "unwatch": case "history": case "delete": case "revert": case "rollback": case "protect": case "unprotect": $wgArticle->$action(); break; case "print": $wgArticle->view(); break; case "edit": case "submit": include_once( "$IP/EditPage.php" ); $editor = new EditPage( $wgArticle ); $editor->$action(); break; default: $wgOut->errorpage( "nosuchaction", "nosuchactiontext" ); } } $wgOut->output(); foreach ( $wgDeferredUpdateList as $up ) { $up->doUpdate(); } ?>