Code Duplication    Length = 17-17 lines in 2 locations

class/pcltar.lib.php 2 locations

@@ 2251-2267 (lines=17) @@
2248
            }
2249
2250
            // ----- File name and properties are logged if listing mode or file is extracted
2251
            if ($v_listing || $v_extract_file || $v_extraction_stopped) {
2252
                TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . '');
2253
2254
                // ----- Log extracted files
2255
                if (($v_file_dir = dirname($v_header['filename'])) == $v_header['filename']) {
2256
                    $v_file_dir = '';
2257
                }
2258
                if (($v_file_dir === '') && (0 === strpos($v_header['filename'], '/'))) {
2259
                    $v_file_dir = '/';
2260
                }
2261
2262
                // ----- Add the array describing the file into the list
2263
                $p_list_detail[$v_nb] = $v_header;
2264
2265
                // ----- Increment
2266
                ++$v_nb;
2267
            }
2268
        }
2269
2270
        // ----- Close the tarfile
@@ 2518-2534 (lines=17) @@
2515
            }
2516
2517
            // ----- File name and properties are logged if listing mode or file is extracted
2518
            if ($v_extract_file) {
2519
                TrFctMessage(__FILE__, __LINE__, 2, 'Memorize info about file ' . $v_header['filename'] . '');
2520
2521
                // ----- Log extracted files
2522
                if (($v_file_dir = dirname($v_header['filename'])) == $v_header['filename']) {
2523
                    $v_file_dir = '';
2524
                }
2525
                if (($v_file_dir === '') && (0 === strpos($v_header['filename'], '/'))) {
2526
                    $v_file_dir = '/';
2527
                }
2528
2529
                // ----- Add the array describing the file into the list
2530
                $p_list_detail[$v_nb] = $v_header;
2531
2532
                // ----- Increment
2533
                ++$v_nb;
2534
            }
2535
2536
            // ----- Increment the current file index
2537
            ++$p_index_current;