Code Duplication    Length = 7-9 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

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