Code Duplication    Length = 5-5 lines in 2 locations

index.php 1 location

@@ 376-380 (lines=5) @@
373
        }
374
        break;
375
376
    case 'cancel':
377
        $photos_dir     = XOOPS_UPLOAD_PATH . '/' . $xoopsModule->getVar('dirname');
378
        $nb_removed_tmp = xfgb_clear_tmp_files($photos_dir);
379
        redirect_header('index.php', 0);
380
        break;
381
}
382
$sql = $xoopsDB->query('SELECT * FROM ' . $xoopsDB->prefix('xfguestbook_country') . ' ORDER BY country_name ASC');
383

xfcreate.php 1 location

@@ 60-64 (lines=5) @@
57
$badip = in_array($_SERVER['REMOTE_ADDR'], xfgb_get_badips()) ? true : false;
58
59
switch ($op) {
60
    case 'cancel':
61
        $photos_dir     = XOOPS_UPLOAD_PATH . '/' . $xoopsModule->getVar('dirname');
62
        $nb_removed_tmp = xfgb_clear_tmp_files($photos_dir);
63
        redirect_header('index.php', 0);
64
        break;
65
66
    case 'preview':
67
        $ts                                      = MyTextSanitizer::getInstance();