Code Duplication    Length = 7-8 lines in 3 locations

lib/elFinderVolumeDriver.class.php 3 locations

@@ 979-986 (lines=8) @@
976
			'hidden' => false,
977
		];
978
		// set files attributes
979
		if (! empty($this->options['attributes']) && is_array($this->options['attributes'])) {
980
		    foreach ($this->options['attributes'] as $a) {
981
		        // attributes must contain pattern and at least one rule
982
				if (! empty($a['pattern']) || count($a) > 1) {
983
				    $this->attributes[] = $a;
984
				}
985
		    }
986
		}
987
988
	    if (! empty($this->options['accessControl']) && is_callable($this->options['accessControl'])) {
989
	        $this->access = $this->options['accessControl'];
@@ 1174-1180 (lines=7) @@
1171
1172
	    $this->_checkArchivers();
1173
		// manual control archive types to create
1174
		if (! empty($this->options['archiveMimes']) && is_array($this->options['archiveMimes'])) {
1175
		    foreach ($this->archivers['create'] as $mime => $v) {
1176
		        if (! in_array($mime, $this->options['archiveMimes'])) {
1177
		            unset($this->archivers['create'][$mime]);
1178
		        }
1179
		    }
1180
		}
1181
1182
		// manualy add archivers
1183
		if (! empty($this->options['archivers']['create']) && is_array($this->options['archivers']['create'])) {
@@ 3246-3252 (lines=7) @@
3243
	    }
3244
3245
		// check video to img converter
3246
		if (! empty($this->options['imgConverter']) && is_array($this->options['imgConverter'])) {
3247
		    foreach ($this->options['imgConverter'] as $_type => $_converter) {
3248
		        if (isset($_converter['func'])) {
3249
		            $this->imgConverter[strtolower($_type)] = $_converter;
3250
		        }
3251
		    }
3252
		}
3253
	    if (! isset($this->imgConverter['video'])) {
3254
	        $videoLibCache = 'videoLib';
3255
	        if (($videoLibCmd = $this->session->get($videoLibCache, false)) === false) {