Code Duplication    Length = 3-4 lines in 2 locations

php/elFinder.class.php 2 locations

@@ 1539-1542 (lines=4) @@
1536
		
1537
		$result = array();
1538
		
1539
		if (($volume = $this->volume($targets[0])) == false) {
1540
			$result['error'] = $this->error(self::ERROR_CONF_NO_VOL);
1541
			return $result;
1542
		}
1543
1544
		$files = array();
1545
		$errors = array();
@@ 2128-2130 (lines=3) @@
2125
		$targets = isset($args['targets']) && is_array($args['targets']) ? $args['targets'] : array();
2126
		$name    = isset($args['name'])? $args['name'] : '';
2127
	
2128
		if (($volume = $this->volume($targets[0])) == false) {
2129
			return $this->error(self::ERROR_ARCHIVE, self::ERROR_TRGDIR_NOT_FOUND);
2130
		}
2131
	
2132
		return ($file = $volume->archive($targets, $args['type'], $name))
2133
			? array('added' => array($file))