CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#12538] Module FileManager 1.6.12 corrections files

avatar
Created By: Philippe Thomas (filto)
Date Submitted: Mon Apr 18 22:13:34 -0400 2022

Assigned To:
Version: None
CMSMS Version: 2.2.16
Severity: Minor
Resolution: Fixed
State: Closed
Summary:
Module FileManager 1.6.12 corrections files
Detailed Description:
modules/FileManager/easyarchives/EasyTar.class.php

-----------------
L45 undefined $tmp (only defined in if ) in function infosTar()

if (is_file($tmp)) unlink($tmp);
#--- correction
if (isset($tmp) && is_file($tmp)) unlink($tmp);

-----------------
L53 in function makeTar() : $Tar not defined  and missing foreach brace :

foreach ($src as $item)
$Tar .= $this->addTarItem($item.((is_dir($item) && substr($item,
-1)!='/')?'/':''), dirname($item).'/');

#----correction

$Tar = '';
foreach ($src as $item) {
$Tar .= $this->addTarItem($item . ((is_dir($item) && substr($item, -1) !=
'/') ? '/' : ''), dirname($item) . '/');
}

-----------------
L148 missing ternary parenthesis in function addTarItem() : (for php 8
compatibimity)

$infos['link1'] = is_link($item) ? 2 : is_dir ($item) ? 5 : 0;
#---correction
$infos['link1'] = is_link($item) ? 2 : (is_dir($item) ? 5 : 0);

-----------------
L 166 $sub not defined  and missing foreach brace :

foreach ($lst as $subitem)
$sub .= $this->addTarItem($item.$subitem.(is_dir($item.$subitem)?'/':''),
$racine);

#---correction
$sub = '';
foreach ($lst as $subitem) {
$sub .= $this->addTarItem($item . $subitem . (is_dir($item . $subitem) ? '/'
: ''), $racine);
}			}

##############################################################################
modules/FileManager/dunzip.php

-----------------------
L 192,193,204,207,208,209,210 in Function getList : replace $file by $dir

##############################################################################
modules/FileManager/FileManager.module.php

L 108  wrong syntax filemanager_utils not filemanager_util in function GetMode :

return filemanager_util::format_permissions($statinfo["mode"]);
#---correction
return filemanager_utils::format_permissions($statinfo["mode"]);





History

Comments
avatar
Date: 2022-09-05 00:56
Posted By: tom (tomphantoo)

The EasyTar library is ancient and unmaintained, it seems. Replace it with e.g.
UnifiedArchive <https://github.com/wapmorgan/UnifiedArchive>
      
avatar
Date: 2022-09-05 18:38
Posted By: tom (tomphantoo)

The EasyTar library is ancient and unmaintained, it seems. Replace it with e.g.
UnifiedArchive <https://github.com/wapmorgan/UnifiedArchive>
      
Updates

Updated: 2022-09-10 19:44
resolution_id: 5 => 7
state: Open => Closed

Updated: 2022-09-05 00:56
resolution_id: => 5