Code Duplication    Length = 7-7 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

@@ 2778-2784 (lines=7) @@
2775
2776
		$path = '/'.$path;
2777
2778
		for ($i = 0, $c = count($this->attributes); $i < $c; $i++) {
2779
			$attrs = $this->attributes[$i];
2780
			
2781
			if (isset($attrs[$name]) && isset($attrs['pattern']) && preg_match($attrs['pattern'], $path)) {
2782
				$perm = $attrs[$name];
2783
			} 
2784
		}
2785
		
2786
		return $perm === null ? (is_null($val)? $this->defaults[$name] : $val) : !!$perm;
2787
	}
@@ 2810-2816 (lines=7) @@
2807
		
2808
		$testPath = $this->separator.$this->relpathCE($path);
2809
		
2810
		for ($i = 0, $c = count($this->attributes); $i < $c; $i++) {
2811
			$attrs = $this->attributes[$i];
2812
			
2813
			if (isset($attrs['write']) && isset($attrs['pattern']) && preg_match($attrs['pattern'], $testPath)) {
2814
				$perm = $attrs['write'];
2815
			} 
2816
		}
2817
		
2818
		return $perm === null ? true : $perm;
2819
	}