From 1aeb306d0033a152c6208c48800388e396338ba1 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 26 May 2014 15:33:37 +0400 Subject: [PATCH 1/3] Fix incomplete obsolete filling in i18n db extractor Obsolete keys searching isn't work when we have serveral categories for tranlation with DbMessageSource. Obsolete array filled with last message category only, because it'll always overwritten. --- framework/console/controllers/MessageController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/console/controllers/MessageController.php b/framework/console/controllers/MessageController.php index 88e64831e4..22f1b03890 100644 --- a/framework/console/controllers/MessageController.php +++ b/framework/console/controllers/MessageController.php @@ -173,7 +173,7 @@ class MessageController extends Controller if (isset($current[$category])) { $new[$category] = array_diff($msgs, $current[$category]); - $obsolete = array_diff($current[$category], $msgs); + $obsolete += array_diff($current[$category], $msgs); } else { $new[$category] = $msgs; } From b470ee0da7108ae2e5a362e2adf494666fa5d946 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 26 May 2014 16:17:07 +0400 Subject: [PATCH 2/3] Update CHANGELOG.md --- framework/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 127720a3ad..29e6c67464 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -35,6 +35,7 @@ Yii Framework 2 Change Log - Bug #3567: Fixed the bug that smallint was treated as string for PostgreSQL (qiangxue) - Bug #3578: Fixed postgreSQL column type detection, added missing types (MDMunir, cebe) - Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark) +- Bug #3591: Fix incomplete obsolete filling in i18n `MessageController::saveMessagesToDb()` (advsm) - Enh #2264: `CookieCollection::has()` will return false for expired or removed cookies (qiangxue) - Enh #2435: `yii\db\IntegrityException` is now thrown on database integrity errors instead of general `yii\db\Exception` (samdark) - Enh #2837: Error page now shows arguments in stack trace method calls (samdark) From 4bdaa09da08eac23e25057ff39942fdda28799c3 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Mon, 26 May 2014 17:01:09 +0400 Subject: [PATCH 3/3] Update CHANGELOG.md --- framework/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 29e6c67464..ab546ad540 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -34,8 +34,8 @@ Yii Framework 2 Change Log - Bug #3564: Fixed the bug that primary key columns should not take default values from schema (qiangxue) - Bug #3567: Fixed the bug that smallint was treated as string for PostgreSQL (qiangxue) - Bug #3578: Fixed postgreSQL column type detection, added missing types (MDMunir, cebe) -- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark) - Bug #3591: Fix incomplete obsolete filling in i18n `MessageController::saveMessagesToDb()` (advsm) +- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark) - Enh #2264: `CookieCollection::has()` will return false for expired or removed cookies (qiangxue) - Enh #2435: `yii\db\IntegrityException` is now thrown on database integrity errors instead of general `yii\db\Exception` (samdark) - Enh #2837: Error page now shows arguments in stack trace method calls (samdark)