Code Duplication    Length = 3-4 lines in 2 locations

php/elFinder.class.php 2 locations

@@ 1532-1535 (lines=4) @@
1529
		
1530
		$result = array();
1531
		
1532
		if (($volume = $this->volume($targets[0])) == false) {
1533
			$result['error'] = $this->error(self::ERROR_CONF_NO_VOL);
1534
			return $result;
1535
		}
1536
1537
		$files = array();
1538
		$errors = array();
@@ 2121-2123 (lines=3) @@
2118
		$targets = isset($args['targets']) && is_array($args['targets']) ? $args['targets'] : array();
2119
		$name    = isset($args['name'])? $args['name'] : '';
2120
	
2121
		if (($volume = $this->volume($targets[0])) == false) {
2122
			return $this->error(self::ERROR_ARCHIVE, self::ERROR_TRGDIR_NOT_FOUND);
2123
		}
2124
	
2125
		return ($file = $volume->archive($targets, $args['type'], $name))
2126
			? array('added' => array($file))