|
|
@@ -18,29 +18,28 @@ class BxEngUpdater extends BxDolStudioUpdater
|
|
|
{
|
|
|
if($bInstall) {
|
|
|
$oLanguagesUtils = BxDolStudioLanguagesUtils::getInstance();
|
|
|
- $aLanguage = $oLanguagesUtils->getLanguageInfo('bx_en');
|
|
|
+ $aLanguage = $oLanguagesUtils->getLanguageInfo('en');
|
|
|
$bLanguage = !empty($aLanguage) && is_array($aLanguage);
|
|
|
-
|
|
|
+
|
|
|
if($bLanguage) {
|
|
|
- $aLanguageCategory = $oLanguagesUtils->getLanguageCategory('System');
|
|
|
+ $iLanguageCategory = $oLanguagesUtils->getLanguageCategory('System');
|
|
|
|
|
|
- if(strcmp($oLanguagesUtils->getLanguageString('_sys_et_txt_subject_confirmation', $aLanguage['id']), 'Confirm your Email, please. (ACTION REQUIRED)') == 0)
|
|
|
- $oLanguagesUtils->updateLanguageString('_sys_et_txt_subject_confirmation', 'Confirm your email address', $aLanguage['id'], $aLanguageCategory['id'], false);
|
|
|
+ $aString = $oLanguagesUtils->getLanguageString('_sys_et_txt_subject_confirmation', $aLanguage['id']);
|
|
|
+ if(!empty($aString) && is_array($aString) && strcmp($aString['string'], 'Confirm your Email, please. (ACTION REQUIRED)') === 0)
|
|
|
+ $oLanguagesUtils->updateLanguageString('_sys_et_txt_subject_confirmation', 'Confirm your email address', $aLanguage['id'], $iLanguageCategory, false);
|
|
|
|
|
|
- if(strcmp($oLanguagesUtils->getLanguageString('_sys_et_txt_body_confirmation', $aLanguage['id']), '{email_header}
|
|
|
-<p>Hello, {name} ({email}).</p>
|
|
|
-<p>Click the link below to verify your email address, please:</p>
|
|
|
-<p> </p>
|
|
|
-<p><a href="{conf_link}">{conf_link}</a></p>
|
|
|
-<p> </p>
|
|
|
-{email_footer}') == 0)
|
|
|
+ $sString = '{email_header}<p>Hello, {name} ({email}).</p><p>Click the link below to verify your email address, please:</p><p> </p><p><a href="{conf_link}">{conf_link}</a></p><p> </p>{email_footer}';
|
|
|
+
|
|
|
+ $aString = $oLanguagesUtils->getLanguageString('_sys_et_txt_body_confirmation', $aLanguage['id']);
|
|
|
+ $aString['string'] = str_replace(["\r", "\n"], '', $aString['string']);
|
|
|
+ if(!empty($aString) && is_array($aString) && strcmp($aString['string'], $sString) === 0)
|
|
|
$oLanguagesUtils->updateLanguageString('_sys_et_txt_body_confirmation', '{email_header}
|
|
|
<p>Hello {name} ({email}),</p>
|
|
|
<p>Please confirm your email address by clicking the link below:</p>
|
|
|
<p> </p>
|
|
|
<p><a href="{conf_link}">{conf_link}</a></p>
|
|
|
<p> </p>
|
|
|
-{email_footer}', $aLanguage['id'], $aLanguageCategory['id'], false);
|
|
|
+{email_footer}', $aLanguage['id'], $iLanguageCategory, false);
|
|
|
|
|
|
$oLanguagesUtils->compileLanguage($aLanguage['id'], true);
|
|
|
}
|