r110472 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110471‎ | r110472 | r110473 >
Date:10:17, 1 February 2012
Author:nikerabbit
Status:ok (Comments)
Tags:miscextensions 
Comment:
Fix two issues reported in CR of r110215
Modified paths:
  • /trunk/extensions/Translate/scripts/ttmserver-export.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/scripts/ttmserver-export.php
@@ -40,8 +40,7 @@
4141 public function execute() {
4242 $server = TTMServer::primary();
4343 if ( $server instanceof FakeTTMServer ) {
44 - $this->error( "Translation memory is not configured properly" );
45 - $this->exit();
 44+ $this->error( "Translation memory is not configured properly", 1 );
4645 }
4746
4847 $dbw = $server->getDB( DB_MASTER );
@@ -53,7 +52,7 @@
5453 $this->output( 'fulltext.. ', 1 );
5554 $dbw->delete( 'translate_tmf', '*', __METHOD__ );
5655 $table = $dbw->tableName( 'translate_tmf' );
57 - # $dbw->query( "DROP INDEX tmf_text ON $table" );
 56+ $dbw->query( "DROP INDEX tmf_text ON $table" );
5857 $this->output( 'done!', 1 );
5958
6059 $this->statusLine( 'Loading groups... ', 2 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110215Bootstrap script for tmnikerabbit16:56, 28 January 2012

Comments

#Comment by 😂 (talk | contribs)   13:30, 1 February 2012

Might be worth throwing an IF EXISTS on the DROP INDEX, but otherwise looks ok.

#Comment by 😂 (talk | contribs)   13:31, 1 February 2012

Turns out DROP INDEX doesn't do an IF EXISTS, *sigh*

#Comment by Nikerabbit (talk | contribs)   13:32, 1 February 2012

Could do it conditionally. It's only a problem if the script is terminated mid-way.

Status & tagging log