Code Duplication    Length = 20-20 lines in 2 locations

htdocs/class/snoopy.php 2 locations

@@ 455-474 (lines=20) @@
452
        Output:		$this->results	an array of the links from the post
453
    \*======================================================================*/
454
455
    function submitlinks($URI, $formvars = "", $formfiles = "")
456
    {
457
        if ($this->submit($URI, $formvars, $formfiles)) {
458
            if ($this->lastredirectaddr)
459
                $URI = $this->lastredirectaddr;
460
            if (is_array($this->results)) {
461
                for ($x = 0; $x < count($this->results); $x++) {
462
                    $this->results[$x] = $this->_striplinks($this->results[$x]);
463
                    if ($this->expandlinks)
464
                        $this->results[$x] = $this->_expandlinks($this->results[$x], $URI);
465
                }
466
            } else {
467
                $this->results = $this->_striplinks($this->results);
468
                if ($this->expandlinks)
469
                    $this->results = $this->_expandlinks($this->results, $URI);
470
            }
471
            return true;
472
        } else
473
            return false;
474
    }
475
476
    /*======================================================================*\
477
        Function:	submittext
@@ 483-502 (lines=20) @@
480
        Output:		$this->results	the text from the web page
481
    \*======================================================================*/
482
483
    function submittext($URI, $formvars = "", $formfiles = "")
484
    {
485
        if ($this->submit($URI, $formvars, $formfiles)) {
486
            if ($this->lastredirectaddr)
487
                $URI = $this->lastredirectaddr;
488
            if (is_array($this->results)) {
489
                for ($x = 0; $x < count($this->results); $x++) {
490
                    $this->results[$x] = $this->_striptext($this->results[$x]);
491
                    if ($this->expandlinks)
492
                        $this->results[$x] = $this->_expandlinks($this->results[$x], $URI);
493
                }
494
            } else {
495
                $this->results = $this->_striptext($this->results);
496
                if ($this->expandlinks)
497
                    $this->results = $this->_expandlinks($this->results, $URI);
498
            }
499
            return true;
500
        } else
501
            return false;
502
    }
503
504
505
    /*======================================================================*\