Code Duplication    Length = 3-3 lines in 2 locations

classes/login.php 1 location

@@ 73-75 (lines=3) @@
70
71
            if (isset($settings['db']['port'])) {
72
                $this->db_connection = new mysqli(decrypt($settings['db']['host']), decrypt($settings['db']['user']), decrypt($settings['db']['pass']), decrypt($settings['db']['name']), decrypt($settings['db']['port']));
73
            } else {
74
                $this->db_connection = new mysqli(decrypt($settings['db']['host']), decrypt($settings['db']['user']), decrypt($settings['db']['pass']), decrypt($settings['db']['name']));
75
            }
76
77
            // change character set to utf8 and check it
78
            if (!$this->db_connection->set_charset("utf8")) {

gfunctions.php 1 location

@@ 20-22 (lines=3) @@
17
18
    if (isset($settings['db']['port'])) {
19
        $db_connection = new mysqli(decrypt($settings['db']['host']), decrypt($settings['db']['user']), decrypt($settings['db']['pass']), decrypt($settings['db']['name']), decrypt($settings['db']['port']));
20
    } else {
21
        $db_connection = new mysqli(decrypt($settings['db']['host']), decrypt($settings['db']['user']), decrypt($settings['db']['pass']), decrypt($settings['db']['name']));
22
    }
23
    if (!$db_connection->set_charset("utf8")) {
24
        $db_connection->errors[] = $db_connection->error;
25
    }