Skip to content

Commit

Permalink
Fix typo in the constant name (ezsystems#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
natanael89 authored and andrerom committed Jul 11, 2018
1 parent 4c8321e commit 54d562b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions bundle/Command/ConvertXmlTextToRichTextCommand.php
Expand Up @@ -21,7 +21,7 @@

class ConvertXmlTextToRichTextCommand extends ContainerAwareCommand
{
const MAX_OJBECTS_PER_CHILD = 1000;
const MAX_OBJECTS_PER_CHILD = 1000;
/**
* @var \Doctrine\DBAL\Connection
*/
Expand Down Expand Up @@ -220,7 +220,7 @@ protected function fixEmbeddedImages($dryRun, $contentId, OutputInterface $outpu
$offset = 0;
$totalCount = 0;
do {
$limit = self::MAX_OJBECTS_PER_CHILD;
$limit = self::MAX_OBJECTS_PER_CHILD;

$statement = $this->getFieldRows('ezrichtext', $contentId, $offset, $limit);
while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {
Expand Down Expand Up @@ -266,8 +266,8 @@ protected function fixEmbeddedImages($dryRun, $contentId, OutputInterface $outpu
);
}
}
$offset += self::MAX_OJBECTS_PER_CHILD;
} while ($offset + self::MAX_OJBECTS_PER_CHILD <= $count);
$offset += self::MAX_OBJECTS_PER_CHILD;
} while ($offset + self::MAX_OBJECTS_PER_CHILD <= $count);

$output->writeln("Updated ezembed tags in $totalCount field(s)");
}
Expand Down Expand Up @@ -540,16 +540,16 @@ protected function processFields($dryRun, $checkDuplicateIds, $checkIdValues, Ou
$fork = $this->maxConcurrency > 1;

do {
$limit = self::MAX_OJBECTS_PER_CHILD;
$limit = self::MAX_OBJECTS_PER_CHILD;
if ($fork) {
$this->waitForAvailableProcessSlot($output);
$process = $this->createChildProcess($dryRun, $checkDuplicateIds, $checkIdValues, $offset, $limit, $output);
$this->processes[$process->getPid()] = ['offset' => $offset, 'limit' => $limit, 'process' => $process];
} else {
$this->convertFields($dryRun, null, $checkDuplicateIds, $checkIdValues, $offset, $limit);
}
$offset += self::MAX_OJBECTS_PER_CHILD;
} while ($offset + self::MAX_OJBECTS_PER_CHILD <= $count);
$offset += self::MAX_OBJECTS_PER_CHILD;
} while ($offset + self::MAX_OBJECTS_PER_CHILD <= $count);

while (count($this->processes) > 0) {
$this->waitForChild($output);
Expand Down

0 comments on commit 54d562b

Please sign in to comment.