Code Duplication    Length = 7-7 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

@@ 2690-2696 (lines=7) @@
2687
2688
		$path = '/'.$path;
2689
2690
		for ($i = 0, $c = count($this->attributes); $i < $c; $i++) {
2691
			$attrs = $this->attributes[$i];
2692
			
2693
			if (isset($attrs[$name]) && isset($attrs['pattern']) && preg_match($attrs['pattern'], $path)) {
2694
				$perm = $attrs[$name];
2695
			} 
2696
		}
2697
		
2698
		return $perm === null ? (is_null($val)? $this->defaults[$name] : $val) : !!$perm;
2699
	}
@@ 2722-2728 (lines=7) @@
2719
		
2720
		$testPath = $this->separator.$this->relpathCE($path);
2721
		
2722
		for ($i = 0, $c = count($this->attributes); $i < $c; $i++) {
2723
			$attrs = $this->attributes[$i];
2724
			
2725
			if (isset($attrs['write']) && isset($attrs['pattern']) && preg_match($attrs['pattern'], $testPath)) {
2726
				$perm = $attrs['write'];
2727
			} 
2728
		}
2729
		
2730
		return $perm === null ? true : $perm;
2731
	}