Code Duplication    Length = 7-7 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

@@ 2713-2719 (lines=7) @@
2710
2711
		$path = '/'.$path;
2712
2713
		for ($i = 0, $c = count($this->attributes); $i < $c; $i++) {
2714
			$attrs = $this->attributes[$i];
2715
			
2716
			if (isset($attrs[$name]) && isset($attrs['pattern']) && preg_match($attrs['pattern'], $path)) {
2717
				$perm = $attrs[$name];
2718
			} 
2719
		}
2720
		
2721
		return $perm === null ? (is_null($val)? $this->defaults[$name] : $val) : !!$perm;
2722
	}
@@ 2745-2751 (lines=7) @@
2742
		
2743
		$testPath = $this->separator.$this->relpathCE($path);
2744
		
2745
		for ($i = 0, $c = count($this->attributes); $i < $c; $i++) {
2746
			$attrs = $this->attributes[$i];
2747
			
2748
			if (isset($attrs['write']) && isset($attrs['pattern']) && preg_match($attrs['pattern'], $testPath)) {
2749
				$perm = $attrs['write'];
2750
			} 
2751
		}
2752
		
2753
		return $perm === null ? true : $perm;
2754
	}