aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authornobody <nobody@localhost>2004-06-27 00:05:32 +0000
committernobody <nobody@localhost>2004-06-27 00:05:32 +0000
commit0c1d741ff4792d486258b390cf50cf3f9e229511 (patch)
tree55961c46b433ade0739763bee2ba3c4843d13751 /index.php
parentd5c8171a3157337557bc54ecb730d7dd35778ca3 (diff)
parent1aaed5fd7c7f4d7ea7abbfc7915bab5954d60a30 (diff)
downloadmediawikicore-0c1d741ff4792d486258b390cf50cf3f9e229511.tar.gz
mediawikicore-0c1d741ff4792d486258b390cf50cf3f9e229511.zip
This commit was manufactured by cvs2svn to create tag1.3.0beta4a
'REL1_3_0beta4a'.
Diffstat (limited to 'index.php')
-rw-r--r--index.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/index.php b/index.php
index b52395b056c5..9eb5e29f5d5c 100644
--- a/index.php
+++ b/index.php
@@ -48,7 +48,7 @@ wfProfileOut( "main-misc-setup" );
# If the user is not logged in, the Namespace:title of the article must be in
# the Read array in order for the user to see it. (We have to check here to
# catch special pages etc. We check again in Article::view())
-if ( !$wgTitle->userCanRead() ) {
+if ( !is_null( $wgTitle ) && !$wgTitle->userCanRead() ) {
$wgOut->loginToUse();
$wgOut->output();
exit;
@@ -56,7 +56,7 @@ if ( !$wgTitle->userCanRead() ) {
if ( $search = $wgRequest->getText( 'search' ) ) {
$wgTitle = Title::makeTitle( NS_SPECIAL, "Search" );
- if( $wgRequest->getVal( 'fulltext' ) ) {
+ if( $wgRequest->getVal( 'fulltext' ) || !is_null( $wgRequest->getVal( 'offset' ) ) ) {
wfSearch( $search );
} else {
wfGo( $search );
@@ -67,7 +67,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) {
} else if ( $wgTitle->getInterwiki() != "" ) {
$url = $wgTitle->getFullURL();
# Check for a redirect loop
- if ( !preg_match( "/^" . preg_quote( $wgServer ) . "/", $url ) && $wgTitle->isLocal() ) {
+ if ( !preg_match( "/^" . preg_quote( $wgServer, "/" ) . "/", $url ) && $wgTitle->isLocal() ) {
$wgOut->redirect( $url );
} else {
$wgTitle = Title::newFromText( wfMsg( "badtitle" ) );
@@ -77,6 +77,9 @@ if ( $search = $wgRequest->getText( 'search' ) ) {
/* redirect to canonical url, make it a 301 to allow caching */
$wgOut->redirect( $wgTitle->getFullURL(), '301');
} else if ( Namespace::getSpecial() == $wgTitle->getNamespace() ) {
+ # actions that need to be made when we have a special pages
+ require_once( 'includes/SpecialPage.php' );
+ if ( !$wgAllowSysopQueries ) {SpecialPage::removePage( 'Asksql' ); }
SpecialPage::executePath( $wgTitle );
} else {
if ( Namespace::getMedia() == $wgTitle->getNamespace() ) {
@@ -151,6 +154,7 @@ if ( $search = $wgRequest->getText( 'search' ) ) {
case "purge":
wfPurgeSquidServers(array($wgTitle->getInternalURL()));
$wgOut->setSquidMaxage( $wgSquidMaxage );
+ $wgTitle->invalidateCache();
$wgArticle->view();
break;
default: