Code Duplication    Length = 7-7 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

@@ 2683-2689 (lines=7) @@
2680
2681
		$path = '/'.$path;
2682
2683
		for ($i = 0, $c = count($this->attributes); $i < $c; $i++) {
2684
			$attrs = $this->attributes[$i];
2685
			
2686
			if (isset($attrs[$name]) && isset($attrs['pattern']) && preg_match($attrs['pattern'], $path)) {
2687
				$perm = $attrs[$name];
2688
			} 
2689
		}
2690
		
2691
		return $perm === null ? (is_null($val)? $this->defaults[$name] : $val) : !!$perm;
2692
	}
@@ 2715-2721 (lines=7) @@
2712
		
2713
		$testPath = $this->separator.$this->relpathCE($path);
2714
		
2715
		for ($i = 0, $c = count($this->attributes); $i < $c; $i++) {
2716
			$attrs = $this->attributes[$i];
2717
			
2718
			if (isset($attrs['write']) && isset($attrs['pattern']) && preg_match($attrs['pattern'], $testPath)) {
2719
				$perm = $attrs['write'];
2720
			} 
2721
		}
2722
		
2723
		return $perm === null ? true : $perm;
2724
	}