$IP = "." ;
require_once( 'includes/DefaultSettings.php' ); # used for printing the version
?>
-<!DOCTYPE html PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>MediaWiki <?php echo $wgVersion ?></title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
-
<style type='text/css' media='screen, projection'>
html, body {
color: #000;
background-color: #fff;
- font-family: serif;
- text-align:center;
+ font-family: sans-serif;
+ text-align: center;
}
h1 {
if ( file_exists( 'config/LocalSettings.php' ) ) {
echo( "To complete the installation, move <tt>config/LocalSettings.php</tt> to the parent directory." );
} else {
- echo( "You'll have to <a href='config/index.php' title='setup'>set the wiki up</a> first!" );
+ echo( "Please <a href='config/index.php' title='setup'>setup the wiki</a> first." );
}
?>
wfSpecialSearch();
} else if( !$wgTitle or $wgTitle->getDBkey() == '' ) {
$wgTitle = Title::newFromText( wfMsgForContent( 'badtitle' ) );
+ $wgOut->setStatusCode( 404 );
$wgOut->errorpage( 'badtitle', 'badtitletext' );
} else if ( $wgTitle->getInterwiki() != '' ) {
if( $rdfrom = $wgRequest->getVal( 'rdfrom' ) ) {
$wgOut->redirect( $url );
} else {
$wgTitle = Title::newFromText( wfMsgForContent( 'badtitle' ) );
+ $wgOut->setStatusCode( 404 );
$wgOut->errorpage( 'badtitle', 'badtitletext' );
}
} else if ( ( $action == 'view' ) &&
$wgTitle = Title::makeTitle( NS_IMAGE, $wgTitle->getDBkey() );
}
+ if ( !$wgTitle->exists() ) {
+ $wgOut->setStatusCode( 404 );
+ }
+
$ns = $wgTitle->getNamespace();
// Namespace might change when using redirects
- if($action == 'view') {
+ if($action == 'view' && !$wgRequest->getVal( 'oldid' ) ) {
$wgArticle = new Article( $wgTitle );
$rTitle = Title::newFromRedirect( $wgArticle->fetchContent() );
if($rTitle) {
- if( $rTitle->getNamespace() == $ns ) {
- $wgArticle->mContentLoaded=false;
- }
+ # Reload from the page pointed to later
+ $wgArticle->mContentLoaded = false;
$ns = $rTitle->getNamespace();
}
}
}
if ( in_array( $action, $wgDisabledActions ) ) {
+ $wgOut->setStatusCode( 404 );
$wgOut->errorpage( 'nosuchaction', 'nosuchactiontext' );
} else {
switch( $action ) {
break;
default:
if (wfRunHooks('UnknownAction', array($action, $wgArticle))) {
+ $wgOut->setStatusCode( 404 );
$wgOut->errorpage( 'nosuchaction', 'nosuchactiontext' );
}
}