From aa0a50809eb3c93dacf3a19c2e8b2bc0b6e27b6e Mon Sep 17 00:00:00 2001 From: zero-24 Date: Wed, 17 Jun 2015 20:39:30 +0200 Subject: [PATCH] Update tar.php --- libraries/joomla/archive/tar.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/libraries/joomla/archive/tar.php b/libraries/joomla/archive/tar.php index 45d93b30aae11..4479c61587c7d 100644 --- a/libraries/joomla/archive/tar.php +++ b/libraries/joomla/archive/tar.php @@ -33,7 +33,7 @@ class JArchiveTar implements JArchiveExtractable * @since 11.1 */ private $_types = array( - 0x0 => 'Unix file', + 0x0 => 'Unix file', 0x30 => 'File', 0x31 => 'Link', 0x32 => 'Symbolic link', @@ -183,9 +183,11 @@ protected function _getTarInfo(& $data) ); } - /* This variable has been set in the previous loop, - meaning that the filename was present in the previous block - to allow more than 100 characters - see below */ + /** + * This variable has been set in the previous loop, + * meaning that the filename was present in the previous block + * to allow more than 100 characters - see below + */ if (isset($longlinkfilename)) { $info['filename'] = $longlinkfilename; @@ -220,7 +222,7 @@ protected function _getTarInfo(& $data) if (($info['typeflag'] == 0) || ($info['typeflag'] == 0x30) || ($info['typeflag'] == 0x35)) { - /* File or folder. */ + // File or folder. $file['data'] = $contents; $mode = hexdec(substr($info['mode'], 4, 3)); @@ -230,15 +232,16 @@ protected function _getTarInfo(& $data) } elseif (chr($info['typeflag']) == 'L' && $info['filename'] == '././@LongLink') { - /* GNU tar ././@LongLink support - the filename is actually in the contents, setting a variable here so we can test in the next loop */ + // GNU tar ././@LongLink support - the filename is actually in the contents, + // setting a variable here so we can test in the next loop $longlinkfilename = $contents; - /* And the file contents are in the next block so we'll need to skip this */ + // And the file contents are in the next block so we'll need to skip this continue; } else { - /* Some other type. */ + // Some other type. } $return_array[] = $file;