Code Duplication    Length = 12-12 lines in 3 locations

class/pcltar.lib.php 3 locations

@@ 1386-1397 (lines=12) @@
1383
        $v_nb = count($p_list_detail);
1384
1385
        // ----- Check the parameters
1386
        if ($p_tar == 0) {
1387
            // ----- Error log
1388
            PclErrorLog(-3, 'Invalid file descriptor in file ' . __FILE__ . ', line ' . __LINE__);
1389
1390
            // ----- Return
1391
            TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
1392
1393
            return PclErrorCode();
1394
        }
1395
1396
        // ----- Check the arguments
1397
        if (count($p_list) == 0) {
1398
            // ----- Error log
1399
            PclErrorLog(-3, 'Invalid file list parameter (invalid or empty list)');
1400
@@ 1532-1543 (lines=12) @@
1529
        $v_result = 1;
1530
1531
        // ----- Check the parameters
1532
        if ($p_tar == 0) {
1533
            // ----- Error log
1534
            PclErrorLog(-3, 'Invalid file descriptor in file ' . __FILE__ . ', line ' . __LINE__);
1535
1536
            // ----- Return
1537
            TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
1538
1539
            return PclErrorCode();
1540
        }
1541
1542
        // ----- Skip empty file names
1543
        if ($p_filename == '') {
1544
            // ----- Error log
1545
            PclErrorLog(-3, 'Invalid file list parameter (invalid or empty list)');
1546
@@ 1689-1700 (lines=12) @@
1686
        $v_result = 1;
1687
1688
        // ----- Check the parameters
1689
        if (($p_tar == 0) || ($p_filename == '')) {
1690
            // ----- Error log
1691
            PclErrorLog(-3, 'Invalid file descriptor in file ' . __FILE__ . ', line ' . __LINE__);
1692
1693
            // ----- Return
1694
            TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
1695
1696
            return PclErrorCode();
1697
        }
1698
1699
        // ----- Filename (reduce the path of stored name)
1700
        if ($p_stored_filename == '') {
1701
            $p_stored_filename = $p_filename;
1702
        }
1703
        $v_reduce_filename = PclTarHandlePathReduction($p_stored_filename);