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