mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-15 06:01:19 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
08c0507de2
|
@ -418,8 +418,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)) {
|
||||||
|
|
|
@ -78,7 +78,7 @@ elseif ($action == "upload") { /* {{{ */
|
||||||
if($_FILES['userfile']['error']) {
|
if($_FILES['userfile']['error']) {
|
||||||
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
||||||
}
|
}
|
||||||
if($_FILES['userfile']['type'] != 'application/zip') {
|
if(!in_array($_FILES['userfile']['type'], array('application/zip', 'application/x-zip-compressed'))) {
|
||||||
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
UI::exitError(getMLText("admin_tools"),getMLText("error_occured"));
|
||||||
}
|
}
|
||||||
// $extMgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir);
|
// $extMgr = new SeedDMS_Extension_Mgr($settings->_rootDir."/ext", $settings->_cacheDir);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user