From 91af3a03e8946aca8e466ebb7af94c49fca3fb75 Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Thu, 31 Mar 2016 15:43:32 +0200 Subject: [PATCH 1/5] Fixed missing language parameter for certain notification types --- library/NotificationCenter/ContaoHelper.php | 4 ++-- modules/ModulePasswordNotificationCenter.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/library/NotificationCenter/ContaoHelper.php b/library/NotificationCenter/ContaoHelper.php index d112a09e..05c510d1 100644 --- a/library/NotificationCenter/ContaoHelper.php +++ b/library/NotificationCenter/ContaoHelper.php @@ -59,7 +59,7 @@ public function sendRegistrationEmail($intId, $arrData, &$objModule) $objNotification = \NotificationCenter\Model\Notification::findByPk($objModule->nc_notification); if ($objNotification !== null) { - $objNotification->send($arrTokens); + $objNotification->send($arrTokens, $GLOBALS['TL_LANGUAGE']); // Disable the email to admin because no core notification has been sent $objModule->reg_activate = true; @@ -108,7 +108,7 @@ public function sendPersonalDataEmail($objUser, $arrData, $objModule) $objNotification = \NotificationCenter\Model\Notification::findByPk($objModule->nc_notification); if ($objNotification !== null) { - $objNotification->send($arrTokens); + $objNotification->send($arrTokens, $GLOBALS['TL_LANGUAGE']); } } diff --git a/modules/ModulePasswordNotificationCenter.php b/modules/ModulePasswordNotificationCenter.php index 394c4208..64f7961b 100644 --- a/modules/ModulePasswordNotificationCenter.php +++ b/modules/ModulePasswordNotificationCenter.php @@ -65,7 +65,7 @@ protected function sendPasswordLink($objMember) $arrTokens['domain'] = \Idna::decode(\Environment::get('host')); $arrTokens['link'] = \Idna::decode(\Environment::get('base')) . \Environment::get('request') . (($GLOBALS['TL_CONFIG']['disableAlias'] || strpos(\Environment::get('request'), '?') !== false) ? '&' : '?') . 'token=' . $confirmationId; - $objNotification->send($arrTokens); + $objNotification->send($arrTokens, $GLOBALS['TL_LANGUAGE']); $this->log('A new password has been requested for user ID ' . $objMember->id . ' (' . $objMember->email . ')', __METHOD__, TL_ACCESS); // Check whether there is a jumpTo page From 80f535b28f6cc09978a69620ca9955185b19199d Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Thu, 21 Apr 2016 11:30:02 +0200 Subject: [PATCH 2/5] Support the language variations (e.g. en-US) (#93) --- CHANGELOG.md | 1 + library/NotificationCenter/Model/Language.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23e224e8..0e8f1b61 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ Version 1.3.5 (2016-03-02) ### Fixed - The extension is now compatible with PHP7 (see #86) +- Support the language variations (e.g. en-US) (#93) Version 1.3.3 (2016-01-15) diff --git a/library/NotificationCenter/Model/Language.php b/library/NotificationCenter/Model/Language.php index 02c25c32..b5205e58 100644 --- a/library/NotificationCenter/Model/Language.php +++ b/library/NotificationCenter/Model/Language.php @@ -28,6 +28,9 @@ public static function findByMessageAndLanguageOrFallback(Message $objMessage, $ { $t = static::$strTable; + // Support the language variations (e.g. en-US) + $strLanguage = str_replace('-', '_', $strLanguage); + $arrColumns = array("$t.pid=?", "($t.language=? OR $t.fallback=1)"); $arrValues = array($objMessage->id, $strLanguage); $arrOptions = array('order' => 'fallback'); From 9ffdedf672da121e29ad227a400a448a72027f34 Mon Sep 17 00:00:00 2001 From: Kamil Kuzminski Date: Thu, 21 Apr 2016 11:35:06 +0200 Subject: [PATCH 3/5] Fixed the changelog --- CHANGELOG.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e8f1b61..e4109b9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,18 @@ Notification Center Changelog =========================== +Version 1.3.6 (????-??-??) +-------------------------- + +### Fixed +- Support the language variations (e.g. en-US) (#93) + + Version 1.3.5 (2016-03-02) -------------------------- ### Fixed - The extension is now compatible with PHP7 (see #86) -- Support the language variations (e.g. en-US) (#93) Version 1.3.3 (2016-01-15) From f557005477fc48ec873797bf5500022ebfdd11eb Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Wed, 4 May 2016 10:00:07 +0200 Subject: [PATCH 4/5] Added missing changelog entry --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4109b9c..294538dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,13 @@ Version 1.3.5 (2016-03-02) - The extension is now compatible with PHP7 (see #86) +Version 1.3.4 (2016-02-09) +-------------------------- + +### Improved +- The extension is now compatible with Contao 4 + + Version 1.3.3 (2016-01-15) -------------------------- From 6002420c645b66e7f62212fa05da4349ef85ca54 Mon Sep 17 00:00:00 2001 From: Yanick Witschi Date: Wed, 4 May 2016 10:00:15 +0200 Subject: [PATCH 5/5] Releasing 1.3.6 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 294538dd..5fd9e9a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ Notification Center Changelog =========================== -Version 1.3.6 (????-??-??) +Version 1.3.6 (2016-05-04) -------------------------- ### Fixed