summaryrefslogtreecommitdiff
path: root/maintenance/convertLinks.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-12-08 09:55:49 +0100
commit4ac9fa081a7c045f6a9f1cfc529d82423f485b2e (patch)
treeaf68743f2f4a47d13f2b0eb05f5c4aaf86d8ea37 /maintenance/convertLinks.php
parentaf4da56f1ad4d3ef7b06557bae365da2ea27a897 (diff)
Update to MediaWiki 1.22.0
Diffstat (limited to 'maintenance/convertLinks.php')
-rw-r--r--maintenance/convertLinks.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/maintenance/convertLinks.php b/maintenance/convertLinks.php
index 5f7b02e4..17b91110 100644
--- a/maintenance/convertLinks.php
+++ b/maintenance/convertLinks.php
@@ -21,7 +21,7 @@
* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to convert from the old links schema (string->ID)
@@ -80,9 +80,9 @@ This gives a huge speed improvement for very large links tables which are MyISAM
# --------------------------------------------------------------------
- list ( $cur, $links, $links_temp, $links_backup ) = $dbw->tableNamesN( 'cur', 'links', 'links_temp', 'links_backup' );
+ list( $cur, $links, $links_temp, $links_backup ) = $dbw->tableNamesN( 'cur', 'links', 'links_temp', 'links_backup' );
- if( $dbw->tableExists( 'pagelinks' ) ) {
+ if ( $dbw->tableExists( 'pagelinks' ) ) {
$this->output( "...have pagelinks; skipping old links table updates\n" );
return;
}
@@ -177,15 +177,16 @@ This gives a huge speed improvement for very large links tables which are MyISAM
}
$dbw->freeResult( $res );
# $this->output( "rowOffset: $rowOffset\ttuplesAdded: $tuplesAdded\tnumBadLinks: $numBadLinks\n" );
- if ( $tuplesAdded != 0 ) {
+ if ( $tuplesAdded != 0 ) {
if ( $reportLinksConvProgress ) {
$this->output( "Inserting $tuplesAdded tuples into $links_temp..." );
}
$dbw->query( implode( "", $sqlWrite ) );
$totalTuplesInserted += $tuplesAdded;
- if ( $reportLinksConvProgress )
+ if ( $reportLinksConvProgress ) {
$this->output( " done. Total $totalTuplesInserted tuples inserted.\n" );
- $this->performanceLog( $fh, $totalTuplesInserted . " " . ( $this->getMicroTime() - $baseTime ) . "\n" );
+ $this->performanceLog( $fh, $totalTuplesInserted . " " . ( $this->getMicroTime() - $baseTime ) . "\n" );
+ }
}
}
$this->output( "$totalTuplesInserted valid titles and $numBadLinks invalid titles were processed.\n\n" );
@@ -258,4 +259,4 @@ This gives a huge speed improvement for very large links tables which are MyISAM
}
$maintClass = "ConvertLinks";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;