Code Duplication    Length = 16-16 lines in 2 locations

class/pcltar.lib.php 2 locations

@@ 3227-3242 (lines=16) @@
3224
                $v_old_size = $v_header['size'];
3225
3226
                // ----- Add the file
3227
                if (($v_result = PclTarHandleAddFile($v_temp_tar, $v_current_filename, $p_tar_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) {
3228
                    // ----- Close the tarfile
3229
                    if ($p_tar_mode === 'tar') {
3230
                        fclose($v_tar);
3231
                        fclose($v_temp_tar);
3232
                    } else {
3233
                        gzclose($v_tar);
3234
                        gzclose($v_temp_tar);
3235
                    }
3236
                    @unlink($p_temp_tarname);
3237
3238
                    // ----- Return status
3239
                    TrFctEnd(__FILE__, __LINE__, $v_result);
3240
3241
                    return $v_result;
3242
                }
3243
3244
                // ----- Trace
3245
                TrFctMessage(__FILE__, __LINE__, 2, 'Skip old file ' . $v_header['filename'] . '');
@@ 3277-3292 (lines=16) @@
3274
                TrFctMessage(__FILE__, __LINE__, 3, "File '$p_file_list[$i]' need to be added");
3275
3276
                // ----- Add the file
3277
                if (($v_result = PclTarHandleAddFile($v_temp_tar, $p_file_list[$i], $p_tar_mode, $v_header, $p_add_dir, $p_remove_dir)) != 1) {
3278
                    // ----- Close the tarfile
3279
                    if ($p_tar_mode === 'tar') {
3280
                        fclose($v_tar);
3281
                        fclose($v_temp_tar);
3282
                    } else {
3283
                        gzclose($v_tar);
3284
                        gzclose($v_temp_tar);
3285
                    }
3286
                    @unlink($p_temp_tarname);
3287
3288
                    // ----- Return status
3289
                    TrFctEnd(__FILE__, __LINE__, $v_result);
3290
3291
                    return $v_result;
3292
                }
3293
3294
                // ----- Add the array describing the file into the list
3295
                $p_list_detail[$v_nb]           = $v_header;