]> _ Git - cubeextranet.git/commitdiff
(no commit message)
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 10 Jul 2013 15:14:49 +0000 (15:14 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 10 Jul 2013 15:14:49 +0000 (15:14 +0000)
inc/ws/Util/html5/class.ws.html5.compiler.php

index 8d0a91b9b4ac757a4fecd58a487c249ea5f2d596..f46ded7ec3771583b43662265291940251c5b1c6 100644 (file)
@@ -2,7 +2,7 @@
 
 class wsHTML5Compiler {
 
-       public static function factory($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false) {
+       public static function factory($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = 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, 'stable', $phonegap, $phonegapVersion, $dir, $standalone, $appcache);
+                       return new wsHTML5Compiler($book_id, 'stable', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
                } else {
-                       return new wsHTML5CompilerDev($book_id, 'dev', $phonegap, $phonegapVersion, $dir, $standalone, $appcache);
+                       return new wsHTML5CompilerDev($book_id, 'dev', $phonegap, $phonegapVersion, $dir, $standalone, $appcache, $home);
                }
        }
 
@@ -140,12 +140,14 @@ class wsHTML5Compiler {
        protected $standalone = false;
        protected $hiddenContents = array();
        protected $appcache;
+       protected $home;
 
-       function __construct($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false) {
+       function __construct($book_id, $version = 'stable', $phonegap = false, $phonegapVersion = 'latest', $dir = null, $standalone = false, $appcache = false, $home = false) {
                global $core;
 
                $this->phonegapVersion = self::getPhonegapVersion($phonegapVersion);
                $this->appcache = $appcache;
+               $this->home = $home;
 
                if ($version == 'stable') {
                        $this->assets = WS_COMPILE_ASSETS . '/_html5prod';
@@ -244,7 +246,7 @@ class wsHTML5Compiler {
                        $versions[] = $file;
                }
                usort($versions, 'version_compare');
-               $versions=array_reverse($versions, true);
+               $versions = array_reverse($versions, true);
                return $versions;
        }
 
@@ -841,6 +843,9 @@ class wsHTML5Compiler {
                $this->config->videoFormats = $this->getVideosFormats(false);
                $this->config->htmlmultimedia = $this->htmlmultimedia;
                $this->config->phonegap = $this->phonegap;
+               if ($this->home) {
+                       $this->config->home = '%apphome%';
+               }
                foreach ($this->additionalConfig as $k => $v) {
                        $this->config->$k = $v;
                }