r70848 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70847‎ | r70848 | r70849 >
Date:06:46, 11 August 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Follow up to r70847 - fixed object vs array issue
Modified paths:
  • /trunk/extensions/Distribution/maintenance/getSvnMetadata.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Distribution/maintenance/getSvnMetadata.php
@@ -222,22 +222,22 @@
223223 *
224224 * @since 0.1
225225 *
226 - * @param $unit Array
 226+ * @param $unit
227227 * @param $unitValues Array
228228 * @param $versionValues Array
229229 * @param $dbr DatabaseBase
230230 */
231 - protected function updateUnit( array $unit, array $unitValues, array $versionValues, DatabaseBase $dbr ) {
 231+ protected function updateUnit( $unit, array $unitValues, array $versionValues, DatabaseBase $dbr ) {
232232 $dbw = wfGetDB( DB_MASTER );
233233
234 - $versionValues['unit_id'] = $unit['unit_id'];
 234+ $versionValues['unit_id'] = $unit->unit_id;
235235
236236 // Query for existing versions of this unit with the same version number.
237237 $version = $dbr->selectRow(
238238 'distribution_unit_versions',
239239 array( 'version_id' ),
240240 array(
241 - 'unit_id' => $unit['unit_id'],
 241+ 'unit_id' => $unit->unit_id,
242242 'version_nr' => $unitValues['current_version_nr']
243243 )
244244 );
@@ -256,16 +256,16 @@
257257 $dbw->update(
258258 'distribution_unit_versions',
259259 $versionValues,
260 - array( 'version_id' => $version['version_id'] )
 260+ array( 'version_id' => $version->version_id )
261261 );
262262
263 - $unitValues['current_version_nr'] = $version['version_id'];
 263+ $unitValues['current_version_nr'] = $version->version_id;
264264 }
265265
266266 $dbw->update(
267267 'distribution_units',
268268 $unitValues,
269 - array( 'unit_id' => $unit['unit_id'] )
 269+ array( 'unit_id' => $unit->unit_id )
270270 );
271271 }
272272

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70847Work on script to get extension metadatajeroendedauw06:30, 11 August 2010

Status & tagging log