Code Duplication    Length = 3-4 lines in 2 locations

php/elFinder.class.php 2 locations

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