Code Duplication    Length = 5-5 lines in 2 locations

htdocs/xoops_lib/Xmf/Database/Tables.php 2 locations

@@ 440-444 (lines=5) @@
437
            // Is this on a table we are adding?
438
            if (isset($tableDef['create']) && $tableDef['create']) {
439
                // strip everything but the PRIMARY from definition
440
                foreach ($tableDef['keys'] as $keyName => $key) {
441
                    if ($keyName !== 'PRIMARY') {
442
                        unset($tableDef['keys'][$keyName]);
443
                    }
444
                }
445
            } else {
446
                // build drops to strip everything but the PRIMARY
447
                foreach ($tableDef['keys'] as $keyName => $key) {
@@ 447-451 (lines=5) @@
444
                }
445
            } else {
446
                // build drops to strip everything but the PRIMARY
447
                foreach ($tableDef['keys'] as $keyName => $key) {
448
                    if ($keyName !== 'PRIMARY') {
449
                        $this->queue[] = "ALTER TABLE `{$tableDef['name']}` DROP INDEX {$keyName}";
450
                    }
451
                }
452
            }
453
        } else {
454
            return $this->tableNotEstablished();