Code Duplication    Length = 9-12 lines in 2 locations

lib/elFinderVolumeDropbox.class.php 1 location

@@ 660-668 (lines=9) @@
657
	    if ($res) {
658
	        foreach ($res as $raw) {
659
	            $raw = unserialize($raw);
660
	            if ($stat = $this->parseRaw($raw)) {
661
	                $stat = $this->updateCache($raw['path'], $stat);
662
	                if (empty($stat['hidden']) && $path !== $raw['path']) {
663
	                    if (! $hasDir && $stat['mime'] === 'directory') {
664
	                        $hasDir = true;
665
	                    }
666
	                    $this->dirsCache[$path][] = $raw['path'];
667
	                }
668
	            }
669
	        }
670
	    }
671

lib/elFinderVolumeFTP.class.php 1 location

@@ 508-519 (lines=12) @@
505
	    $targets = [];
506
	    foreach ($list as $stat) {
507
	        $p = $prefix.$stat['name'];
508
	        if (isset($stat['target'])) {
509
	            // stat later
510
				$targets[$stat['name']] = $stat['target'];
511
	        } else {
512
	            $stat = $this->updateCache($p, $stat);
513
	            if (empty($stat['hidden'])) {
514
	                if (! $hasDir && $stat['mime'] === 'directory') {
515
	                    $hasDir = true;
516
	                }
517
	                $this->dirsCache[$path][] = $p;
518
	            }
519
	        }
520
	    }
521
		// stat link targets
522
		foreach ($targets as $name => $target) {