Skip to content

Commit

Permalink
Merge branch 'release/3.2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
JodebaDigitalPulse committed Apr 10, 2024
2 parents 38b538b + 9034cb8 commit e548eb3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ 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/).

## 3.2.3 - 2024-04-10

### Fixed
- fix queries for installs with db prefix

## 3.2.2 - 2024-03-25

### Updated
Expand Down Expand Up @@ -49,6 +54,11 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Added
- Craft 5 support

## 2.6.4 - 2024-04-10

### Fixed
- fix queries for installs with db prefix

## 2.6.3 - 2024-03-25

### Updated
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "craft-database-translations",
"version": "3.2.2",
"version": "3.2.3",
"description": "A translations plugin for Craft CMS",
"scripts": {
"dev": "cross-env NODE_ENV=development webpack --progress --config=webpack.config.js",
Expand Down
8 changes: 4 additions & 4 deletions src/models/SourceMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public static function filter(?array $filters = []): ActiveQuery
['like', 'message', $filterValues],
['exists', (new Query())
->from(Message::tableName())
->where('dp_translations_message.id = dp_translations_source_message.id')
->where('{{%dp_translations_message}}.id = {{%dp_translations_source_message}}.id')
->andWhere(['like', 'translation', $filterValues])
]
]);
Expand All @@ -149,7 +149,7 @@ public static function filter(?array $filters = []): ActiveQuery
if ($filterKey == 'missing') {
$query->andWhere(['not exists', (new Query())
->from(Message::tableName())
->where('dp_translations_message.id = dp_translations_source_message.id')
->where('{{%dp_translations_message}}.id = {{%dp_translations_source_message}}.id')
->andWhere(['language' => $filterValues])
->andWhere('translation is not null')
->andWhere('translation <> \'\'')
Expand All @@ -162,8 +162,8 @@ public static function filter(?array $filters = []): ActiveQuery
if (count($filterValueParts) == 2) {
[$column, $direction] = $filterValueParts;
if (in_array($column, DatabaseTranslations::$plugin->databaseTranslationsService->languageIds())) {
$query->join('LEFT JOIN', Message::tableName(), 'dp_translations_message.id = dp_translations_source_message.id AND dp_translations_message.language = \''.$column.'\'');
$query->orderBy("dp_translations_message.translation $direction");
$query->join('LEFT JOIN', Message::tableName(), '{{%dp_translations_message}}.id = {{%dp_translations_source_message}}.id AND {{%dp_translations_message}}.language = \''.$column.'\'');
$query->orderBy("{{%dp_translations_message}}.translation $direction");
} else {
$query->orderBy($filterValues);
}
Expand Down

0 comments on commit e548eb3

Please sign in to comment.