Code Duplication    Length = 3-4 lines in 2 locations

php/elFinder.class.php 2 locations

@@ 1627-1630 (lines=4) @@
1624
		
1625
		$result = array();
1626
		
1627
		if (($volume = $this->volume($targets[0])) == false) {
1628
			$result['error'] = $this->error(self::ERROR_CONF_NO_VOL);
1629
			return $result;
1630
		}
1631
1632
		$files = array();
1633
		$errors = array();
@@ 2082-2084 (lines=3) @@
2079
		$targets = isset($args['targets']) && is_array($args['targets']) ? $args['targets'] : array();
2080
		$name    = isset($args['name'])? $args['name'] : '';
2081
	
2082
		if (($volume = $this->volume($targets[0])) == false) {
2083
			return $this->error(self::ERROR_ARCHIVE, self::ERROR_TRGDIR_NOT_FOUND);
2084
		}
2085
	
2086
		return ($file = $volume->archive($targets, $args['type'], $name))
2087
			? array('added' => array($file))