Code Duplication    Length = 13-13 lines in 3 locations

class/pcltar.lib.php 3 locations

@@ 821-833 (lines=13) @@
818
        clearstatcache();
819
820
        // ----- Check the file size
821
        if ((!is_file($p_tarname)) || ((0 != (($v_size = filesize($p_tarname)) % 512)) && ('tar' === $p_mode))) {
822
            // ----- Error log
823
            if (!is_file($p_tarname)) {
824
                PclErrorLog(-4, "Archive '$p_tarname' does not exist");
825
            } else {
826
                PclErrorLog(-6, "Archive '$p_tarname' has invalid size " . filesize($p_tarname) . '(not a 512 block multiple)');
827
            }
828
829
            // ----- Return
830
            TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
831
832
            return PclErrorCode();
833
        }
834
        if ((!is_file($p_tarname_add))
835
            || ((0 != (($v_size_add = filesize($p_tarname_add)) % 512))
836
                && ('tar' === $p_mode_add))) {
@@ 834-846 (lines=13) @@
831
832
            return PclErrorCode();
833
        }
834
        if ((!is_file($p_tarname_add))
835
            || ((0 != (($v_size_add = filesize($p_tarname_add)) % 512))
836
                && ('tar' === $p_mode_add))) {
837
            // ----- Error log
838
            if (!is_file($p_tarname_add)) {
839
                PclErrorLog(-4, "Archive '$p_tarname_add' does not exist");
840
            } else {
841
                PclErrorLog(-6, "Archive '$p_tarname_add' has invalid size " . filesize($p_tarname_add) . '(not a 512 block multiple)');
842
            }
843
844
            // ----- Return
845
            TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
846
847
            return PclErrorCode();
848
        }
849
@@ 1205-1217 (lines=13) @@
1202
        clearstatcache();
1203
1204
        // ----- Check the file size
1205
        if ((!is_file($p_tarname)) || ((0 != (($v_size = filesize($p_tarname)) % 512)) && ('tar' === $p_mode))) {
1206
            // ----- Error log
1207
            if (!is_file($p_tarname)) {
1208
                PclErrorLog(-4, "Archive '$p_tarname' does not exist");
1209
            } else {
1210
                PclErrorLog(-6, "Archive '$p_tarname' has invalid size " . filesize($p_tarname) . '(not a 512 block multiple)');
1211
            }
1212
1213
            // ----- Return
1214
            TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
1215
1216
            return PclErrorCode();
1217
        }
1218
1219
        // ----- Look for compressed archive
1220
        if ('tgz' === $p_mode) {