]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 27 Jun 2014 12:30:48 +0000 (12:30 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 27 Jun 2014 12:30:48 +0000 (12:30 +0000)
inc/ws/Util/class.ws.exporter.php
inc/ws/Util/html5/app/class.ws.html5.app.compiler.php

index b3a2e2b0458da7723ddb93832ea6c3c454a55d2c..52f41b43754bfa1be9c59adb6ccac31659ca3cda 100644 (file)
@@ -90,40 +90,37 @@ class wsExporter {
 
                if (isset($collection->settings['offline']) && $collection->settings['offline']) {
                        $p = $compiler->getPublishedVersionPath($os, $collection->settings['version']);
+                       if ($p) {
+                               $phonegap->addAdditionalSource('publications', $p);
+
+                               $exs = explode("\n", $collection->settings['offline_exclude']);
+                               foreach ($exs as $e) {
+                                       $e = trim($e);
+                                       if ($e == '') {
+                                               continue;
+                                       }
 
-                       $phonegap->addAdditionalSource('publications', $p);
-
-                       $exs = explode("\n", $collection->settings['offline_exclude']);
-                       foreach ($exs as $e) {
-                               $e = trim($e);
-                               if ($e == '') {
-                                       continue;
-                               }
-
-                               if (stristr($e, '$id$')) {
-                                       foreach ($allpub as $i) {
-                                               $phonegap->addExclude('"' . str_replace('$id$', $i, $e) . '"');
+                                       if (stristr($e, '$id$')) {
+                                               foreach ($allpub as $i) {
+                                                       $phonegap->addExclude('"' . str_replace('$id$', $i, $e) . '"');
+                                               }
+                                       } else {
+                                               $phonegap->addExclude('"' . $e . '"');
                                        }
-                               } else {
-                                       $phonegap->addExclude('"' . $e . '"');
                                }
-                       }
 
-                       $add = explode("\n", $collection->settings['offline_syncs']);
-                       foreach ($add as $a) {
-                               $a = trim($a);
-                               if ($a == '') {
-                                       continue;
+                               $add = explode("\n", $collection->settings['offline_syncs']);
+                               foreach ($add as $a) {
+                                       $a = trim($a);
+                                       if ($a == '') {
+                                               continue;
+                                       }
+                                       list($to, $source) = explode(':', $a);
+                                       $phonegap->addAdditionalSource('publications' . '/' . $to, $p . $source);
                                }
-                               list($to, $source) = explode(':', $a);
-                               $phonegap->addAdditionalSource('publications' . '/' . $to, $p . $source);
                        }
                }
 
-
-
-
-
                $phonegap->run($run);
        }
 
index b2b09aa8666f2fba74089a4cbf964a22bcda40fe..4c69abe8d6fa508f39c0a6240398269eabfb644b 100644 (file)
@@ -245,7 +245,7 @@ class wsHTML5AppCompiler {
 
        public function getPublishedVersionPath($os, $version) {
                global $core;
-               $r = $core->con->select('SELECT compile_date FROM book_collection_compile WHERE collection_id=\'' . $this->collectionId . '\'');
+               $r = $core->con->select('SELECT * FROM book_collection_compile WHERE collection_id=\'' . $this->collectionId . '\'');
                while ($r->fetch()) {
                        $v = $r->{"online_" . $os};
                        if (!$v) {
@@ -256,6 +256,7 @@ class wsHTML5AppCompiler {
                        }
                        return WS_COLLECTIONS . '/versions/' . $this->collectionId . '/' . $r->compile_date . '/' . $os . '/';
                }
+               return false;
        }
 
 }