Skip to content

Commit 1aa5f73

Browse files
committed
Merge pull request #547 from magento-extensibility/Extensibility-bugfix-PR-04-14-2016
[Extensibility] Bug fix
2 parents 53c284f + cfad374 commit 1aa5f73

File tree

6 files changed

+22
-10
lines changed

6 files changed

+22
-10
lines changed

app/code/Magento/PageCache/Observer/FlushCacheByTags.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function execute(\Magento\Framework\Event\Observer $observer)
5454
if ($object instanceof \Magento\Framework\DataObject\IdentityInterface) {
5555
$tags = $object->getIdentities();
5656
if (!empty($tags)) {
57-
$this->getCache()->clean(\Zend_Cache::CLEANING_MODE_ALL, array_unique($tags));
57+
$this->getCache()->clean(\Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array_unique($tags));
5858
}
5959
}
6060
}

app/code/Magento/PageCache/Test/Unit/Observer/FlushCacheByTagsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public function testExecute($cacheState)
7474

7575
$this->fullPageCacheMock->expects($this->once())
7676
->method('clean')
77-
->with(\Zend_Cache::CLEANING_MODE_ALL, $this->equalTo($expectedTags));
77+
->with(\Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, $this->equalTo($expectedTags));
7878
}
7979

8080
$this->_model->execute($observerObject);

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,17 @@
2222
<label>Max Number of Password Reset Requests</label>
2323
<comment>Limit the number of password reset request per hour. Use 0 to disable.</comment>
2424
<validate>required-entry validate-zero-or-greater</validate>
25+
<depends>
26+
<field id="password_reset_protection_type" separator="," negative="1">0</field>
27+
</depends>
2528
</field>
2629
<field id="min_time_between_password_reset_requests" translate="label comment" type="text" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="1">
2730
<label>Min Time Between Password Reset Requests</label>
2831
<comment>Delay in minutes between password reset requests. Use 0 to disable.</comment>
2932
<validate>required-entry validate-zero-or-greater</validate>
33+
<depends>
34+
<field id="password_reset_protection_type" separator="," negative="1">0</field>
35+
</depends>
3036
</field>
3137
</group>
3238
</section>
@@ -40,11 +46,17 @@
4046
<label>Max Number of Password Reset Requests</label>
4147
<comment>Limit the number of password reset request per hour. Use 0 to disable.</comment>
4248
<validate>required-entry validate-zero-or-greater</validate>
49+
<depends>
50+
<field id="password_reset_protection_type" separator="," negative="1">0</field>
51+
</depends>
4352
</field>
4453
<field id="min_time_between_password_reset_requests" translate="label comment" type="text" sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1">
4554
<label>Min Time Between Password Reset Requests</label>
4655
<comment>Delay in minutes between password reset requests. Use 0 to disable.</comment>
4756
<validate>required-entry validate-zero-or-greater</validate>
57+
<depends>
58+
<field id="password_reset_protection_type" separator="," negative="1">0</field>
59+
</depends>
4860
</field>
4961
</group>
5062
</section>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@
1919
<field id="lockout_failures" translate="label comment" sortOrder="100" showInDefault="1">
2020
<label>Maximum Login Failures to Lockout Account</label>
2121
<comment>We will disable this feature if the value is empty.</comment>
22+
<validate>validate-zero-or-greater validate-digits</validate>
2223
</field>
2324
<field id="lockout_threshold" translate="label" sortOrder="110" showInDefault="1">
2425
<label>Lockout Time (minutes)</label>
26+
<validate>validate-zero-or-greater validate-digits</validate>
2527
</field>
2628
<field id="password_lifetime" translate="label comment" sortOrder="120" showInDefault="1">
2729
<label>Password Lifetime (days)</label>
2830
<comment>We will disable this feature if the value is empty. </comment>
31+
<validate>validate-zero-or-greater validate-digits</validate>
2932
</field>
3033
<field id="password_is_forced" translate="label" sortOrder="130" type="select" showInDefault="1">
3134
<label>Password Change</label>

dev/tests/integration/testsuite/Magento/Backend/Model/Auth/SessionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ protected function setUp()
3838

3939
protected function tearDown()
4040
{
41+
$this->auth = null;
4142
$this->objectManager->get(\Magento\Framework\Config\ScopeInterface::class)->setCurrentScope(null);
42-
$this->auth->logout();
4343
}
4444

4545
/**
@@ -58,6 +58,6 @@ public function testIsLoggedIn($loggedIn)
5858

5959
public function loginDataProvider()
6060
{
61-
return [[true], [false]];
61+
return [[false], [true]];
6262
}
6363
}

lib/internal/Cm/Cache/Backend/File.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
*
3535
* @copyright Copyright (c) 2013 Colin Mollenhour (http://colin.mollenhour.com)
3636
* @license http://framework.zend.com/license/new-bsd New BSD License
37+
*
38+
* Modified by Magento, Modifications Copyright © 2016 Magento.
3739
*/
3840
class Cm_Cache_Backend_File extends Zend_Cache_Backend_File
3941
{
@@ -59,11 +61,6 @@ class Cm_Cache_Backend_File extends Zend_Cache_Backend_File
5961
*/
6062
public function __construct(array $options = array())
6163
{
62-
// Magento-friendly cache dir
63-
if (empty($options['cache_dir']) && class_exists('Mage', false)) {
64-
$options['cache_dir'] = Mage::getBaseDir('cache');
65-
}
66-
6764
// Backwards compatibility ZF 1.11 and ZF 1.12
6865
if (isset($options['hashed_directory_umask'])) {
6966
$options['directory_mode'] = $options['hashed_directory_umask'];
@@ -716,4 +713,4 @@ public function ___expire($id)
716713
$this->touch($id, 1 - $metadata['expire']);
717714
}
718715

719-
}
716+
}

0 commit comments

Comments
 (0)