mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-08 20:46:05 +00:00
do not call unzip but use ZipArchive instead
This commit is contained in:
parent
f1ad164f44
commit
41fd2514b6
|
@ -414,8 +414,17 @@ class SeedDMS_Extension_Mgr {
|
||||||
$this->errmsgs[] = "Cannot create temp. extension directory";
|
$this->errmsgs[] = "Cannot create temp. extension directory";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$cmd = "cd ".$newdir."; unzip ".$file;
|
$zip = new ZipArchive;
|
||||||
exec($cmd);
|
$res = $zip->open($file);
|
||||||
|
if ($res === TRUE) {
|
||||||
|
$zip->extractTo($newdir);
|
||||||
|
$zip->close();
|
||||||
|
} else {
|
||||||
|
$this->errmsgs[] = "Cannot open extension file";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// $cmd = "cd ".$newdir."; unzip ".$file;
|
||||||
|
// exec($cmd);
|
||||||
|
|
||||||
/* Check if extension is complete and fullfills the constraints */
|
/* Check if extension is complete and fullfills the constraints */
|
||||||
if(!self::checkExtension($newdir)) {
|
if(!self::checkExtension($newdir)) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user