Code Duplication    Length = 14-14 lines in 2 locations

include/onupdate.php 2 locations

@@ 393-406 (lines=14) @@
390
 *
391
 * @return bool
392
 */
393
function xoops_module_update_xnewsletter_rename_table($tablename)
394
{
395
    global $xoopsDB;
396
397
    if (tableExists($xoopsDB->prefix($tablename))) {
398
        $sql    = sprintf('ALTER TABLE ' . $xoopsDB->prefix($tablename) . ' RENAME ' . $xoopsDB->prefix('mod_' . $tablename));
399
        $result = $xoopsDB->queryF($sql);
400
        if (!$result) {
401
            echo '<br>' . _MI_XNEWSLETTER_UPGRADEFAILED . ": RENAME table '" . $tablename . "'";
402
            //            ++$errors;
403
        }
404
    }
405
406
    return true;
407
}
408
409
/**
@@ 414-427 (lines=14) @@
411
 *
412
 * @return bool
413
 */
414
function xoops_module_update_xnewsletter_rename_mod_table($tablename)
415
{
416
    global $xoopsDB;
417
418
    if (tableExists($xoopsDB->prefix('mod_' . $tablename))) {
419
        $sql    = sprintf('ALTER TABLE ' . $xoopsDB->prefix('mod_' . $tablename) . ' RENAME ' . $xoopsDB->prefix($tablename));
420
        $result = $xoopsDB->queryF($sql);
421
        if (!$result) {
422
            echo '<br>' . _MI_XNEWSLETTER_UPGRADEFAILED . ": RENAME table '" . $tablename . "'";
423
            //            ++$errors;
424
        }
425
    }
426
427
    return true;
428
}
429
430
/**