]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 16 Nov 2012 12:52:34 +0000 (12:52 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 16 Nov 2012 12:52:34 +0000 (12:52 +0000)
inc/ws/Util/html5/class.ws.html5.compiler.php

index 516ceb9f521385272434e4861e9253495e6bf7db..c86d8e42645958ed9fa40207a74627e52c0cae82 100644 (file)
@@ -2,7 +2,7 @@
 
 class wsHTML5Compiler {
 
-       public static function factory($book_id, $version = 'stable', $phonegap = false, $dir = null) {
+       public static function factory($book_id, $version = 'stable', $phonegap = false, $dir = null, $standalone = false) {
                if (is_null($version)) {
                        global $core;
                        $dao = new wsDAOBook($core->con);
@@ -11,9 +11,9 @@ class wsHTML5Compiler {
                }
 
                if ($version == 'stable') {
-                       return new wsHTML5Compiler($book_id, $version, $phonegap, $dir);
+                       return new wsHTML5Compiler($book_id, $version, $phonegap, $dir, $standalone);
                } else {
-                       return new wsHTML5CompilerDev($book_id, $version, $phonegap, $dir);
+                       return new wsHTML5CompilerDev($book_id, $version, $phonegap, $dir, $standalone);
                }
        }
 
@@ -119,10 +119,13 @@ class wsHTML5Compiler {
        protected $config = array();
        protected $assets = '';
        protected $phonegap = false;
+       protected $standalone = false;
 
-       function __construct($book_id, $version = 'stable', $phonegap = false, $dir = null) {
+       function __construct($book_id, $version = 'stable', $phonegap = false, $dir = null, $standalone = false) {
                global $core;
 
+
+
                if ($version == 'stable') {
                        $this->assets = WS_COMPILE_ASSETS . '/_html5prod';
                        wsMaintenance::updateHTML5Sources(array(), false);
@@ -130,6 +133,7 @@ class wsHTML5Compiler {
                        $this->assets = WS_COMPILE_ASSETS . '/_html5';
                }
                $this->phonegap = $phonegap;
+               $this->standalone = $standalone || $this->phonegap;
 
                cubePHP::set_memory('4G');
 
@@ -671,7 +675,7 @@ class wsHTML5Compiler {
                if ($this->phonegap) {
                        $this->config->friend = $this->config->twitter = $this->config->facebook = false;
                }
-               $this->config->standalone = $this->phonegap;
+               $this->config->standalone = $this->standalone;
                return 'var DATAS=' . json_encode($this->config) . ';' . "\n";
        }