Code Duplication    Length = 16-16 lines in 2 locations

class/pcltar.lib.php 2 locations

@@ 3204-3219 (lines=16) @@
3201
                $v_old_size = $v_header['size'];
3202
3203
                // ----- Add the file
3204
                if (1 != ($v_result = PclTarHandleAddFile($v_temp_tar, $v_current_filename, $p_tar_mode, $v_header, $p_add_dir, $p_remove_dir))) {
3205
                    // ----- Close the tarfile
3206
                    if ('tar' === $p_tar_mode) {
3207
                        fclose($v_tar);
3208
                        fclose($v_temp_tar);
3209
                    } else {
3210
                        gzclose($v_tar);
3211
                        gzclose($v_temp_tar);
3212
                    }
3213
                    @unlink($p_temp_tarname);
3214
3215
                    // ----- Return status
3216
                    TrFctEnd(__FILE__, __LINE__, $v_result);
3217
3218
                    return $v_result;
3219
                }
3220
3221
                // ----- Trace
3222
                TrFctMessage(__FILE__, __LINE__, 2, 'Skip old file ' . $v_header['filename'] . '');
@@ 3254-3269 (lines=16) @@
3251
                TrFctMessage(__FILE__, __LINE__, 3, "File '$p_file_list[$i]' need to be added");
3252
3253
                // ----- Add the file
3254
                if (1 != ($v_result = PclTarHandleAddFile($v_temp_tar, $p_file_list[$i], $p_tar_mode, $v_header, $p_add_dir, $p_remove_dir))) {
3255
                    // ----- Close the tarfile
3256
                    if ('tar' === $p_tar_mode) {
3257
                        fclose($v_tar);
3258
                        fclose($v_temp_tar);
3259
                    } else {
3260
                        gzclose($v_tar);
3261
                        gzclose($v_temp_tar);
3262
                    }
3263
                    @unlink($p_temp_tarname);
3264
3265
                    // ----- Return status
3266
                    TrFctEnd(__FILE__, __LINE__, $v_result);
3267
3268
                    return $v_result;
3269
                }
3270
3271
                // ----- Add the array describing the file into the list
3272
                $p_list_detail[$v_nb]           = $v_header;