Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions classes/emailTemplate/DAO.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @file classes/emailTemplate/DAO.php
*
Expand All @@ -21,9 +22,10 @@ class DAO extends \PKP\emailTemplate\DAO
protected function variablesToRename(): array
{
return [
'contextName' => 'pressName',
'contextUrl' => 'pressUrl',
'contextSignature' => 'pressSignature',
'pressName' => 'contextName',
'pressUrl' => 'contextUrl',
'pressSignature' => 'contextSignature',
'pressAcronym' => 'contextAcronym'
];
}
}
20 changes: 0 additions & 20 deletions classes/mail/variables/ContextEmailVariable.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,6 @@

class ContextEmailVariable extends PKPContextEmailVariable
{
public const CONTEXT_NAME = 'pressName';
public const CONTEXT_URL = 'pressUrl';
public const CONTEXT_SIGNATURE = 'pressSignature';
public const CONTEXT_ACRONYM = 'contextAcronym';

/**
* @copydoc Variable::descriptions()
*/
public static function descriptions(): array
{
return array_merge(
parent::descriptions(),
[
static::CONTEXT_ACRONYM => __('emailTemplate.variable.context.contextAcronym'),
]
);
}

/**
* @copydoc Variable::values()
*/
Expand All @@ -48,8 +30,6 @@ public function values(string $locale): array
// Pass the values into the context signature so variables
// used in the signature can be rendered.
$values[static::CONTEXT_SIGNATURE] = $this->getContextSignature($values);
$values[static::CONTEXT_ACRONYM] = htmlspecialchars($this->context->getLocalizedData('acronym'));

return $values;
}
}
6 changes: 1 addition & 5 deletions classes/migration/upgrade/v3_4_0/InstallEmailTemplates.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ protected function getEmailTemplateKeys(): array

protected function getAppVariableNames(): array
{
return [
'contextName' => 'pressName',
'contextUrl' => 'pressUrl',
'contextSignature' => 'pressSignature',
];
return [];
}
}
2 changes: 2 additions & 0 deletions dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@
<migration class="PKP\migration\upgrade\v3_5_0\I11238_PrepareDBForStructuredCitations"/>
<migration class="APP\migration\upgrade\v3_5_0\I11241_MissingDecisionConstantsUpdate"/>
<migration class="APP\migration\upgrade\v3_5_0\I11125_UpdateEmailTemplateVariables"/>
<migration class="PKP\migration\upgrade\v3_5_0\I10962_UpdateEmailTemplateVariables"/>
<code function="downloadIPGeoDB"/>
<note file="docs/release-notes/README-3.5.0" />
</upgrade>
Expand Down Expand Up @@ -200,6 +201,7 @@
<migration class="PKP\migration\upgrade\v3_6_0\I12049_AddPublishReviewCurateSupport"/>
<migration class="PKP\migration\upgrade\v3_6_0\I12078_RemoveSettingTypeInCitationSettings"/>
<migration class="PKP\migration\upgrade\v3_6_0\I11971_RemoveShowTitleInUserGroups"/>
<migration class="PKP\migration\upgrade\v3_5_0\I10962_UpdateEmailTemplateVariables"/>
<code function="rebuildSearchIndex" />
<note file="docs/release-notes/README-3.6.0" />
</upgrade>
Expand Down
Loading