diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /maintenance/storage/dumpRev.php | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'maintenance/storage/dumpRev.php')
-rw-r--r-- | maintenance/storage/dumpRev.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/maintenance/storage/dumpRev.php b/maintenance/storage/dumpRev.php index 95404244..b200d8af 100644 --- a/maintenance/storage/dumpRev.php +++ b/maintenance/storage/dumpRev.php @@ -18,7 +18,7 @@ * @ingroup Maintenance ExternalStorage */ -require_once( dirname(__FILE__) . '/../Maintenance.php' ); +require_once( dirname( __FILE__ ) . '/../Maintenance.php' ); class DumpRev extends Maintenance { public function __construct() { @@ -28,15 +28,15 @@ class DumpRev extends Maintenance { public function execute() { $dbr = wfGetDB( DB_SLAVE ); - $row = $dbr->selectRow( - array( 'text', 'revision' ), - array( 'old_flags', 'old_text' ), + $row = $dbr->selectRow( + array( 'text', 'revision' ), + array( 'old_flags', 'old_text' ), array( 'old_id=rev_text_id', 'rev_id' => $this->getArg() ) ); if ( !$row ) { $this->error( "Row not found", true ); } - + $flags = explode( ',', $row->old_flags ); $text = $row->old_text; if ( in_array( 'external', $flags ) ) { @@ -65,15 +65,15 @@ class DumpRev extends Maintenance { $obj = unserialize( $text ); $text = $obj->getText(); } - + if ( is_object( $text ) ) { $this->error( "Unexpectedly got object of type: " . get_class( $text ) ); } else { - $this->output( "Text length: " . strlen( $text ) ."\n" ); + $this->output( "Text length: " . strlen( $text ) . "\n" ); $this->output( substr( $text, 0, 100 ) . "\n" ); } } } $maintClass = "DumpRev"; -require_once( DO_MAINTENANCE ); +require_once( RUN_MAINTENANCE_IF_MAIN ); |