* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
- * @package MediaWiki
- * @subpackage SpecialPage
+ * @addtogroup SpecialPage
*/
$originalDir = getcwd();
require_once( 'commandLine.inc' );
-require_once( 'SpecialExport.php' );
-require_once( 'maintenance/backup.inc' );
+require_once( 'backup.inc' );
/**
* Stream wrapper around 7za filter program.
$this->initProgress( $this->history );
- $this->db =& $this->backupDb();
+ $this->db = $this->backupDb();
$this->egress = new ExportProgressFilter( $this->sink, $this );
}
while( true ) {
try {
- return $this->doGetText( $id );
+ $text = $this->doGetText( $id );
+ $ex = new MWException("Graceful storage failure");
} catch (DBQueryError $ex) {
+ $text = false;
+ }
+ if( $text === false ) {
$this->failures++;
if( $this->failures > $this->maxFailures ) {
throw $ex;
} else {
$this->progress( "Database failure $this->failures " .
- "of allowed $this->maxFailures! " .
+ "of allowed $this->maxFailures for revision $id! " .
"Pausing $this->failureTimeout seconds..." );
sleep( $this->failureTimeout );
}
+ } else {
+ return $text;
}
}
}
array( 'old_id' => $id ),
'TextPassDumper::getText' );
$text = Revision::getRevisionText( $row );
+ if( $text === false ) {
+ return false;
+ }
$stripped = str_replace( "\r", "", $text );
$normalized = UtfNormal::cleanUp( $stripped );
return $normalized;
);
}
-?>
+