Code Duplication    Length = 3-5 lines in 3 locations

lib/elFinderVolumeDriver.class.php 2 locations

@@ 1756-1758 (lines=3) @@
1753
            ? $this->getScandir($path)
1754
            : $this->setError(elFinder::ERROR_PERM_DENIED)) {
1755
            $dirs = null;
1756
            if ($this->sessionCaching['subdirs'] && isset($this->sessionCache['subdirs'][$path])) {
1757
                $dirs = $this->sessionCache['subdirs'][$path];
1758
            }
1759
            if ($dirs !== null || (isset($dir['dirs']) && $dir['dirs'] != 1)) {
1760
                $_dir = $dir;
1761
                if ($dirs || $this->subdirs($hash)) {
@@ 3496-3500 (lines=5) @@
3493
     **/
3494
    protected function subdirsCE($path)
3495
    {
3496
        if ($this->sessionCaching['subdirs']) {
3497
            if (isset($this->sessionCache['subdirs'][$path]) && ! $this->isMyReload()) {
3498
                return $this->sessionCache['subdirs'][$path];
3499
            }
3500
        }
3501
        $hasdir = (bool) ((! $this->encoding) ? $this->_subdirs($path) : $this->convEncOut($this->_subdirs($this->convEncIn($path))));
3502
        $this->updateSubdirsCache($path, $hasdir);
3503

lib/elFinderVolumeFTP.class.php 1 location

@@ 812-814 (lines=3) @@
809
            }
810
            $parentSubdirs = null;
811
            $outParent = $this->convEncOut($this->_dirname($path));
812
            if (isset($this->sessionCache['subdirs']) && isset($this->sessionCache['subdirs'][$outParent])) {
813
                $parentSubdirs = $this->sessionCache['subdirs'][$outParent];
814
            }
815
            $this->cacheDir($outParent);
816
            if ($parentSubdirs) {
817
                $this->sessionCache['subdirs'][$outParent] = $parentSubdirs;