Code Duplication    Length = 10-10 lines in 2 locations

admin/file.php 2 locations

@@ 51-60 (lines=10) @@
48
        }
49
        redirect_header('file.php', 5, sprintf(_AM_USERLOG_ERROR, implode("<br\>", $loglogObj->getErrors())));
50
        break;
51
    case 'rename':
52
        // only one file. 0 file or more than one file => error
53
        if (1 != $totalFiles) {
54
            redirect_header('file.php', 5, sprintf(_AM_USERLOG_ERROR, _AM_USERLOG_FILE_SELECT_ONE));
55
        }
56
        if ($newFile = $loglogObj->renameFile($file[0], $filename)) {
57
            redirect_header('file.php', 5, sprintf(_AM_USERLOG_FILE_RENAME_SUCCESS, $file[0], $newFile));
58
        }
59
        redirect_header('file.php', 5, sprintf(_AM_USERLOG_ERROR, implode("<br\>", $loglogObj->getErrors())));
60
        break;
61
    case 'copy':
62
        // only one file. 0 file or more than one file => error
63
        if (1 != $totalFiles) {
@@ 61-70 (lines=10) @@
58
        }
59
        redirect_header('file.php', 5, sprintf(_AM_USERLOG_ERROR, implode("<br\>", $loglogObj->getErrors())));
60
        break;
61
    case 'copy':
62
        // only one file. 0 file or more than one file => error
63
        if (1 != $totalFiles) {
64
            redirect_header('file.php', 5, sprintf(_AM_USERLOG_ERROR, _AM_USERLOG_FILE_SELECT_ONE));
65
        }
66
        if ($newFile = $loglogObj->copyFile($file[0], $filename)) {
67
            redirect_header('file.php', 5, sprintf(_AM_USERLOG_FILE_COPY_SUCCESS, $file[0], $newFile));
68
        }
69
        redirect_header('file.php', 5, sprintf(_AM_USERLOG_ERROR, implode("<br\>", $loglogObj->getErrors())));
70
        break;
71
    case 'merge':
72
        if ($mergeFile = $loglogObj->mergeFiles($file, $filename)) {
73
            redirect_header('file.php', 5, sprintf(_AM_USERLOG_FILE_MERGE_SUCCESS, $totalFiles, $mergeFile));