|
@@ -264,7 +264,7 @@ discard block |
|
|
block discarded – undo |
|
264
|
264
|
} |
|
265
|
265
|
|
|
266
|
266
|
if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) { |
|
267
|
|
- throw new \Exception("Can not execute " . $this->getEntityName($migrationDefinition). " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}"); |
|
|
267
|
+ throw new \Exception("Can not execute " . $this->getEntityName($migrationDefinition) . " '{$migrationDefinition->name}': {$migrationDefinition->parsingError}"); |
|
268
|
268
|
} |
|
269
|
269
|
|
|
270
|
270
|
/// @todo add support for setting in $migrationContext a userContentType ? |
|
@@ -298,7 +298,7 @@ discard block |
|
|
block discarded – undo |
|
298
|
298
|
|
|
299
|
299
|
try { |
|
300
|
300
|
|
|
301
|
|
- $i = $stepOffset+1; |
|
|
301
|
+ $i = $stepOffset + 1; |
|
302
|
302
|
$finalStatus = Migration::STATUS_DONE; |
|
303
|
303
|
$finalMessage = null; |
|
304
|
304
|
|
|
@@ -433,12 +433,12 @@ discard block |
|
|
block discarded – undo |
|
433
|
433
|
public function resumeMigration(Migration $migration, $useTransaction = true) |
|
434
|
434
|
{ |
|
435
|
435
|
if ($migration->status != Migration::STATUS_SUSPENDED) { |
|
436
|
|
- throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': it is not in suspended status"); |
|
|
436
|
+ throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': it is not in suspended status"); |
|
437
|
437
|
} |
|
438
|
438
|
|
|
439
|
439
|
$migrationDefinitions = $this->getMigrationsDefinitions(array($migration->path)); |
|
440
|
440
|
if (!count($migrationDefinitions)) { |
|
441
|
|
- throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': its definition is missing"); |
|
|
441
|
+ throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': its definition is missing"); |
|
442
|
442
|
} |
|
443
|
443
|
|
|
444
|
444
|
$defs = $migrationDefinitions->getArrayCopy(); |
|
@@ -446,18 +446,18 @@ discard block |
|
|
block discarded – undo |
|
446
|
446
|
|
|
447
|
447
|
$migrationDefinition = $this->parseMigrationDefinition($migrationDefinition); |
|
448
|
448
|
if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) { |
|
449
|
|
- throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': {$migrationDefinition->parsingError}"); |
|
|
449
|
+ throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': {$migrationDefinition->parsingError}"); |
|
450
|
450
|
} |
|
451
|
451
|
|
|
452
|
452
|
// restore context |
|
453
|
453
|
$this->contextHandler->restoreCurrentContext($migration->name); |
|
454
|
454
|
|
|
455
|
455
|
if (!isset($this->migrationContext[$migration->name])) { |
|
456
|
|
- throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is missing"); |
|
|
456
|
+ throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is missing"); |
|
457
|
457
|
} |
|
458
|
458
|
$restoredContext = $this->migrationContext[$migration->name]; |
|
459
|
|
- if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'] )) { |
|
460
|
|
- throw new \Exception("Can not resume ".$this->getEntityName($migration)." '{$migration->name}': the stored context is invalid"); |
|
|
459
|
+ if (!is_array($restoredContext) || !isset($restoredContext['context']) || !isset($restoredContext['step'])) { |
|
|
460
|
+ throw new \Exception("Can not resume " . $this->getEntityName($migration) . " '{$migration->name}': the stored context is invalid"); |
|
461
|
461
|
} |
|
462
|
462
|
|
|
463
|
463
|
// update migration status |
|
@@ -478,7 +478,7 @@ discard block |
|
|
block discarded – undo |
|
478
|
478
|
* @param bool|null |
|
479
|
479
|
* @return array $forceSigchildHandling |
|
480
|
480
|
*/ |
|
481
|
|
- protected function migrationContextFromParameters($defaultLanguageCode = null, $adminLogin = null, $forceSigchildHandling = null ) |
|
|
481
|
+ protected function migrationContextFromParameters($defaultLanguageCode = null, $adminLogin = null, $forceSigchildHandling = null) |
|
482
|
482
|
{ |
|
483
|
483
|
$properties = array(); |
|
484
|
484
|
|