]> _ Git - cubeextranet.git/commitdiff
wip #1111 @2
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 15 Feb 2017 15:24:30 +0000 (15:24 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Wed, 15 Feb 2017 15:24:30 +0000 (15:24 +0000)
fluidbook/tools/fwstk.sh
inc/commons/class.common.url.php
inc/ws/Controlleur/class.ws.ajax.php
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/DAO/class.ws.dao.book.php
inc/ws/Metier/class.ws.document.php

index f168f3ab3edd1c1df4896bedaab2099d501a0459..30d3c16c6942e49dc8d967920df4177e9269f1aa 100644 (file)
@@ -1,2 +1,2 @@
 #!/bin/sh
-java -jar fwstk.jar $*
\ No newline at end of file
+/usr/lib/jvm/java-8-openjdk-amd64/bin/java -jar /home/extranet/www/fluidbook/tools/fwstk/out/artifacts/fwstk_jar/fwstk.jar $*
\ No newline at end of file
index 8d009afc811a80dfec99297c22fcfded66997331..8affa7c0f329d4162fb7bbfe6fed2c739698850e 100644 (file)
@@ -8,7 +8,7 @@ class commonUrl {
                // Si l'utilisateur n'est pas connecté, on affiche le formulaire\r
                // de login\r
 \r
-               $bypass = array('stats', 'telecharger', 'telechargerr');\r
+               $bypass = array('stats', 'telecharger', 'telechargerr', 'orpiref');\r
 \r
                if ((!isset($args[0]) || !in_array($args[0], $bypass)) && (is_null($core->user) || !$core->user)) {\r
                        $args = array('login');\r
@@ -585,7 +585,7 @@ class commonUrl {
                print_r($_FILES);\r
 \r
 \r
-               foreach ($_FILES['files']['name'] as $k=>$ffname) {\r
+               foreach ($_FILES['files']['name'] as $k => $ffname) {\r
                        if ($_FILES['files']['error'][$k]) {\r
                                continue;\r
                        }\r
index 70bd7e6805a537eb457d7e072272f4749f8c1817..2018b41f4c1d03534a49c1d45de1d9cb8523b053 100644 (file)
@@ -578,7 +578,7 @@ class wsAjax extends cubeAjax {
        }
 
        public static function valideDemandeDevis(&$x) {
-               $d64 = base64_decode($_GET['devis_form']);
+               $d64 = base64_decode(str_replace(' ', '+', $_GET['devis_form']));
 
                $d = json_decode($d64);
                if (!$d) {
@@ -589,7 +589,6 @@ class wsAjax extends cubeAjax {
                        return false;
                }
 
-
                $d = cubeArray::array_flatten($d);
                foreach ($d as $k => $v) {
                        $_POST[$k] = trim($v);
@@ -1114,6 +1113,7 @@ class wsAjax extends cubeAjax {
 
        public static function collectionVersionCreate($args, &$x) {
                global $core;
+
                $id = $args[1];
 
                $compiler = new wsHTML5AppCompiler($id);
index 4ef6204ca332aefddd481009b832e0b122f6e8da..90b94df42c0e03045e1f7ca2899a68641bd6525e 100644 (file)
@@ -997,17 +997,18 @@ class wsMaintenance {
                foreach ($docs as $doc) {
                        $out = WS_DOCS . '/' . $doc . '/';
 
-                       $fwstk = new cubeCommandLine('fwstk');
+                       $fwstk = new cubeCommandLine('fwstk.sh');
                        $fwstk->setPath(CONVERTER_PATH);
                        $fwstk->setArg('--input ' . $out . '/crop.pdf');
                        $fwstk->setArg('--extractTexts ' . $out . '%s%d.txt');
                        if ($book->parametres->ignoreSearchSeparators != '') {
                                $fwstk->setArg('--ignoreSeparators ' . $book->parametres->ignoreSearchSeparators);
                        }
-                       $fwstk->setArg('--threads 1');
+                       $fwstk->setArg('--threads 4');
                        $fwstk->execute();
-                       fb($fwstk->commande);
-                       fb($fwstk->output);
+
+                       $res = $fwstk->commande . "\n\n";
+                       $res .= $fwstk->output;
                }
 
                $dir = WS_BOOKS . '/index/' . $book->book_id;
@@ -1029,6 +1030,8 @@ class wsMaintenance {
 
                $i = WS_BOOKS . '/index/' . $book_id . '/*';
                `rm -rf $i`;
+               ob_end_clean();
+               die('<pre>' . $res . '</pre>');
        }
 
        public static function _reencodeVideos($book_id, $format) {
index e7d72cc04723787bc5cdd22abf60ef47faffa649..87d1c186b6ef9b046eccb23f73c505002404bab5 100644 (file)
@@ -876,7 +876,7 @@ class wsDAOBook extends commonDAO {
                        foreach ($docs as $doc) {
                                $out = wsDocument::getDir($doc);
 
-                               $fwstk = new cubeCommandLine('fwstk');
+                               $fwstk = new cubeCommandLine('fwstk.sh');
                                $fwstk->setPath(CONVERTER_PATH);
                                $fwstk->setArg('--input ' . $out . '/crop.pdf');
                                $fwstk->setArg('--extractTexts ' . $out . '%s%d.txt');
index 2a764c5fc36980a0a5f7a8c963e9ac7d1627a77b..d9735aa5fadb9cf992cc8e618a215722ff29ba0b 100644 (file)
@@ -101,7 +101,7 @@ class wsDocument extends cubeMetier {
                        $in = $this->in;
                }
 
-               $fwstk = new cubeCommandLine('fwstk');
+               $fwstk = new cubeCommandLine('fwstk.sh');
                $fwstk->setPath(CONVERTER_PATH);
                $fwstk->setArg('--input ' . $in);
                $fwstk->setArg('--infos');
@@ -302,7 +302,7 @@ class wsDocument extends cubeMetier {
        }
 
        public function cutDocument($mode) {
-               $fwstk = new cubeCommandLine('fwstk');
+               $fwstk = new cubeCommandLine('fwstk.sh');
                $fwstk->setPath(CONVERTER_PATH);
                $fwstk->setArg('--input ' . $this->in);
                $fwstk->setArg('--cut ' . $mode);
@@ -312,7 +312,7 @@ class wsDocument extends cubeMetier {
        }
 
        public function trimDocument() {
-               $fwstk = new cubeCommandLine('fwstk');
+               $fwstk = new cubeCommandLine('fwstk.sh');
                $fwstk->setPath(CONVERTER_PATH);
                $fwstk->setArg('--input ' . $this->in);
                $fwstk->setArg('--trim');
@@ -353,7 +353,7 @@ class wsDocument extends cubeMetier {
        }
 
        public function getLinksAndTexts() {
-               $fwstk = new cubeCommandLine('fwstk');
+               $fwstk = new cubeCommandLine('fwstk.sh');
                $fwstk->setPath(CONVERTER_PATH);
                $fwstk->setArg('--input ' . $this->cropped);
                $fwstk->setArg('--extractTexts ' . $this->out . '%s%d.txt');