Code Duplication    Length = 5-5 lines in 2 locations

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

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