diff --git a/app/code/Magento/Backup/README.md b/app/code/Magento/Backup/README.md index 661f8a5d6ddd86f23772c9f595526420ae51dd9e..59688ea3e716e162e8efa9421de0ffe004ec3cee 100644 --- a/app/code/Magento/Backup/README.md +++ b/app/code/Magento/Backup/README.md @@ -1,3 +1,3 @@ The Backup module allows administrators to perform backups and rollbacks. Types of backups include system, database and media backups. This module relies on the Cron module to schedule backups. -This module does not effect the storefront. \ No newline at end of file +This module does not affect the storefront. diff --git a/app/code/Magento/Backup/view/adminhtml/layout/backup_index_block.xml b/app/code/Magento/Backup/view/adminhtml/layout/backup_index_block.xml index 861bc2050e44a61e3cf1daf950dcad8fc05d0997..1553a783f6356dca8510044813cd919312ff5fdb 100644 --- a/app/code/Magento/Backup/view/adminhtml/layout/backup_index_block.xml +++ b/app/code/Magento/Backup/view/adminhtml/layout/backup_index_block.xml @@ -46,7 +46,6 @@ <arguments> <argument name="header" xsi:type="string" translate="true">Name</argument> <argument name="index" xsi:type="string">display_name</argument> - <argument name="filter" xsi:type="string">0</argument> <argument name="sortable" xsi:type="string">1</argument> <argument name="column_css_class" xsi:type="string">col-name</argument> <argument name="header_css_class" xsi:type="string">col-name</argument> diff --git a/lib/internal/Magento/Framework/Data/Collection/Filesystem.php b/lib/internal/Magento/Framework/Data/Collection/Filesystem.php index 817c4b420519697de1ad27984ca0d286e151a125..e637f4e4b89da6989c1504aff67a1c4ad68ead40 100644 --- a/lib/internal/Magento/Framework/Data/Collection/Filesystem.php +++ b/lib/internal/Magento/Framework/Data/Collection/Filesystem.php @@ -696,7 +696,7 @@ class Filesystem extends \Magento\Framework\Data\Collection */ public function filterCallbackLike($field, $filterValue, $row) { - $filterValueRegex = str_replace('%', '(.*?)', preg_quote($filterValue, '/')); + $filterValueRegex = str_replace('%', '(.*?)', str_replace('\'', '', preg_quote($filterValue, '/'))); return (bool)preg_match("/^{$filterValueRegex}\$/i", $row[$field]); } diff --git a/lib/internal/Magento/Framework/Data/Test/Unit/Collection/FilesystemTest.php b/lib/internal/Magento/Framework/Data/Test/Unit/Collection/FilesystemTest.php new file mode 100644 index 0000000000000000000000000000000000000000..b764079a841b7f07f35dc9a692b9ffeb6968fe5f --- /dev/null +++ b/lib/internal/Magento/Framework/Data/Test/Unit/Collection/FilesystemTest.php @@ -0,0 +1,30 @@ +<?php +/*** + * Copyright © 2015 Magento. All rights reserved. + * See COPYING.txt for license details. + */ + +namespace Magento\Framework\Data\Test\Unit\Collection; + +class FilesystemTest extends \PHPUnit_Framework_TestCase +{ + /** @var \Magento\Framework\Data\Collection\Filesystem */ + private $model; + + public function setUp() + { + $objectManager = new \Magento\Framework\TestFramework\Unit\Helper\ObjectManager($this); + $this->model = $objectManager->getObject('Magento\Framework\Data\Collection\Filesystem'); + } + + public function testFilterCallbackLike() + { + $field = 'field'; + $row = [$field => 'beginning_filter_target_end',]; + $filterValueSuccess = new \Zend_Db_Expr('%filter_target%'); + $filterValueFailure = new \Zend_Db_Expr('%not_found_in_the_row%'); + + $this->assertTrue($this->model->filterCallbackLike($field, $filterValueSuccess, $row)); + $this->assertFalse($this->model->filterCallbackLike($field, $filterValueFailure, $row)); + } +}