]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 19 Jun 2013 09:50:59 +0000 (09:50 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 19 Jun 2013 09:50:59 +0000 (09:50 +0000)
inc/ws/Controlleur/class.ws.services.php
inc/ws/Util/class.ws.exporter.php
inc/ws/Util/html5/app/class.ws.html5.app.compiler.php

index 12f11cfaed72af27600a0d76f141f63fef110c27..7176a85215f177d57e96a271d23fe3501710fa42 100644 (file)
@@ -96,8 +96,6 @@ class wsServices extends cubeFlashGateway {
                                $s = ' (' . ($i + 1) . '/' . $total . ')';\r
                        }\r
 \r
-\r
-\r
                        // Send the email\r
                        $mail = new cubeMail();\r
                        $mail->returnPath = 'postmaster@fluidbook.com';\r
@@ -163,10 +161,7 @@ class wsServices extends cubeFlashGateway {
                                $cover = WS_DOCS . '/' . $pages[1]['document_id'] . '/p' . $pages[1]['document_page'] . '.jpg';\r
                        }\r
                }\r
-\r
-\r
                cubeHTTP::relayFile($cover);\r
-\r
                exit;\r
        }\r
 \r
@@ -556,6 +551,13 @@ class wsServices extends cubeFlashGateway {
                header('Location: http://www.wesco-eshop.fr');\r
        }\r
 \r
+       public function collection() {\r
+               $this->outputXML = false;\r
+               header('Content-type: application/json');\r
+               echo '[]';\r
+               exit;\r
+       }\r
+\r
 }\r
 \r
 ?>
\ No newline at end of file
index 6cc756e5b83f8054a5fd9ab0c1676da930dc2378..dc5608b8bb2d2076b9fbcbd7abf63eae7a64a92c 100644 (file)
@@ -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();
index 792c590fbd95670f122af973ee9a44bfd8ba955a..97644c5183e76f8a35e8377f330efc9a115f3d34 100644 (file)
@@ -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() {