Skip to content

Commit

Permalink
Merge branch 'hotfix/1.3.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed May 4, 2016
2 parents 00c83f4 + 6002420 commit c80129f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
Notification Center Changelog
===========================

Version 1.3.6 (2016-05-04)
--------------------------

### 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)


Version 1.3.4 (2016-02-09)
--------------------------

### Improved
- The extension is now compatible with Contao 4


Version 1.3.3 (2016-01-15)
--------------------------

Expand Down
4 changes: 2 additions & 2 deletions library/NotificationCenter/ContaoHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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']);
}
}

Expand Down
3 changes: 3 additions & 0 deletions library/NotificationCenter/Model/Language.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion modules/ModulePasswordNotificationCenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c80129f

Please sign in to comment.