projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2.4.4 no Longer Displays 0.00 Sales Invoices in customer_inquiry.php. Fixed. $Braath...
[fa-stable.git]
/
includes
/
archive.inc
diff --git
a/includes/archive.inc
b/includes/archive.inc
index d8316d39877150fb4f217498a6c615679e358a2f..b1a81001eb1d5fe10c51d01f4fcf79aa99356071 100644
(file)
--- a/
includes/archive.inc
+++ b/
includes/archive.inc
@@
-16,7
+16,7
@@
class archive
{
class archive
{
- function
archive
($name)
+ function
__construct
($name)
{
$this->options = array (
'basedir' => ".",
{
$this->options = array (
'basedir' => ".",
@@
-238,9
+238,9
@@
class archive
class tar_file extends archive
{
class tar_file extends archive
{
- function
tar_file
($name)
+ function
__construct
($name)
{
{
-
$this->archive
($name);
+
parent::__construct
($name);
$this->options['type'] = "tar";
}
$this->options['type'] = "tar";
}
@@
-324,7
+324,7
@@
class tar_file extends archive
{
$temp = unpack("a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100symlink/a6magic/a2temp/a32temp/a32temp/a8temp/a8temp/a155prefix/a12temp", $block);
$file = array (
{
$temp = unpack("a100name/a8mode/a8uid/a8gid/a12size/a12mtime/a8checksum/a1type/a100symlink/a6magic/a2temp/a32temp/a32temp/a8temp/a8temp/a155prefix/a12temp", $block);
$file = array (
- 'name' =>
$temp['prefix'] . $temp['name']
,
+ 'name' =>
rtrim($temp['prefix']) . rtrim($temp['name'])
,
'stat' => array (
2 => octdec($temp['mode']),
4 => octdec($temp['uid']),
'stat' => array (
2 => octdec($temp['mode']),
4 => octdec($temp['uid']),
@@
-395,7
+395,8
@@
class tar_file extends archive
else if ($new = @fopen($file['name'], "wb"))
{
fwrite($new, fread($fp, $file['stat'][7]));
else if ($new = @fopen($file['name'], "wb"))
{
fwrite($new, fread($fp, $file['stat'][7]));
- fread($fp, (512 - $file['stat'][7] % 512) == 512 ? 0 : (512 - $file['stat'][7] % 512));
+ if ($file['stat'][7] % 512)
+ fread($fp, 512 - $file['stat'][7] % 512);
fclose($new);
@chmod($file['name'], $file['stat'][2]);
}
fclose($new);
@chmod($file['name'], $file['stat'][2]);
}
@@
-415,7
+416,6
@@
class tar_file extends archive
}
else
$this->error[] = "Could not open file {$this->options['name']}";
}
else
$this->error[] = "Could not open file {$this->options['name']}";
- error_log('3');
return $flist;
}
return $flist;
}
@@
-428,9
+428,9
@@
class tar_file extends archive
class gzip_file extends tar_file
{
class gzip_file extends tar_file
{
- function
gzip_file
($name)
+ function
__construct
($name)
{
{
-
$this->tar_file
($name);
+
parent::__construct
($name);
$this->options['type'] = "gzip";
}
$this->options['type'] = "gzip";
}
@@
-463,4
+463,3
@@
class gzip_file extends tar_file
}
}
}
}
-?>
\ No newline at end of file