Index: trunk/extensions/Distribution/maintenance/getSvnMetadata.php |
— | — | @@ -222,22 +222,22 @@ |
223 | 223 | * |
224 | 224 | * @since 0.1 |
225 | 225 | * |
226 | | - * @param $unit Array |
| 226 | + * @param $unit |
227 | 227 | * @param $unitValues Array |
228 | 228 | * @param $versionValues Array |
229 | 229 | * @param $dbr DatabaseBase |
230 | 230 | */ |
231 | | - protected function updateUnit( array $unit, array $unitValues, array $versionValues, DatabaseBase $dbr ) { |
| 231 | + protected function updateUnit( $unit, array $unitValues, array $versionValues, DatabaseBase $dbr ) { |
232 | 232 | $dbw = wfGetDB( DB_MASTER ); |
233 | 233 | |
234 | | - $versionValues['unit_id'] = $unit['unit_id']; |
| 234 | + $versionValues['unit_id'] = $unit->unit_id; |
235 | 235 | |
236 | 236 | // Query for existing versions of this unit with the same version number. |
237 | 237 | $version = $dbr->selectRow( |
238 | 238 | 'distribution_unit_versions', |
239 | 239 | array( 'version_id' ), |
240 | 240 | array( |
241 | | - 'unit_id' => $unit['unit_id'], |
| 241 | + 'unit_id' => $unit->unit_id, |
242 | 242 | 'version_nr' => $unitValues['current_version_nr'] |
243 | 243 | ) |
244 | 244 | ); |
— | — | @@ -256,16 +256,16 @@ |
257 | 257 | $dbw->update( |
258 | 258 | 'distribution_unit_versions', |
259 | 259 | $versionValues, |
260 | | - array( 'version_id' => $version['version_id'] ) |
| 260 | + array( 'version_id' => $version->version_id ) |
261 | 261 | ); |
262 | 262 | |
263 | | - $unitValues['current_version_nr'] = $version['version_id']; |
| 263 | + $unitValues['current_version_nr'] = $version->version_id; |
264 | 264 | } |
265 | 265 | |
266 | 266 | $dbw->update( |
267 | 267 | 'distribution_units', |
268 | 268 | $unitValues, |
269 | | - array( 'unit_id' => $unit['unit_id'] ) |
| 269 | + array( 'unit_id' => $unit->unit_id ) |
270 | 270 | ); |
271 | 271 | } |
272 | 272 | |