Code Duplication    Length = 5-5 lines in 2 locations

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

@@ 4938-4942 (lines=5) @@
4935
    public function sendAlert($type, $to, $from, $subject, $msg, $private = 0)
4936
    {
4937
        $private = ($private) ? 1 : 0;
4938
        if (!is_numeric($to)) {
4939
            // Query for the To ID
4940
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'");
4941
            $to = $this->db->getValue($rs);
4942
        }
4943
        if (!is_numeric($from)) {
4944
            // Query for the From ID
4945
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'");
@@ 4943-4947 (lines=5) @@
4940
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$to}'");
4941
            $to = $this->db->getValue($rs);
4942
        }
4943
        if (!is_numeric($from)) {
4944
            // Query for the From ID
4945
            $rs = $this->db->select('id', $this->getFullTableName("manager_users"), "username='{$from}'");
4946
            $from = $this->db->getValue($rs);
4947
        }
4948
        // insert a new message into user_messages
4949
        $this->db->insert(array(
4950
            'type' => $type,