r82679 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82678‎ | r82679 | r82680 >
Date:16:42, 23 February 2011
Author:demon
Status:ok (Comments)
Tags:
Comment:
Followup r81534, use addQuotes() instead
Modified paths:
  • /trunk/phase3/includes/installer/PostgresUpdater.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/PostgresUpdater.php
@@ -397,7 +397,8 @@
398398 protected function renameTable( $old, $new ) {
399399 if ( $this->db->tableExists( $old ) ) {
400400 $this->output( "Renaming table $old to $new\n" );
401 - $this->db->query( "ALTER TABLE '$old' RENAME TO $new" );
 401+ $old = $this->db->addQuotes( $old );
 402+ $this->db->query( "ALTER TABLE $old RENAME TO $new" );
402403 }
403404 }
404405

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r81534change from double quote to single quote to avoid double-encoding by htmlspec...mah20:05, 4 February 2011

Comments

#Comment by Hashar (talk | contribs)   09:11, 1 March 2011

Same thing with renameSequence() just above ? What about the $new variable ?

Status & tagging log