Code Duplication    Length = 3-5 lines in 2 locations

lib/elFinderVolumeDriver.class.php 1 location

@@ 2814-2818 (lines=5) @@
2811
        }
2812
2813
        // valided regex $this->options['searchExDirReg']
2814
        if ($this->options['searchExDirReg']) {
2815
            if (false === preg_match($this->options['searchExDirReg'], '')) {
2816
                $this->options['searchExDirReg'] = '';
2817
            }
2818
        }
2819
2820
        return ($q === '' || $this->commandDisabled('search'))
2821
            ? []

lib/elFinderVolumeLocalFileSystem.class.php 1 location

@@ 135-137 (lines=3) @@
132
            }
133
        }
134
        if ($iterator->hasChildren()) {
135
            if ($this->options['searchExDirReg'] && preg_match($this->options['searchExDirReg'], $key)) {
136
                return false;
137
            }
138
139
            return (bool) $this->attr($key, 'read', null, true);
140
        }