Code Duplication    Length = 14-14 lines in 2 locations

include/onupdate.php 2 locations

@@ 362-375 (lines=14) @@
359
 *
360
 * @return bool
361
 */
362
function xoops_module_update_xnewsletter_rename_table($tablename)
363
{
364
    global $xoopsDB;
365
366
    if (tableExists($xoopsDB->prefix($tablename))) {
367
        $sql    = sprintf('ALTER TABLE ' . $xoopsDB->prefix($tablename) . ' RENAME ' . $xoopsDB->prefix('mod_' . $tablename));
368
        $result = $xoopsDB->queryF($sql);
369
        if (!$result) {
370
            echo '<br>' . _MI_XNEWSLETTER_UPGRADEFAILED . ": RENAME table '" . $tablename . "'";
371
            //            ++$errors;
372
        }
373
    }
374
375
    return true;
376
}
377
378
/**
@@ 383-396 (lines=14) @@
380
 *
381
 * @return bool
382
 */
383
function xoops_module_update_xnewsletter_rename_mod_table($tablename)
384
{
385
    global $xoopsDB;
386
387
    if (tableExists($xoopsDB->prefix('mod_' . $tablename))) {
388
        $sql    = sprintf('ALTER TABLE ' . $xoopsDB->prefix('mod_' . $tablename) . ' RENAME ' . $xoopsDB->prefix($tablename));
389
        $result = $xoopsDB->queryF($sql);
390
        if (!$result) {
391
            echo '<br>' . _MI_XNEWSLETTER_UPGRADEFAILED . ": RENAME table '" . $tablename . "'";
392
            //            ++$errors;
393
        }
394
    }
395
396
    return true;
397
}
398
399
/**