summaryrefslogtreecommitdiff
path: root/maintenance/storage/checkStorage.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/storage/checkStorage.php')
-rw-r--r--maintenance/storage/checkStorage.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/maintenance/storage/checkStorage.php b/maintenance/storage/checkStorage.php
index af1f9ee2..6c669bfa 100644
--- a/maintenance/storage/checkStorage.php
+++ b/maintenance/storage/checkStorage.php
@@ -22,7 +22,7 @@
*/
if ( !defined( 'MEDIAWIKI' ) ) {
- require_once( dirname( __FILE__ ) . '/../commandLine.inc' );
+ require_once( __DIR__ . '/../commandLine.inc' );
$cs = new CheckStorage;
$fix = isset( $options['fix'] );
@@ -381,14 +381,15 @@ class CheckStorage {
$extDb->freeResult( $res );
// Print errors for missing blobs rows
- foreach ( $oldIds as $blobId => $oldIds ) {
- $this->error( 'restore text', "Error: missing target $cluster/$blobId for two-part ES URL", $oldIds );
+ foreach ( $oldIds as $blobId => $oldIds2 ) {
+ $this->error( 'restore text', "Error: missing target $cluster/$blobId for two-part ES URL", $oldIds2 );
}
}
}
function restoreText( $revIds, $xml ) {
- global $wgTmpDirectory, $wgDBname;
+ global $wgDBname;
+ $tmpDir = wfTempDir();
if ( !count( $revIds ) ) {
return;
@@ -396,8 +397,8 @@ class CheckStorage {
print "Restoring text from XML backup...\n";
- $revFileName = "$wgTmpDirectory/broken-revlist-$wgDBname";
- $filteredXmlFileName = "$wgTmpDirectory/filtered-$wgDBname.xml";
+ $revFileName = "$tmpDir/broken-revlist-$wgDBname";
+ $filteredXmlFileName = "$tmpDir/filtered-$wgDBname.xml";
// Write revision list
if ( !file_put_contents( $revFileName, implode( "\n", $revIds ) ) ) {
@@ -481,4 +482,3 @@ class CheckStorage {
$this->errors['fixed'][$id] = true;
}
}
-