]> _ Git - cubeextranet.git/commitdiff
Improve reliability of "nocache" when viewing fluidbook in debug mode
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 23 Aug 2016 15:32:58 +0000 (15:32 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 23 Aug 2016 15:32:58 +0000 (15:32 +0000)
inc/ws/Controlleur/class.ws.url.php
inc/ws/DAO/class.ws.dao.book.php

index 280b317b1b922659da26198e4498a8095864b9fa..5227b36e9486a86396950db5b78f5cda8ca2c551 100644 (file)
@@ -307,7 +307,7 @@ class wsUrl {
                $res .= '<table class="max">';
                $res .= '<tr><td class="min nowrap">' . __('Activity') . '</td><td>' . form::field(array('settings[activity]', 'activity'), 20, 64, $collection->settings['activity']) . '</td></tr>';
                $res .= '<tr><td class="min nowrap">' . __('Build') . '</td><td>' . form::field(array('settings[build]', 'build'), 10, 64, $collection->settings['build']) . '</td></tr>';
-               $res .= '<tr><td class="min nowrap">' . __('Android License Key') . '</td><td>' . form::textArea(array('settings[license_key]', 'license_key'),50,3, $collection->settings['license_key']) . '</td></tr>';
+               $res .= '<tr><td class="min nowrap">' . __('Android License Key') . '</td><td>' . form::textArea(array('settings[license_key]', 'license_key'), 50, 3, $collection->settings['license_key']) . '</td></tr>';
                $res .= '<tr><td class="min nowrap">' . __('Version') . '</td><td>' . form::field(array('settings[version]', 'version'), 10, 64, $collection->settings['version']) . '</td></tr>';
                $res .= '<tr><td class="min nowrap">' . __('Orientation') . '</td><td>' . form::combo(array('settings[orientation]', 'orientation'), array(__('Portrait et Paysage') => 'unspecified', __('Portrait') => 'portrait', __('Paysage') => 'landscape'), $collection->settings['orientation']) . '</td></tr>';
                $res .= '<tr><td class="min nowrap">' . __('Full offline') . '</td><td>' . form::checkbox(array('settings[offline]', 'offline'), 1, $collection->settings['offline']) . '</td></tr>';
@@ -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');
        }
index e4af314f24f2541764068eac27b556d20b58fafb..703b4c31d923732d2daca50b6a4190ab9021f12a 100644 (file)
@@ -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();
        }