From 1bd8f9fcea8cd88b9bc5daa6aa5df0497cc6999f Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 13 Nov 2025 12:19:03 +0100 Subject: [PATCH] new optional parameter $dir for method createArchive() --- inc/inc.ClassExtensionMgr.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/inc/inc.ClassExtensionMgr.php b/inc/inc.ClassExtensionMgr.php index 2d1c3a59e..66f8f4217 100644 --- a/inc/inc.ClassExtensionMgr.php +++ b/inc/inc.ClassExtensionMgr.php @@ -314,11 +314,17 @@ $EXT_CONF = '.var_export($EXT_CONF, true).';'); * @param string $version version of extension (x.y.z) * @return string name of temporary file with archive */ - public function createArchive($extname, $version) { /* {{{ */ + public function createArchive($extname, $version, $dir = null) { /* {{{ */ if(!is_dir($this->extdir ."/". $extname)) return false; - $tmpfile = $this->cachedir."/".$extname."-".$version.".zip"; + if ($dir) { + if (!is_dir($dir)) + return false; + $tmpfile = $dir."/".$extname."-".$version.".zip"; + } else { + $tmpfile = $this->cachedir."/".$extname."-".$version.".zip"; + } if(!SeedDMS_Extension_Mgr::Zip($this->extdir."/".$extname, $tmpfile)) { return false;