Code Duplication    Length = 11-11 lines in 2 locations

other/upgrade.php 1 location

@@ 337-347 (lines=11) @@
334
			return true;
335
		}
336
337
		function check_response($desired)
338
		{
339
			// Wait for a response that isn't continued with -, but don't wait too long.
340
			$time = time();
341
			do
342
				$this->last_message = fgets($this->connection, 1024);
343
			while (substr($this->last_message, 3, 1) != ' ' && time() - $time < 5);
344
345
			// Was the desired response returned?
346
			return is_array($desired) ? in_array(substr($this->last_message, 0, 3), $desired) : substr($this->last_message, 0, 3) == $desired;
347
		}
348
349
		function passive()
350
		{

other/install.php 1 location

@@ 1774-1784 (lines=11) @@
1771
		return true;
1772
	}
1773
1774
	function check_response($desired)
1775
	{
1776
		// Wait for a response that isn't continued with -, but don't wait too long.
1777
		$time = time();
1778
		do
1779
			$this->last_message = fgets($this->connection, 1024);
1780
		while (substr($this->last_message, 3, 1) != ' ' && time() - $time < 5);
1781
1782
		// Was the desired response returned?
1783
		return is_array($desired) ? in_array(substr($this->last_message, 0, 3), $desired) : substr($this->last_message, 0, 3) == $desired;
1784
	}
1785
1786
	function passive()
1787
	{