Code Duplication    Length = 7-9 lines in 2 locations

php/elFinderVolumeDriver.class.php 2 locations

@@ 790-798 (lines=9) @@
787
			'hidden'  => false
788
		);
789
		// set files attributes
790
		if (!empty($this->options['attributes']) && is_array($this->options['attributes'])) {
791
			
792
			foreach ($this->options['attributes'] as $a) {
793
				// attributes must contain pattern and at least one rule
794
				if (!empty($a['pattern']) || count($a) > 1) {
795
					$this->attributes[] = $a;
796
				}
797
			}
798
		}
799
800
		if (!empty($this->options['accessControl']) && is_callable($this->options['accessControl'])) {
801
			$this->access = $this->options['accessControl'];
@@ 975-981 (lines=7) @@
972
973
		$this->_checkArchivers();
974
		// manual control archive types to create
975
		if (!empty($this->options['archiveMimes']) && is_array($this->options['archiveMimes'])) {
976
			foreach ($this->archivers['create'] as $mime => $v) {
977
				if (!in_array($mime, $this->options['archiveMimes'])) {
978
					unset($this->archivers['create'][$mime]);
979
				}
980
			}
981
		}
982
		
983
		// manualy add archivers
984
		if (!empty($this->options['archivers']['create']) && is_array($this->options['archivers']['create'])) {