Skip to content

Commit

Permalink
Fix column name mask for translation query
Browse files Browse the repository at this point in the history
  • Loading branch information
hadomskyi committed Sep 13, 2022
1 parent 79e5386 commit f421567
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.7.1 - 2022-09-08
### Fix
- Column name mask for translation query

## 0.7.0 - 2022-09-08
### Added
- Added new button to publish changes without review
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "lilt/craft-lilt-plugin",
"description": "The Lilt plugin makes it easy for you to send content to Lilt for translation right from within Craft CMS.",
"type": "craft-plugin",
"version": "0.7.0",
"version": "0.7.1",
"keywords": [
"craft",
"cms",
Expand Down
6 changes: 3 additions & 3 deletions src/elements/db/TranslationQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ protected function beforePrepare(): bool

if ($this->status) {
if (is_array($this->status)) {
$this->subQuery->andWhere(['in', 'lilt_translations.status', $this->status]);
$this->subQuery->andWhere(['in', '[[lilt_translations.status]]', $this->status]);
} elseif ($this->status !== '*') {
$this->subQuery->andWhere('lilt_translations.status = :status', [':status' => $this->status]);
$this->subQuery->andWhere('[[lilt_translations.status]] = :status', [':status' => $this->status]);
}
}

if ($this->jobId) {
$this->subQuery->andWhere('lilt_translations.jobId = :jobId', [':jobId' => $this->jobId]);
$this->subQuery->andWhere('[[lilt_translations.jobId]] = :jobId', [':jobId' => $this->jobId]);
}

return parent::beforePrepare();
Expand Down

0 comments on commit f421567

Please sign in to comment.