jenkins-bot has submitted this change and it was merged.
Change subject: Fix PHP CodeSniffer warnings and errors
......................................................................
Fix PHP CodeSniffer warnings and errors
Also apply formatting convention.
Change-Id: I792210d0d1c5f9089a71cecba95e17822f6da0e3
---
M maintenance/cleanupTable.inc
M maintenance/cleanupTitles.php
2 files changed, 15 insertions(+), 10 deletions(-)
Approvals:
Hashar: Looks good to me, approved
jenkins-bot: Verified
diff --git a/maintenance/cleanupTable.inc b/maintenance/cleanupTable.inc
index 48bb53e..cbd1be6 100644
--- a/maintenance/cleanupTable.inc
+++ b/maintenance/cleanupTable.inc
@@ -109,8 +109,8 @@
$dbr = wfGetDB( DB_SLAVE );
if ( array_diff( array_keys( $params ),
- array( 'table', 'conds', 'index', 'callback' ) ) )
- {
+ array( 'table', 'conds', 'index', 'callback' ) )
+ ) {
throw new MWException( __METHOD__ . ': Missing
parameter ' . implode( ', ', $params ) );
}
@@ -119,7 +119,6 @@
$count = $dbr->estimateRowCount( $table, '*', '', __METHOD__ );
$this->init( $count, $table );
$this->output( "Processing $table...\n" );
-
$index = (array)$params['index'];
$indexConds = array();
diff --git a/maintenance/cleanupTitles.php b/maintenance/cleanupTitles.php
index ae256ab..5b5ef18 100644
--- a/maintenance/cleanupTitles.php
+++ b/maintenance/cleanupTitles.php
@@ -54,9 +54,10 @@
if ( !is_null( $title )
&& $title->canExist()
&& $title->getNamespace() == $row->page_namespace
- && $title->getDBkey() === $row->page_title )
- {
- $this->progress( 0 ); // all is fine
+ && $title->getDBkey() === $row->page_title
+ ) {
+ $this->progress( 0 ); // all is fine
+
return;
}
@@ -83,6 +84,7 @@
// This is reasonable, since cleanupImages.php only iterates
over the image table.
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow( 'image', array( 'img_name' ), array(
'img_name' => $name ), __METHOD__ );
+
return $row !== false;
}
@@ -115,9 +117,11 @@
$dest = $title->getDBkey();
if ( $this->dryrun ) {
- $this->output( "DRY RUN: would rename $row->page_id
($row->page_namespace,'$row->page_title') to ($row->page_namespace,'$dest')\n"
);
+ $this->output( "DRY RUN: would rename $row->page_id
($row->page_namespace," .
+ "'$row->page_title') to
($row->page_namespace,'$dest')\n" );
} else {
- $this->output( "renaming $row->page_id
($row->page_namespace,'$row->page_title') to ($row->page_namespace,'$dest')\n"
);
+ $this->output( "renaming $row->page_id
($row->page_namespace," .
+ "'$row->page_title') to
($row->page_namespace,'$dest')\n" );
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'page',
array( 'page_title' => $dest ),
@@ -160,9 +164,11 @@
$dest = $title->getDBkey();
if ( $this->dryrun ) {
- $this->output( "DRY RUN: would rename $row->page_id
($row->page_namespace,'$row->page_title') to ($ns,'$dest')\n" );
+ $this->output( "DRY RUN: would rename $row->page_id
($row->page_namespace," .
+ "'$row->page_title') to ($ns,'$dest')\n" );
} else {
- $this->output( "renaming $row->page_id
($row->page_namespace,'$row->page_title') to ($ns,'$dest')\n" );
+ $this->output( "renaming $row->page_id
($row->page_namespace," .
+ "'$row->page_title') to ($ns,'$dest')\n" );
$dbw = wfGetDB( DB_MASTER );
$dbw->update( 'page',
array(
--
To view, visit https://gerrit.wikimedia.org/r/88513
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I792210d0d1c5f9089a71cecba95e17822f6da0e3
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Parent5446 <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits