Code Duplication    Length = 8-8 lines in 2 locations

db/upgrade.php 2 locations

@@ 323-330 (lines=8) @@
320
 * @param   string    $tablename
321
 * @param   string    $fieldname
322
 */
323
function xmldb_bigbluebuttonbn_drop_field($dbman, $tablename, $fieldname) {
324
    $table = new xmldb_table($tablename);
325
    $field = new xmldb_field($fieldname);
326
    if ($dbman->field_exists($table, $field)) {
327
        $dbman->drop_field($table, $field, true, true);
328
    }
329
}
330
331
/**
332
 * Generic helper function for renaming a field in a table.
333
 *
@@ 339-346 (lines=8) @@
336
 * @param   string    $fieldnameold
337
 * @param   string    $fieldnamenew
338
 */
339
function xmldb_bigbluebuttonbn_rename_field($dbman, $tablename, $fieldnameold, $fieldnamenew) {
340
    $table = new xmldb_table($tablename);
341
    $field = new xmldb_field($fieldnameold);
342
    if ($dbman->field_exists($table, $field)) {
343
        $dbman->rename_field($table, $field, $fieldnamenew, true, true);
344
    }
345
}
346
347
/**
348
 * Generic helper function for renaming a table.
349
 *