Code Duplication    Length = 5-5 lines in 3 locations

main/work/work.lib.php 1 location

@@ 4981-4985 (lines=5) @@
4978
        // Start download of created file
4979
        $name = basename(api_replace_dangerous_char($userInfo['complete_name'])).'.zip';
4980
        Event::event_download($name.'.zip (folder)');
4981
        if (Security::check_abs_path($tempZipFile, api_get_path(SYS_ARCHIVE_PATH))) {
4982
            DocumentManager::file_send_for_download($tempZipFile, true, $name);
4983
            @unlink($tempZipFile);
4984
            exit;
4985
        }
4986
    }
4987
    exit;
4988
}

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

@@ 6201-6205 (lines=5) @@
6198
            );
6199
        }
6200
6201
        if (Security::check_abs_path($tempZipFile, api_get_path(SYS_ARCHIVE_PATH))) {
6202
            DocumentManager::file_send_for_download($tempZipFile, true);
6203
            @unlink($tempZipFile);
6204
            exit;
6205
        }
6206
    }
6207
6208
    /**

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
}