From: vincent@cubedesigners.com Date: Tue, 23 Aug 2016 15:32:58 +0000 (+0000) Subject: Improve reliability of "nocache" when viewing fluidbook in debug mode X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d4c95682a02480bd0ce55dbb97d9a9ba20a46458;p=cubeextranet.git Improve reliability of "nocache" when viewing fluidbook in debug mode --- diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index 280b317b1..5227b36e9 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -307,7 +307,7 @@ class wsUrl { $res .= ''; $res .= ''; $res .= ''; - $res .= ''; + $res .= ''; $res .= ''; $res .= ''; $res .= ''; @@ -1087,7 +1087,6 @@ html{height:100%}' . "\n"; $dao = new wsDAOBook($core->con); $e = explode('_', $args[0]); - $dao->compile($e[0], 'html5'); if (count($e) == 2 || $e[2] <= TIME - 15) { $e[2] = TIME; @@ -1096,6 +1095,7 @@ html{height:100%}' . "\n"; } $book_id = $e[0]; + $dao->compile($e[0], 'html5', false, true, true); $hash = $e[1]; self::commonHTML5Viewer($book_id, $hash, 'u'); } diff --git a/inc/ws/DAO/class.ws.dao.book.php b/inc/ws/DAO/class.ws.dao.book.php index e4af314f2..703b4c31d 100644 --- a/inc/ws/DAO/class.ws.dao.book.php +++ b/inc/ws/DAO/class.ws.dao.book.php @@ -981,7 +981,7 @@ class wsDAOBook extends commonDAO { } } - public function compile($book_id, $version = 'all', $complete = false, $force = false) { + public function compile($book_id, $version = 'all', $complete = false, $force = false, $dev = false) { if (is_null($book_id) || !$book_id) { return; } @@ -1008,7 +1008,7 @@ class wsDAOBook extends commonDAO { $html5 = $html5 && !$this->isUpToDate($book, 'html5'); } else { $v1 = false; - $html5 = false; + $html5 = true; $v2 = true; } @@ -1026,7 +1026,7 @@ class wsDAOBook extends commonDAO { } if ($html5) { fb(time(), 'Compile HTML5'); - $res .= $this->compileHTML5($book_id, $book); + $res .= $this->compileHTML5($book_id, $book, $dev); $this->touchCompile($book_id, 'html5'); } if ($v1 || $v2) { @@ -1542,8 +1542,13 @@ class wsDAOBook extends commonDAO { } } - public function compileHTML5($book_id, $book) { - $htmlCompiler = wsHTML5Compiler::factory($book_id, $book->parametres->mobileLVersion); + public function compileHTML5($book_id, $book, $dev = false) { + $version = $book->parametres->mobileLVersion; + if ($dev) { + $version = 'dev'; + } + + $htmlCompiler = wsHTML5Compiler::factory($book_id, $version); $htmlCompiler->compile(); }
' . __('Activity') . '' . form::field(array('settings[activity]', 'activity'), 20, 64, $collection->settings['activity']) . '
' . __('Build') . '' . form::field(array('settings[build]', 'build'), 10, 64, $collection->settings['build']) . '
' . __('Android License Key') . '' . form::textArea(array('settings[license_key]', 'license_key'),50,3, $collection->settings['license_key']) . '
' . __('Android License Key') . '' . form::textArea(array('settings[license_key]', 'license_key'), 50, 3, $collection->settings['license_key']) . '
' . __('Version') . '' . form::field(array('settings[version]', 'version'), 10, 64, $collection->settings['version']) . '
' . __('Orientation') . '' . form::combo(array('settings[orientation]', 'orientation'), array(__('Portrait et Paysage') => 'unspecified', __('Portrait') => 'portrait', __('Paysage') => 'landscape'), $collection->settings['orientation']) . '
' . __('Full offline') . '' . form::checkbox(array('settings[offline]', 'offline'), 1, $collection->settings['offline']) . '