Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 5110-5114 (lines=5) @@
5107
    public function sendAlert($type, $to, $from, $subject, $msg, $private = 0)
5108
    {
5109
        $private = ($private) ? 1 : 0;
5110
        if (!is_numeric($to)) {
5111
            // Query for the To ID
5112
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'");
5113
            $to = $this->db->getValue($rs);
5114
        }
5115
        if (!is_numeric($from)) {
5116
            // Query for the From ID
5117
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'");
@@ 5115-5119 (lines=5) @@
5112
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'");
5113
            $to = $this->db->getValue($rs);
5114
        }
5115
        if (!is_numeric($from)) {
5116
            // Query for the From ID
5117
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'");
5118
            $from = $this->db->getValue($rs);
5119
        }
5120
        // insert a new message into user_messages
5121
        $this->db->insert(array(
5122
            'type'        => $type,