X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=wiki.phtml;h=a1975457e1d1f37ea82be89120be40584ea72985;hp=2ab801a03d34ebac48e5e37a075607dace98cdf1;hb=444d768694c5b8868ecf283dc34b226f063c8a79;hpb=d3c61d791decc0cee3a31f350346ef0311309a6e diff --git a/wiki.phtml b/wiki.phtml index 2ab801a03d..a1975457e1 100644 --- a/wiki.phtml +++ b/wiki.phtml @@ -1,110 +1,3 @@ - $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 or $wgTitle->getInterwiki() != "" or $wgTitle->getDBkey() == "" ) { - $wgTitle = Title::newFromText( wfMsg( "badtitle" ) ); - $wgOut->errorpage( "badtitle", "badtitletext" ); - $wgOut->output(); - exit; - } -} -wfProfileOut( "main-misc-setup" ); - -if ( Namespace::getSpecial() == $wgTitle->getNamespace() ) { - wfSpecialPage(); -} else if ( "" != $search ) { - if($go) { - wfGo( $search ); - } else { - wfSearch( $search ); - } -} else { - if ( Namespace::getMedia() == $wgTitle->getNamespace() ) { - $wgTitle = Title::makeTitle( Namespace::getImage(), $wgTitle->getDBkey() ); - } - - switch( $wgTitle->getNamespace() ) { - case 6: - include_once( "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( "EditPage.php" ); - $editor = new EditPage( $wgArticle ); - $editor->$action(); - break; - default: - $wgOut->errorpage( "nosuchaction", "nosuchactiontext" ); - } -} - -$wgOut->output(); -foreach ( $wgDeferredUpdateList as $up ) { $up->doUpdate(); } - -?> +