Skip to content

Commit

Permalink
Merge pull request magento#4175 from magento-obsessive-owls/MAGETWO-9…
Browse files Browse the repository at this point in the history
…8917
  • Loading branch information
danmooney2 authored May 21, 2019
2 parents e9c3af9 + 23bfcfe commit c813d90
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 8 deletions.
5 changes: 5 additions & 0 deletions app/code/Magento/Cms/Block/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
*/
class Block extends AbstractBlock implements \Magento\Framework\DataObject\IdentityInterface
{
/**
* Prefix for cache key of CMS block
*/
const CACHE_KEY_PREFIX = 'CMS_BLOCK_';

/**
* @var \Magento\Cms\Model\Template\FilterProvider
*/
Expand Down
5 changes: 4 additions & 1 deletion app/code/Magento/SendFriend/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
<resource>Magento_Config::sendfriend</resource>
<group id="email" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Email Templates</label>
<field id="enabled" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<field id="enabled" translate="label comment" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Enabled</label>
<comment>
<![CDATA[We strongly recommend to install a <a href="https://devdocs.magento.com/guides/v2.2/security/google-recaptcha.html" target="_blank">CAPTCHA solution</a> alongside enabling "Email to a Friend" to ensure abuse of this feature does not occur.]]>
</comment>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
<field id="template" translate="label comment" type="select" sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/SendFriend/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<default>
<sendfriend>
<email>
<enabled>1</enabled>
<enabled>0</enabled>
<template>sendfriend_email_template</template>
<allow_guest>0</allow_guest>
<max_recipients>5</max_recipients>
Expand Down
1 change: 1 addition & 0 deletions app/code/Magento/SendFriend/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@ Enabled,Enabled
"Max Recipients","Max Recipients"
"Max Products Sent in 1 Hour","Max Products Sent in 1 Hour"
"Limit Sending By","Limit Sending By"
"We strongly recommend to install a <a href=""https://devdocs.magento.com/guides/v2.2/security/google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur.","We strongly recommend to install a <a href=""https://devdocs.magento.com/guides/v2.2/security/google-recaptcha.html"" target="_blank">CAPTCHA solution</a> alongside enabling ""Email to a Friend"" to ensure abuse of this feature does not occur."
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use Magento\Framework\Message\MessageInterface;
use Magento\Captcha\Helper\Data as CaptchaHelper;

/**
* Class CustomerSendmailTest
*/
class CustomerSendmailTest extends AbstractController
{
/**
Expand Down Expand Up @@ -58,6 +61,7 @@ protected function setUp()
}

/**
* @magentoConfigFixture default_store sendfriend/email/enabled 1
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Catalog/_files/product_simple.php
*/
Expand Down Expand Up @@ -95,6 +99,7 @@ public function testExecute()
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Catalog/_files/product_simple.php
* @magentoConfigFixture default_store customer/captcha/forms product_sendtofriend_form
* @magentoConfigFixture default_store sendfriend/email/enabled 1
*/
public function testWithCaptchaFailed()
{
Expand Down Expand Up @@ -130,7 +135,7 @@ public function testWithCaptchaFailed()
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Catalog/_files/product_simple.php
* @magentoConfigFixture default_store customer/captcha/forms product_sendtofriend_form
*
* @magentoConfigFixture default_store sendfriend/email/enabled 1
*/
public function testWithCaptchaSuccess()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class SendmailTest extends AbstractController
*
* @magentoDbIsolation enabled
* @magentoAppIsolation enabled
* @magentoConfigFixture default_store sendfriend/email/enabled 1
* @magentoDataFixture Magento/SendFriend/_files/disable_allow_guest_config.php
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Catalog/_files/products.php
Expand Down
1 change: 1 addition & 0 deletions lib/internal/Magento/Framework/Filter/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ class Template implements \Zend_Filter_Interface
'gettemplateprocessor',
'vardirective',
'delete',
'getdatausingmethod'
];

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ public function disallowedMethods(): array
['getTemplateProcessor'],
['varDirective'],
['delete'],
['getDataUsingMethod']
];
}

Expand Down

0 comments on commit c813d90

Please sign in to comment.