diff --git a/inc/inc.ClassExtensionMgr.php b/inc/inc.ClassExtensionMgr.php index 63e633256..e199e9836 100644 --- a/inc/inc.ClassExtensionMgr.php +++ b/inc/inc.ClassExtensionMgr.php @@ -318,11 +318,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;