From: vincent@cubedesigners.com Date: Wed, 19 Jun 2013 09:50:59 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=3615a7ac8f02dbca7111e19cc85330b6d732a79b;p=cubeextranet.git --- diff --git a/inc/ws/Controlleur/class.ws.services.php b/inc/ws/Controlleur/class.ws.services.php index 12f11cfae..7176a8521 100644 --- a/inc/ws/Controlleur/class.ws.services.php +++ b/inc/ws/Controlleur/class.ws.services.php @@ -96,8 +96,6 @@ class wsServices extends cubeFlashGateway { $s = ' (' . ($i + 1) . '/' . $total . ')'; } - - // Send the email $mail = new cubeMail(); $mail->returnPath = 'postmaster@fluidbook.com'; @@ -163,10 +161,7 @@ class wsServices extends cubeFlashGateway { $cover = WS_DOCS . '/' . $pages[1]['document_id'] . '/p' . $pages[1]['document_page'] . '.jpg'; } } - - cubeHTTP::relayFile($cover); - exit; } @@ -556,6 +551,13 @@ class wsServices extends cubeFlashGateway { header('Location: http://www.wesco-eshop.fr'); } + public function collection() { + $this->outputXML = false; + header('Content-type: application/json'); + echo '[]'; + exit; + } + } ?> \ No newline at end of file diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index 6cc756e5b..dc5608b8b 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -29,7 +29,6 @@ class wsExporter { protected function _createProject($os, $name, $ns) { if ($os == 'ios') { - $dir = '/Phonegap/Projects/' . str_replace('.', '/', $ns); $sdir = '/mnt/macbox' . $dir; if (file_exists($sdir)) { @@ -42,7 +41,7 @@ class wsExporter { $cl->setArg(null, $dir); $cl->setArg(null, $ns); $cl->setArg(null, CubeIT_Text::str2URL($name)); - $cl->setSSH('paris.cubedesigners.com', 'vincent', 'iquique', 22022); + $cl->setSSH('paris.cubedesigners.com', 'vincent', '', 22022); $cl->execute(); } elseif ($os == 'android') { @@ -104,7 +103,7 @@ class wsExporter { if ($this->action == 'references') { - $root = '/home/fluidbook/www/references/'; + $root = 'fluidbook@fluidbook.com:/home/fluidbook/www/references/'; $rootURL = 'http://www.fluidbook.com/references/'; } else if ($this->action == 'hosting') { $root = '/home/fluidbook/hosting/'; @@ -213,8 +212,18 @@ class wsExporter { return; } + $destDistant = stristr($dest, '@'); + if ($destDistant) { + list($distServer, $distDir) = explode(':', $dest); + } + + if (!file_exists($dest)) { - mkdir($dest, 0777, true); + if (!$destDistant) { + mkdir($dest, 0777, true); + } else { + `ssh $distServer "mkdir -p $distDir"`; + } } $cp = new cubeCommandLine('rsync'); @@ -227,6 +236,9 @@ class wsExporter { $cp->setArg('force'); $cp->setArg('delete-after'); } + if ($destDistant) { + $cp->setArg('e', 'ssh'); + } $cp->setArg(null, rtrim($src, '/') . '/'); $cp->setArg(null, rtrim($dest, '/') . '/'); $cp->execute(); diff --git a/inc/ws/Util/html5/app/class.ws.html5.app.compiler.php b/inc/ws/Util/html5/app/class.ws.html5.app.compiler.php index 792c590fb..97644c518 100644 --- a/inc/ws/Util/html5/app/class.ws.html5.app.compiler.php +++ b/inc/ws/Util/html5/app/class.ws.html5.app.compiler.php @@ -79,7 +79,7 @@ class wsHTML5AppCompiler { $config['id'] = $this->collectionId; $this->copy(WS_COMPILE_ASSETS . '/_html5/js/libs/phonegap/' . $this->phonegapVersion . '/cordova-' . $this->os . '.js', $this->vdir . '/js/cordova.js'); - file_put_contents($this->vdir . '/js/app.js', 'DATAS = ' . CubeIT_Util_Json::encode($config) . ';'); + file_put_contents($this->vdir . '/data/app.js', 'DATAS = ' . CubeIT_Util_Json::encode($config) . ';'); } function writeIndex() {