From 569bf02278cb8944d6798227f0067faeed72d6fd Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Fri, 16 Nov 2012 12:52:34 +0000 Subject: [PATCH] --- inc/ws/Util/html5/class.ws.html5.compiler.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index 516ceb9f5..c86d8e426 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -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"; } -- 2.39.5