Skip to content

Commit 2f326d9

Browse files
authored
Merge pull request #8045 from magento-amigos/AC-7525
[Amigos] AC-7525: Provide backward compatible solution to resolve AC-7521
2 parents f171a49 + d7550ac commit 2f326d9

File tree

3 files changed

+16
-12
lines changed

3 files changed

+16
-12
lines changed

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,10 @@
349349
<field id="transport">smtp</field>
350350
</depends>
351351
</field>
352-
<field id="password" translate="label comment" type="password" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
352+
<field id="password" translate="label comment" type="obscure" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
353353
<label>Password</label>
354-
<comment>Username</comment>
354+
<comment>Password</comment>
355+
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
355356
<depends>
356357
<field id="transport">smtp</field>
357358
</depends>

app/code/Magento/Email/etc/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<disable>0</disable>
2828
<host>localhost</host>
2929
<port>25</port>
30+
<password backend_model="Magento\Config\Model\Config\Backend\Encrypted" />
3031
<set_return_path>0</set_return_path>
3132
<transport>sendmail</transport>
3233
<auth>none</auth>

app/code/Magento/Theme/Block/Html/Header.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,37 @@
66

77
namespace Magento\Theme\Block\Html;
88

9+
use Magento\Framework\App\ObjectManager;
910
use Magento\Framework\Escaper;
11+
use Magento\Framework\View\Element\Template;
12+
use Magento\Framework\View\Element\Template\Context;
13+
use Magento\Store\Model\ScopeInterface;
1014

1115
/**
1216
* Html page header block
1317
*
1418
* @api
1519
* @since 100.0.2
1620
*/
17-
class Header extends \Magento\Framework\View\Element\Template
21+
class Header extends Template
1822
{
1923
/**
2024
* @var Escaper
2125
*/
2226
private $escaper;
2327

2428
/**
25-
* Constructor
26-
*
27-
* @param \Magento\Framework\View\Element\Template\Context $context
28-
* @param Magento\Framework\Escaper $escaper
29+
* @param Context $context
2930
* @param array $data
31+
* @param Escaper|null $escaper
3032
*/
3133
public function __construct(
32-
\Magento\Framework\View\Element\Template\Context $context,
33-
\Magento\Framework\Escaper $escaper,
34-
array $data = []
34+
Context $context,
35+
array $data = [],
36+
Escaper $escaper = null
3537
) {
36-
$this->escaper = $escaper;
3738
parent::__construct($context, $data);
39+
$this->escaper = $escaper ?: ObjectManager::getInstance()->get(Escaper::class);
3840
}
3941

4042
/**
@@ -54,7 +56,7 @@ public function getWelcome()
5456
if (empty($this->_data['welcome'])) {
5557
$this->_data['welcome'] = $this->_scopeConfig->getValue(
5658
'design/header/welcome',
57-
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
59+
ScopeInterface::SCOPE_STORE
5860
);
5961
}
6062
$this->_data['welcome'] = $this->escaper->escapeQuote($this->_data['welcome'], true);

0 commit comments

Comments
 (0)