Code Duplication    Length = 26-26 lines in 2 locations

src/wp-includes/class-snoopy.php 2 locations

@@ 522-547 (lines=26) @@
519
	Output:		$this->results	an array of the links from the post
520
\*======================================================================*/
521
522
	function submitlinks($URI, $formvars="", $formfiles="")
523
	{
524
		if($this->submit($URI,$formvars, $formfiles))
525
		{
526
			if($this->lastredirectaddr)
527
				$URI = $this->lastredirectaddr;
528
			if(is_array($this->results))
529
			{
530
				for($x=0;$x<count($this->results);$x++)
531
				{
532
					$this->results[$x] = $this->_striplinks($this->results[$x]);
533
					if($this->expandlinks)
534
						$this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
535
				}
536
			}
537
			else
538
			{
539
				$this->results = $this->_striplinks($this->results);
540
				if($this->expandlinks)
541
					$this->results = $this->_expandlinks($this->results,$URI);
542
			}
543
			return true;
544
		}
545
		else
546
			return false;
547
	}
548
549
/*======================================================================*\
550
	Function:	submittext
@@ 556-581 (lines=26) @@
553
	Output:		$this->results	the text from the web page
554
\*======================================================================*/
555
556
	function submittext($URI, $formvars = "", $formfiles = "")
557
	{
558
		if($this->submit($URI,$formvars, $formfiles))
559
		{
560
			if($this->lastredirectaddr)
561
				$URI = $this->lastredirectaddr;
562
			if(is_array($this->results))
563
			{
564
				for($x=0;$x<count($this->results);$x++)
565
				{
566
					$this->results[$x] = $this->_striptext($this->results[$x]);
567
					if($this->expandlinks)
568
						$this->results[$x] = $this->_expandlinks($this->results[$x],$URI);
569
				}
570
			}
571
			else
572
			{
573
				$this->results = $this->_striptext($this->results);
574
				if($this->expandlinks)
575
					$this->results = $this->_expandlinks($this->results,$URI);
576
			}
577
			return true;
578
		}
579
		else
580
			return false;
581
	}
582
583
584