From: vincent@cubedesigners.com Date: Fri, 27 Jun 2014 12:30:48 +0000 (+0000) Subject: (no commit message) X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=53b26d1ac491b8baf13c49e33b651834a57a7a32;p=cubeextranet.git --- diff --git a/inc/ws/Util/class.ws.exporter.php b/inc/ws/Util/class.ws.exporter.php index b3a2e2b04..52f41b437 100644 --- a/inc/ws/Util/class.ws.exporter.php +++ b/inc/ws/Util/class.ws.exporter.php @@ -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); } 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 b2b09aa86..4c69abe8d 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 @@ -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; } }