dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
In recompressTracked.php, fix the names of things related to child processes
[lhc/web/wiklou.git]
/
maintenance
/
storage
/
dumpRev.php
diff --git
a/maintenance/storage/dumpRev.php
b/maintenance/storage/dumpRev.php
index
91a5f3b
..
7d9883e
100644
(file)
--- a/
maintenance/storage/dumpRev.php
+++ b/
maintenance/storage/dumpRev.php
@@
-22,6
+22,7
@@
*/
use MediaWiki\MediaWikiServices;
*/
use MediaWiki\MediaWikiServices;
+use MediaWiki\Revision\SlotRecord;
require_once __DIR__ . '/../Maintenance.php';
require_once __DIR__ . '/../Maintenance.php';
@@
-38,7
+39,7
@@
class DumpRev extends Maintenance {
}
public function execute() {
}
public function execute() {
- $id = (int)$this->getArg();
+ $id = (int)$this->getArg(
0
);
$lookup = MediaWikiServices::getInstance()->getRevisionLookup();
$rev = $lookup->getRevisionById( $id );
$lookup = MediaWikiServices::getInstance()->getRevisionLookup();
$rev = $lookup->getRevisionById( $id );
@@
-46,13
+47,13
@@
class DumpRev extends Maintenance {
$this->fatalError( "Row not found" );
}
$this->fatalError( "Row not found" );
}
- $content = $rev->getContent(
'main'
);
+ $content = $rev->getContent(
SlotRecord::MAIN
);
if ( !$content ) {
$this->fatalError( "Text not found" );
}
$blobStore = MediaWikiServices::getInstance()->getBlobStore();
if ( !$content ) {
$this->fatalError( "Text not found" );
}
$blobStore = MediaWikiServices::getInstance()->getBlobStore();
- $slot = $rev->getSlot(
'main'
);
+ $slot = $rev->getSlot(
SlotRecord::MAIN
);
$text = $blobStore->getBlob( $slot->getAddress() );
$this->output( "Text length: " . strlen( $text ) . "\n" );
$text = $blobStore->getBlob( $slot->getAddress() );
$this->output( "Text length: " . strlen( $text ) . "\n" );