Project

General

Profile

Bug #14610 » 0000888-show_item.php.diff

Administrator Admin, 2005-03-15 17:07

View differences:

show_item.patched.php Tue Mar 15 16:19:41 2005
$lowerFilename = strtolower($this->file);
// Archive files:
if (TYPO3_OS!='WIN' && !$GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function']) {
if (!$GLOBALS['TYPO3_CONF_VARS']['BE']['disable_exec_function']) {
if ($ext=='zip') {
$code = '';
exec('unzip -l '.$this->file, $t);
exec('unzip -l -qq '.$this->file, $t);
if (is_array($t)) {
reset($t);
next($t);
next($t);
next($t);
while(list(,$val)=each($t)) {
$parts = explode(' ',trim($val),7);
$code.= '
......
} elseif($ext=='tar' || $ext=='tgz' || substr($lowerFilename,-6)=='tar.gz' || substr($lowerFilename,-5)=='tar.z') {
$code = '';
if ($ext=='tar') {
$compr = '';
exec('tar tf '.$this->file, $t);
} else {
$compr = 'z';
if (TYPO3_OS=='WIN') {
// As of March 2005, there is no freely available, precompiled win32
// binary of tar that supports compressed tar archives (tgz/tar.gz/tar.z).
// Therefor, we pipe gunzip to stdout and let tar read from stdin.
// The archive itself remains compressed!
exec('gunzip -c '.$this->file.' | tar t ',$t);
} else {
exec('tar txf '.$this->file,$t);
}
}
exec('tar t'.$compr.'f '.$this->file, $t);
if (is_array($t)) {
foreach($t as $val) {
$code.='
(3-3/3)