From: vincent@cubedesigners.com Date: Wed, 18 Jan 2017 12:03:46 +0000 (+0000) Subject: wip #1077 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f3aeb9f7295f1e287c46eb2bcf407cb27c0f5f6e;p=cubeextranet.git wip #1077 @1 --- diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index 1fcfc6829..5008d2e40 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -318,10 +318,10 @@ class wsExporter { } protected function _install() { - $package = wsPackager::package($this->book_id, $this->version, $this->_haveToZip()); + $p = wsPackager::package($this->book_id, $this->version, $this->_haveToZip(),false); - if (strpos($package, '/fluidbook') == 0) { - $package = ROOT . $package; + if (strpos($p, '/fluidbook') == 0) { + $p = ROOT . $p; } @@ -330,7 +330,6 @@ class wsExporter { $root = '/mnt/sshfs/fluidbook/www/references/'; $rootURL = 'https://www.fluidbook.com/references/'; } else if ($this->action == 'hosting') { - //$root = 'fluidbook@hosting.fluidbook.com:/home/fluidbook/hosting/'; $root = '/mnt/sshfs/fluidbook/hosting/'; $rootURL = 'http://hosting.fluidbook.com/'; } else if ($this->action == 'ftp') { @@ -346,9 +345,9 @@ class wsExporter { } if (stristr($path, 'ftp://')) { - $this->_lftp($package, $path, false); + $this->_lftp($p, $path, false); } else { - $this->_rsync($package, $path); + $this->_rsync($p, $path); } if (!is_null($rootURL)) { @@ -425,7 +424,7 @@ class wsExporter { } protected function _rsync($src, $dest, $erase = false, $chown = null) { - if (is_file($src)) { + /*if (is_file($src)) { $dir = dirname($dest); if (!file_exists($dir)) { mkdir($dir, 0777, true); @@ -435,7 +434,7 @@ class wsExporter { `chown $chown $dest`; } return; - } + }*/ $cl = new CubeIT_CommandLine_Rsync($src, $dest, $erase); $cl->setProg('/usr/bin/rsync'); diff --git a/inc/ws/Util/packager/class.ws.packager.php b/inc/ws/Util/packager/class.ws.packager.php index c5d680bd6..35d093c6a 100644 --- a/inc/ws/Util/packager/class.ws.packager.php +++ b/inc/ws/Util/packager/class.ws.packager.php @@ -17,7 +17,7 @@ class wsPackager { protected $_clean = true; public $cleanOnDestruct = true; - public static function package($book_id, $version, $zip = true) { + public static function package($book_id, $version, $zip = true, $cleanOnDestruct = true) { global $packager; cubePHP::neverStop(); @@ -38,6 +38,7 @@ class wsPackager { } else if ($version == 'phonegap') { $packager = new wsPackagerPhonegap($book_id); } + $packager->cleanOnDestruct = $packager->cleanOnDestruct && $cleanOnDestruct; return $packager->makePackage($zip); }