r94310 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r94309‎ | r94310 | r94311 >
Date:00:24, 12 August 2011
Author:mah
Status:ok
Tags:
Comment:
re r93565 — move unset() before count() as suggested by Roan
Modified paths:
  • /branches/iwtransclusion/phase3v3/includes/LinksUpdate.php (modified) (history)

Diff [purge]

Index: branches/iwtransclusion/phase3v3/includes/LinksUpdate.php
@@ -377,19 +377,19 @@
378378 if ( $where ) {
379379 $this->mDb->delete( $table, $where, __METHOD__ );
380380 }
 381+ if ( isset( $insertions['globaltemplatelinks'] ) ) {
 382+ $this->mDb->insert( 'globaltemplatelinks', $insertions['globaltemplatelinks'], __METHOD__, 'IGNORE' );
 383+ unset( $insertions['globaltemplatelinks'] );
 384+ }
 385+ if ( isset( $insertions['globalnamespaces'] ) ) {
 386+ $this->mDb->insert( 'globalnamespaces', $insertions['globalnamespaces'], __METHOD__, 'IGNORE' );
 387+ unset( $insertions['globalnamespaces'] );
 388+ }
 389+ if ( isset( $insertions['globalinterwiki'] ) ) {
 390+ $this->mDb->insert( 'globalinterwiki', $insertions['globalinterwiki'], __METHOD__, 'IGNORE' );
 391+ unset( $insertions['globalinterwiki'] );
 392+ }
381393 if ( count( $insertions ) ) {
382 - if ( isset( $insertions['globaltemplatelinks'] ) ) {
383 - $this->mDb->insert( 'globaltemplatelinks', $insertions['globaltemplatelinks'], __METHOD__, 'IGNORE' );
384 - unset( $insertions['globaltemplatelinks'] );
385 - }
386 - if ( isset( $insertions['globalnamespaces'] ) ) {
387 - $this->mDb->insert( 'globalnamespaces', $insertions['globalnamespaces'], __METHOD__, 'IGNORE' );
388 - unset( $insertions['globalnamespaces'] );
389 - }
390 - if ( isset( $insertions['globalinterwiki'] ) ) {
391 - $this->mDb->insert( 'globalinterwiki', $insertions['globalinterwiki'], __METHOD__, 'IGNORE' );
392 - unset( $insertions['globalinterwiki'] );
393 - }
394394 $this->mDb->insert( $table, $insertions, __METHOD__, 'IGNORE' );
395395 }
396396 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93565Add back one insertion to the templatelinks table that was removed in...mah02:29, 31 July 2011

Status & tagging log