Code Duplication    Length = 7-9 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

@@ 748-756 (lines=9) @@
745
			'hidden'  => false
746
		);
747
		// set files attributes
748
		if (!empty($this->options['attributes']) && is_array($this->options['attributes'])) {
749
			
750
			foreach ($this->options['attributes'] as $a) {
751
				// attributes must contain pattern and at least one rule
752
				if (!empty($a['pattern']) || count($a) > 1) {
753
					$this->attributes[] = $a;
754
				}
755
			}
756
		}
757
758
		if (!empty($this->options['accessControl']) && is_callable($this->options['accessControl'])) {
759
			$this->access = $this->options['accessControl'];
@@ 932-938 (lines=7) @@
929
930
		$this->_checkArchivers();
931
		// manual control archive types to create
932
		if (!empty($this->options['archiveMimes']) && is_array($this->options['archiveMimes'])) {
933
			foreach ($this->archivers['create'] as $mime => $v) {
934
				if (!in_array($mime, $this->options['archiveMimes'])) {
935
					unset($this->archivers['create'][$mime]);
936
				}
937
			}
938
		}
939
		
940
		// manualy add archivers
941
		if (!empty($this->options['archivers']['create']) && is_array($this->options['archivers']['create'])) {