Replaced calls to exit() with wfAbruptExit().
authorMr. E23 <e23@users.mediawiki.org>
Wed, 10 Dec 2003 15:05:08 +0000 (15:05 +0000)
committerMr. E23 <e23@users.mediawiki.org>
Wed, 10 Dec 2003 15:05:08 +0000 (15:05 +0000)
includes/Article.php
includes/DatabaseFunctions.php
includes/OutputPage.php
includes/SpecialExport.php

index 84bbdad..dc654ee 100644 (file)
@@ -1212,7 +1212,7 @@ class Article {
                                wfDebug( " tryFileCache() - about to load\n" );
                                $cache->loadFromFileCache();
                                $wgOut->reportTime(); # For profiling
-                               exit;
+                               wfAbruptExit();
                        } else {
                                wfDebug( " tryFileCache() - starting buffer\n" );                       
                                if($cache->useGzip() && wfClientAcceptsGzip()) {
index 9a05c62..9e4779a 100644 (file)
@@ -87,7 +87,7 @@ function wfEmergencyAbort( $msg = "" ) {
        header( "Cache-control: none" );
        header( "Pragma: nocache" );
        echo $text;
-       exit;
+       wfAbruptExit();
 }
 
 # $db: DB_READ  = -1    read from slave (or only server)
@@ -102,7 +102,6 @@ function wfQuery( $sql, $db, $fname = "" )
                # wfGeneralizeSQL will probably cut down the query to reasonable
                # logging size most of the time. The substr is really just a sanity check.
                $profName = "wfQuery: " . substr( wfGeneralizeSQL( $sql ), 0, 255 ); 
-
                wfProfileIn( $profName );
        }
 
@@ -128,7 +127,7 @@ function wfQuery( $sql, $db, $fname = "" )
 
        if ( false === $ret ) {
                $wgOut->databaseError( $fname );
-               exit;
+               wfAbruptExit();
        }
        
        if ( $wgProfiling ) {
index cdd84c2..ab2c72d 100644 (file)
@@ -75,7 +75,7 @@ class OutputPage {
                                header( "Last-Modified: {$lastmod}" );                  
                                wfDebug( "CACHED client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false );
                                $this->reportTime(); # For profiling
-                               exit;
+                               wfAbruptExit();
                        } else {
                                wfDebug( "READY  client: $ismodsince ; user: $wgUser->mTouched ; page: $timestamp\n", false );
                                $this->mLastModified = $lastmod;
@@ -362,7 +362,7 @@ class OutputPage {
                $this->returnToMain( false );
 
                $this->output();
-               exit;
+               wfAbruptExit();
        }
 
        function sysopRequired()
@@ -418,7 +418,7 @@ class OutputPage {
                
                if ( $wgCommandLineMode ) {
                        print "$msg\n";
-                       exit();
+                       wfAbruptExit();
                }
                $sk = $wgUser->getSkin();
                $shlink = $sk->makeKnownLink( wfMsgNoDB( "searchhelppage" ),
@@ -427,7 +427,7 @@ class OutputPage {
 
                $this->mBodytext = $msg;
                $this->output();
-               exit();
+               wfAbruptExit();
        }
 
        function readOnlyPage( $source = "", $protected = false )
@@ -465,7 +465,7 @@ class OutputPage {
 
                $this->mBodytext = $message;
                $this->output();
-               exit;
+               wfAbruptExit();
        }
 
        function unexpectedValueError( $name, $val )
index 4788299..7985b4b 100644 (file)
@@ -15,7 +15,7 @@ function wfSpecialExport( $page = "" ) {
                $pages = explode( "\n", $page );
                $xml = pages2xml( $pages, $curonly );
                echo $xml;
-               exit();
+               wfAbruptExit();
        }
        
        $wgOut->addWikiText( wfMsg( "exporttext" ) );