Code Duplication    Length = 8-8 lines in 2 locations

src/Intraface/modules/onlinepayment/OnlinePayment.php 2 locations

@@ 460-467 (lines=8) @@
457
            $this->getDBQuery()->setCondition("transaction_number LIKE \"%".$this->getDBQuery()->getFilter('text')."%\" OR text LIKE \"%".$this->dbquery->getFilter('text')."%\"");
458
        }
459
460
        if ($this->getDBQuery()->checkFilter("from_date")) {
461
            $date = new Intraface_Date($this->getDBQuery()->getFilter("from_date"));
462
            if ($date->convert2db()) {
463
                $this->getDBQuery()->setCondition("date_created >= \"".$date->get()."\"");
464
            } else {
465
                $this->error->set("Fra dato er ikke gyldig");
466
            }
467
        }
468
469
        // Poster med fakturadato før slutdato.
470
        if ($this->getDBQuery()->checkFilter("to_date")) {
@@ 470-477 (lines=8) @@
467
        }
468
469
        // Poster med fakturadato før slutdato.
470
        if ($this->getDBQuery()->checkFilter("to_date")) {
471
            $date = new Intraface_Date($this->getDBQuery()->getFilter("to_date"));
472
            if ($date->convert2db()) {
473
                $this->getDBQuery()->setCondition("date_created <= \"".$date->get()."\"");
474
            } else {
475
                $this->error->set("Til dato er ikke gyldig");
476
            }
477
        }
478
479
        $doctrine = Doctrine_Manager::connection(DB_DSN);
480
        $doctrine->setCharset('utf8');