X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=wiki.phtml;h=a1975457e1d1f37ea82be89120be40584ea72985;hp=d30db092bef7bfe046c5e9d4b31f003720b12a59;hb=7ab3e13464cf8f023f727df956a42830885a2718;hpb=d8a613a518ab410733db4c911fcbfedb4c5d9cb1 diff --git a/wiki.phtml b/wiki.phtml index d30db092be..a1975457e1 100644 --- a/wiki.phtml +++ b/wiki.phtml @@ -1,102 +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(); } - -?> +