Code Duplication    Length = 5-5 lines in 2 locations

index.php 1 location

@@ 326-330 (lines=5) @@
323
        }
324
        break;
325
326
    case 'cancel':
327
        $photos_dir     = XOOPS_UPLOAD_PATH . '/' . $xoopsModule->getVar('dirname');
328
        $nb_removed_tmp = xfgb_clear_tmp_files($photos_dir);
329
        redirect_header('index.php', 0);
330
        break;
331
}
332
$sql = $xoopsDB->query('SELECT * FROM ' . $xoopsDB->prefix('xfguestbook_country') . ' ORDER BY country_name ASC');
333

xfcreate.php 1 location

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