diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2014-12-27 15:41:37 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2014-12-31 11:43:28 +0100 |
commit | c1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch) | |
tree | 2b38796e738dd74cb42ecd9bfd151803108386bc /maintenance/fixExtLinksProtocolRelative.php | |
parent | b88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff) |
Update to MediaWiki 1.24.1
Diffstat (limited to 'maintenance/fixExtLinksProtocolRelative.php')
-rw-r--r-- | maintenance/fixExtLinksProtocolRelative.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/maintenance/fixExtLinksProtocolRelative.php b/maintenance/fixExtLinksProtocolRelative.php index 02d65ed1..0c60e62c 100644 --- a/maintenance/fixExtLinksProtocolRelative.php +++ b/maintenance/fixExtLinksProtocolRelative.php @@ -34,7 +34,8 @@ require_once __DIR__ . '/Maintenance.php'; class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance { public function __construct() { parent::__construct(); - $this->mDescription = "Fixes any entries in the externallinks table containing protocol-relative URLs"; + $this->mDescription = + "Fixes any entries in the externallinks table containing protocol-relative URLs"; } protected function getUpdateKey() { @@ -49,6 +50,7 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance { $db = wfGetDB( DB_MASTER ); if ( !$db->tableExists( 'externallinks' ) ) { $this->error( "externallinks table does not exist" ); + return false; } $this->output( "Fixing protocol-relative entries in the externallinks table...\n" ); @@ -79,9 +81,18 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance { ) ), __METHOD__, array( 'IGNORE' ) ); - $db->delete( 'externallinks', array( 'el_index' => $row->el_index, 'el_from' => $row->el_from, 'el_to' => $row->el_to ), __METHOD__ ); + $db->delete( + 'externallinks', + array( + 'el_index' => $row->el_index, + 'el_from' => $row->el_from, + 'el_to' => $row->el_to + ), + __METHOD__ + ); } $this->output( "Done, $count rows updated.\n" ); + return true; } } |