Commit 9a78eefe authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[TASK] Fix bugs in the new upgrade wizards

parent e44e9268
......@@ -70,17 +70,17 @@ class LanguageMigrationUpdate implements UpgradeWizardInterface {
$languages = $site->getAllLanguages();
foreach ($languages as $language) {
$queryBuilder = $connectionPool->getQueryBuilderForTable('tx_sgmail_domain_model_mail');
$queryBuilder->update('tx_sgmask_domain_model_mail')
->set('language', explode('.', $language->getLocale()))
$queryBuilder->update('tx_sgmail_domain_model_template')
->set('language', explode('.', $language->getLocale())[0])
->where(
$queryBuilder->expr()->like('language', $language->getTypo3Language())
$queryBuilder->expr()->like('language', $queryBuilder->createNamedParameter($language->getTypo3Language()))
)->execute();
$queryBuilder = $connectionPool->getQueryBuilderForTable('tx_sgmail_domain_model_template');
$queryBuilder->update('tx_sgmail_domain_model_template')
->set('sys_language_uid', $language->getLanguageId())
->where(
$queryBuilder->expr()->like('language', $language->getTypo3Language())
$queryBuilder->expr()->like('language', $queryBuilder->createNamedParameter($language->getTypo3Language()))
)->execute();
}
}
......
......@@ -69,7 +69,7 @@ class SendStatusUpdate implements UpgradeWizardInterface {
->set('status', Mail::STATUS_SENT)
->where(
$queryBuilder->expr()->gt('sending_time', 0),
$queryBuilder->expr()->eq('status', Mail::STATUS_PENDING)
$queryBuilder->expr()->eq('status', $queryBuilder->createNamedParameter(Mail::STATUS_PENDING))
)->execute();
return TRUE;
}
......@@ -83,7 +83,7 @@ class SendStatusUpdate implements UpgradeWizardInterface {
->from('tx_sgmail_domain_model_mail')
->where(
$queryBuilder->expr()->gt('sending_time', 0),
$queryBuilder->expr()->eq('status', Mail::STATUS_PENDING)
$queryBuilder->expr()->eq('status', $queryBuilder->createNamedParameter(Mail::STATUS_PENDING))
)->execute()->fetchOne();
return $count > 0;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment