]> _ Git - cubeextranet.git/commitdiff
wait #4452 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 5 May 2021 17:01:48 +0000 (17:01 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 5 May 2021 17:01:48 +0000 (17:01 +0000)
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/Metier/class.ws.book.parametres.php
inc/ws/Metier/class.ws.document.php
inc/ws/Util/packager/class.ws.packager.html.php
inc/ws/Util/packager/class.ws.packager.phonegap.php
inc/ws/Util/packager/class.ws.packager.php

index 4450d3ba6152666c3cf760610f5842090f3b4f38..f0c2f65e1e509fdcfb199b470f31a74c46a38323 100644 (file)
@@ -1109,7 +1109,7 @@ class wsMaintenance
     public static function installWescoVentes()
     {
         $exporter = new wsExporter();
-        $exporter->export(18479, $x, 'install_ftp', 'online', "wescogrolj-catalogca:b9uA7U72eW@ftp.cluster023.hosting.ovh.net", '');
+        $exporter->export(19670, $x, 'install_ftp', 'online', "wescogrolj-catalogca:b9uA7U72eW@ftp.cluster023.hosting.ovh.net", '');
         header('Location: https://agefard:TB6x9gg9@wesco-group.com/download/Catalogues/Wesco_Rapport_ventes_0-12-ans/');
         exit;
     }
@@ -1490,7 +1490,7 @@ class wsMaintenance
         $eans = array_unique($eans);
         sort($eans);
 
-        $working = WS_BOOKS . '/working/' . $book . '/commerce/opt/';
+        $working =wsBook::getAssetDirOfBook($book,'/commerce/opt/');
         $res = [['EAN', 'front', 'angle', '360']];
         foreach ($eans as $ean) {
             $res[] = [$ean . " ", file_exists($working . '/' . $ean . '-front.jpg') ? 'Y' : 'N', file_exists($working . '/' . $ean . '-angle.jpg') ? 'Y' : 'N', file_exists($working . '/' . $ean . '-360.mp4') ? 'Y' : 'N'];
index 2c52bae6704ea24541567b6272840143bbbef9fe..5e8fcb62cf32c5e3ad968bcccfbfbdf0be39caae 100644 (file)
@@ -219,6 +219,12 @@ class wsBookParametres extends wsParametres
             'fieldsnames' => ['assetsDir', 'linksAssets']
         ];
         /** * */
+        $this->fields['stats'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Activer les statistiques Fluidbook'), 'grade' => 3);
+        $this->fields['googleAnalytics'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Code Google Analytics'), 'size' => 10);
+        $this->forms['basicStats']=[
+            'label'=>__('Statistiques'),
+            'fieldsnames'=>['stats','googleAnalytics'],
+        ];
 
         $this->fields['email_title'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __("Titre de l'email") . ' "' . __('Envoyer à un ami') . '"', 'hint' => __('Laisser vide pour utiliser la valeur par défaut'));
         $this->fields['email_body'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __("Corps de l'email") . ' "' . __('Envoyer à un ami') . '"', 'hint' => __('Laisser vide pour utiliser la valeur par défaut'));
@@ -433,11 +439,10 @@ class wsBookParametres extends wsParametres
         $this->forms['zoom'] = array('label' => __('Zoom'),
             'fieldsnames' => array('zoomWheel', '|', 'zoom', 'zoomw'));
         // .
-        $this->fields['stats'] = array('type' => 'boolean', 'default' => false, 'editable' => true, 'label' => __('Activer les statistiques Fluidbook'), 'grade' => 3);
+
         $this->fields['stats_score'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Afficher les scores dans les rapports'), 'grade' => 5);
         $this->fields['stats_exclude_ip'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Exclure les IP suivantes des statistiques'), 'grade' => 3, 'hint' => sprintf(__('Indiquer une adresse ip de la forme %s par ligne'), 'www.xxx.yyy.zzz'));
         $this->fields['relay_url_params'] = ['type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Relayer les paramètres d\'url dans les liens sortants'), 'grade' => 3];
-        $this->fields['googleAnalytics'] = array('type' => 'text', 'default' => '', 'editable' => true, 'label' => __('Code Google Analytics'), 'size' => 10);
         $this->fields['gtag_additional_code'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code additionnel Google Tag Manager'));
         $this->fields['googleAnalyticsCustom'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code Stats personnalisé (placé avant fermeture de head)'));
         $this->fields['statsCustom'] = array('type' => 'textarea', 'default' => '', 'editable' => true, 'label' => __('Code Stats personnalisé (placé avant fermeture du body)'));
@@ -447,8 +452,8 @@ class wsBookParametres extends wsParametres
         $this->fields['tagcommander_prod'] = ['type' => 'boolean', 'default' => true, 'editable' => true, 'label' => 'Production', 'grade' => 3];
         $this->fields['tagcommander_plan'] = ['type' => 'freefile', 'default' => '', 'editable' => true, 'label' => 'Plan de taggage "Tag commander"', 'grade' => 3];
         $this->fields['tagcommander_default_vars'] = ['type' => 'textarea', 'default' => '', 'editable' => true, 'label' => 'Variables par défaut', 'grade' => 3];
-        $this->forms['stats'] = array('label' => __('Statistiques'),
-            'fieldsnames' => array('stats', 'stats_score', 'stats_exclude_ip', '|', 'relay_url_params', '|', 'googleAnalytics', 'gtag_additional_code', '|', 'googleAnalyticsCustom', 'statsCustom', '|', 'xiti', 'xiti_page', '|', 'tagcommander_id', 'tagcommander_prod', 'tagcommander_plan', 'tagcommander_default_vars'));
+        $this->forms['stats'] = array('label' => __('Statistiques avancées'),
+            'fieldsnames' => array( 'stats_score', 'stats_exclude_ip', '|', 'relay_url_params', '|', 'gtag_additional_code', '|', 'googleAnalyticsCustom', 'statsCustom', '|', 'xiti', 'xiti_page', '|', 'tagcommander_id', 'tagcommander_prod', 'tagcommander_plan', 'tagcommander_default_vars'));
 
         $this->fields['displayChaptersPopup'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __('Always display chapters in a popup'), 'grade' => 1);
         $this->fields['displayChaptersIcon'] = array('type' => 'boolean', 'default' => true, 'editable' => true, 'label' => __("Affiche l'icône du sommaire"), 'grade' => 1);
index 0839cdbb1c94e5e3931f41aaa840dfe2f844d913..ae37c2071d988bdf7a500c453a7ec2fc5e6fbef9 100644 (file)
@@ -597,8 +597,9 @@ class wsDocument extends cubeMetier
     public function makeTextSVGFile($page, $out, $force = false)
     {
         $in = $this->makeSVGFile($page);
-        wsPDFConvert::makeTextSVGFile($in, $out);
-        wsTools::optimizeSVG($out, $out);
+        $inter = str_replace('to', 'tp', $out);
+        wsPDFConvert::makeTextSVGFile($in, $inter);
+        wsTools::optimizeSVG($inter, $out);
     }
 
     public function makeOptimizedSVGFile($page, $resolution, $out)
index 6a77db49c643cb9d2aa68e6c61236b06dffd3371..078985409d14bca99628737ffb99527a1181785c 100644 (file)
@@ -8,6 +8,7 @@ class wsPackagerHTML extends wsPackager
     protected $_allowNeworking = 'all';
     protected $_ext = 'html';
     protected $_disableScorm = true;
+    protected $_compileOnConstruct = false;
 
     public function __construct($book_id, $vdir = null, $whole = true)
     {
@@ -15,16 +16,6 @@ class wsPackagerHTML extends wsPackager
         $this->version = 'html';
     }
 
-    protected function getMinFlashVersion()
-    {
-        return '10.0.22';
-    }
-
-    protected function getSWFFiles()
-    {
-        return array('index.swf', 'player.swf');
-    }
-
     protected function preparePackage()
     {
         parent::preparePackage();
@@ -40,10 +31,10 @@ class wsPackagerHTML extends wsPackager
         $this->copyFluidbookFiles();
         $this->mergeJavascript();
 
-        $others = array('fluidbook.js', 'getflash.gif', 'index.html', 'style.css');
-        $others = array_merge($others, $this->getSWFFiles());
-
-        $this->copyOtherFiles($others);
+//        $others = array('fluidbook.js', 'getflash.gif', 'index.html', 'style.css');
+//        $others = array_merge($others, $this->getSWFFiles());
+//
+//        $this->copyOtherFiles($others);
 
         if (!file_exists($this->vdir . '/pages')) {
             mkdir($this->vdir . '/pages/', 0777, true);
@@ -130,19 +121,11 @@ class wsPackagerHTML extends wsPackager
             'statsfooter' => $statsfooter,
             'facebook' => $facebook,
             'bgcolor' => $this->theme->parametres->loadingBackColor,
-            'redirectMobile' => $redirectMobile,
-            'redirectPDF' => $redirectPDF,
             'junk' => TIME,
             'robots' => $robots,
             'favicon' => $favicon,
-            'flashversion' => $this->getMinFlashVersion(),
-            'fv' => json_encode($this->getFlashvars()),
             'alwaysHTML5' => $alwaysHTML5,
             'keywords' => $keywords,
-            'allowNetworking' => $this->_allowNeworking,
-            'redirectIfFlashNotInstalled' => in_array($html5priority, array('true', 'notinstalled')) ? 'true' : 'false',
-            'redirectIfFlashBlocked' => $html5priority == 'true' ? 'true' : 'false',
-            'flash_blocked_wait' => $this->book->parametres->flashBlockedWait,
         );
 
         $this->origHTML = $this->book->parametres->htmlPrepend . file_get_contents($this->vdir . '/index.html');
@@ -292,7 +275,7 @@ class wsPackagerHTML extends wsPackager
         //                     $filesToDelete[] = 'data/background/*/p*.jpg';
         //                     $filesToDelete[] = 'data/contents/p*.svg';
         //             }
-        $htmlFiles = array('index', 'widget');
+        $htmlFiles = array('index');
 
         foreach ($htmlFiles as $name) {
             $html = $book->parametres->htmlPrepend . file_get_contents($dest . '/' . $name . '.html');
index c23ee9c511f1f168017eb8283ef16bb55d761d07..599ddbfc66b92bf93cba5b372a9e71316e907085 100644 (file)
@@ -311,5 +311,3 @@ function imagecreatefromfile($file) {
        $function = "imagecreatefrom" . $format;
        return $function($file);
 }
-
-?>
index 10b8d02fe2852b413b9404815fbc93ed760a185f..4d4e884645722b87448383f1ec15505be1f87ef7 100644 (file)
@@ -16,6 +16,7 @@ class wsPackager
     protected $workingDir;
     protected $whole = true;
     protected $_clean = true;
+    protected $_compileOnConstruct=true;
     public $cleanOnDestruct = true;
 
     public static function package($book_id, $version, $zip = true, $cleanOnDestruct = true)
@@ -73,7 +74,9 @@ class wsPackager
 
         $this->workingDir = $this->book->getAssetDir();
 
-        $this->compile();
+        if($this->_compileOnConstruct) {
+            $this->compile();
+        }
     }
 
     protected function compile()