r58561 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58560‎ | r58561 | r58562 >
Date:19:27, 4 November 2009
Author:freakolowsky
Status:ok
Tags:
Comment:
Fixed replace function behaviour when required ID not specified
Modified paths:
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -419,7 +419,7 @@
420420 if (!is_array($options))
421421 $options = array($options);
422422
423 - if (in_array('IGNORE', $options))
 423+ if (in_array('IGNORE', $options))
424424 $this->ignore_DUP_VAL_ON_INDEX = true;
425425
426426 if (!is_array(reset($a))) {
@@ -648,6 +648,8 @@
649649 $rows = array($rows);
650650 }
651651
 652+ $sequenceData = $this->getSequenceData($table);
 653+
652654 foreach( $rows as $row ) {
653655 # Delete rows which collide
654656 if ( $uniqueIndexes ) {
@@ -678,6 +680,9 @@
679681 $this->query( $sql, $fname );
680682 }
681683
 684+ if ($sequenceData !== false && !isset($row[$sequenceData['column']]))
 685+ $row[$sequenceData['column']] = $this->nextSequenceValue($sequenceData['sequence']);
 686+
682687 # Now insert the row
683688 $this->insert( $table, $row, $fname );
684689 }

Status & tagging log