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
Merge "Introduce top level service locator."
[lhc/web/wiklou.git]
/
maintenance
/
fetchText.php
diff --git
a/maintenance/fetchText.php
b/maintenance/fetchText.php
index
983b772
..
7e1b527
100644
(file)
--- a/
maintenance/fetchText.php
+++ b/
maintenance/fetchText.php
@@
-32,9
+32,10
@@
require_once __DIR__ . '/Maintenance.php';
class FetchText extends Maintenance {
public function __construct() {
parent::__construct();
class FetchText extends Maintenance {
public function __construct() {
parent::__construct();
- $this->
mDescription =
"Fetch the raw revision blob from an old_id.\n" .
+ $this->
addDescription(
"Fetch the raw revision blob from an old_id.\n" .
"NOTE: Export transformations are NOT applied. " .
"NOTE: Export transformations are NOT applied. " .
- "This is left to backupTextPass.php";
+ "This is left to backupTextPass.php"
+ );
}
/**
}
/**
@@
-48,7
+49,7
@@
class FetchText extends Maintenance {
* note that the text string itself is *not* followed by newline
*/
public function execute() {
* note that the text string itself is *not* followed by newline
*/
public function execute() {
- $db =
wfG
etDB( DB_SLAVE );
+ $db =
$this->g
etDB( DB_SLAVE );
$stdin = $this->getStdin();
while ( !feof( $stdin ) ) {
$line = fgets( $stdin );
$stdin = $this->getStdin();
while ( !feof( $stdin ) ) {
$line = fgets( $stdin );
@@
-77,8
+78,8
@@
class FetchText extends Maintenance {
private function doGetText( $db, $id ) {
$id = intval( $id );
$row = $db->selectRow( 'text',
private function doGetText( $db, $id ) {
$id = intval( $id );
$row = $db->selectRow( 'text',
-
array( 'old_text', 'old_flags' )
,
-
array( 'old_id' => $id )
,
+
[ 'old_text', 'old_flags' ]
,
+
[ 'old_id' => $id ]
,
__METHOD__ );
$text = Revision::getRevisionText( $row );
if ( $text === false ) {
__METHOD__ );
$text = Revision::getRevisionText( $row );
if ( $text === false ) {