Code Duplication    Length = 10-11 lines in 2 locations

db/upgrade.php 2 locations

@@ 94-104 (lines=11) @@
91
        upgrade_mod_savepoint(true, 2014050100, 'bigbluebuttonbn');
92
    }
93
94
    if ($result && $oldversion < 2014070420) {
95
96
        $table = new xmldb_table('bigbluebuttonbn');
97
        $field = new xmldb_field('participants', XMLDB_TYPE_TEXT, 'medium', null, null, null, null);
98
99
        if (!$dbman->field_exists($table, $field)) {
100
            $dbman->add_field($table, $field, $continue=true, $feedback=true);
101
        }
102
103
        upgrade_mod_savepoint(true, 2014070420, 'bigbluebuttonbn');
104
    }
105
106
    if ($result && $oldversion < 2014101004) {
107
@@ 106-115 (lines=10) @@
103
        upgrade_mod_savepoint(true, 2014070420, 'bigbluebuttonbn');
104
    }
105
106
    if ($result && $oldversion < 2014101004) {
107
108
        $table = new xmldb_table('bigbluebuttonbn');
109
        $field = new xmldb_field('participants');
110
        $field->set_attributes(XMLDB_TYPE_TEXT, 'medium', null, null, null, null);
111
112
        $dbman->change_field_type($table, $field, $continue=true, $feedback=true);
113
114
        upgrade_mod_savepoint(true, 2014101004, 'bigbluebuttonbn');
115
    }
116
117
    if ($result && $oldversion < 2015063000) {
118
        // Update the bigbluebuttonbn table