Code Duplication    Length = 5-5 lines in 3 locations

main/work/downloadfolder.inc.php 1 location

@@ 186-190 (lines=5) @@
183
    //start download of created file
184
    $name = $fileName .'.zip';
185
    
186
    if (Security::check_abs_path($temp_zip_file, api_get_path(SYS_ARCHIVE_PATH))) {
187
        DocumentManager::file_send_for_download($temp_zip_file, true, $name);
188
        @unlink($temp_zip_file);
189
        exit;
190
    }
191
} else {
192
    exit;
193
}

main/work/work.lib.php 1 location

@@ 4988-4992 (lines=5) @@
4985
        // Start download of created file
4986
        $name = basename(api_replace_dangerous_char($userInfo['complete_name'])).'.zip';
4987
        Event::event_download($name.'.zip (folder)');
4988
        if (Security::check_abs_path($tempZipFile, api_get_path(SYS_ARCHIVE_PATH))) {
4989
            DocumentManager::file_send_for_download($tempZipFile, true, $name);
4990
            @unlink($tempZipFile);
4991
            exit;
4992
        }
4993
    }
4994
    exit;
4995
}

main/inc/lib/document.lib.php 1 location

@@ 6210-6214 (lines=5) @@
6207
            );
6208
        }
6209
6210
        if (Security::check_abs_path($tempZipFile, api_get_path(SYS_ARCHIVE_PATH))) {
6211
            DocumentManager::file_send_for_download($tempZipFile, true);
6212
            @unlink($tempZipFile);
6213
            exit;
6214
        }
6215
    }
6216
6217
    /**