Code Duplication    Length = 5-5 lines in 2 locations

manager/includes/document.parser.class.inc.php 2 locations

@@ 4898-4902 (lines=5) @@
4895
    public function sendAlert($type, $to, $from, $subject, $msg, $private = 0)
4896
    {
4897
        $private = ($private) ? 1 : 0;
4898
        if (!is_numeric($to)) {
4899
            // Query for the To ID
4900
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'");
4901
            $to = $this->db->getValue($rs);
4902
        }
4903
        if (!is_numeric($from)) {
4904
            // Query for the From ID
4905
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'");
@@ 4903-4907 (lines=5) @@
4900
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'");
4901
            $to = $this->db->getValue($rs);
4902
        }
4903
        if (!is_numeric($from)) {
4904
            // Query for the From ID
4905
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'");
4906
            $from = $this->db->getValue($rs);
4907
        }
4908
        // insert a new message into user_messages
4909
        $this->db->insert(array(
4910
            'type' => $type,