Code Duplication    Length = 14-14 lines in 2 locations

include/onupdate.php 2 locations

@@ 283-296 (lines=14) @@
280
 *
281
 * @return bool
282
 */
283
function xoops_module_update_xnewsletter_rename_table($tablename)
284
{
285
    global $xoopsDB;
286
287
    if (tableExists($xoopsDB->prefix($tablename))) {
288
        $sql    = sprintf('ALTER TABLE ' . $xoopsDB->prefix($tablename) . ' RENAME ' . $xoopsDB->prefix('mod_' . $tablename));
289
        $result = $xoopsDB->queryF($sql);
290
        if (!$result) {
291
            echo '<br>' . _MI_XNEWSLETTER_UPGRADEFAILED . ": RENAME table '" . $tablename . "'";
292
            //            ++$errors;
293
        }
294
    }
295
296
    return true;
297
}
298
299
/**
@@ 304-317 (lines=14) @@
301
 *
302
 * @return bool
303
 */
304
function xoops_module_update_xnewsletter_rename_mod_table($tablename)
305
{
306
    global $xoopsDB;
307
308
    if (tableExists($xoopsDB->prefix('mod_' . $tablename))) {
309
        $sql    = sprintf('ALTER TABLE ' . $xoopsDB->prefix('mod_' . $tablename) . ' RENAME ' . $xoopsDB->prefix($tablename));
310
        $result = $xoopsDB->queryF($sql);
311
        if (!$result) {
312
            echo '<br>' . _MI_XNEWSLETTER_UPGRADEFAILED . ": RENAME table '" . $tablename . "'";
313
            //            ++$errors;
314
        }
315
    }
316
317
    return true;
318
}
319
320
/**