Code Duplication    Length = 3-4 lines in 2 locations

php/elFinder.class.php 2 locations

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