Code Duplication    Length = 8-8 lines in 2 locations

db/upgrade.php 2 locations

@@ 294-301 (lines=8) @@
291
 * @param   string    $tablename
292
 * @param   string    $fieldname
293
 */
294
function xmldb_bigbluebuttonbn_drop_field($dbman, $tablename, $fieldname) {
295
    $table = new xmldb_table($tablename);
296
    $field = new xmldb_field($fieldname);
297
    if ($dbman->field_exists($table, $field)) {
298
        $dbman->drop_field($table, $field, true, true);
299
    }
300
}
301
302
/**
303
 * Generic helper function for renaming a field in a table.
304
 *
@@ 310-317 (lines=8) @@
307
 * @param   string    $fieldnameold
308
 * @param   string    $fieldnamenew
309
 */
310
function xmldb_bigbluebuttonbn_rename_field($dbman, $tablename, $fieldnameold, $fieldnamenew) {
311
    $table = new xmldb_table($tablename);
312
    $field = new xmldb_field($fieldnameold);
313
    if ($dbman->field_exists($table, $field)) {
314
        $dbman->rename_field($table, $field, $fieldnamenew, true, true);
315
    }
316
}
317
318
/**
319
 * Generic helper function for renaming a table.
320
 *