]> _ Git - cubeextranet.git/commitdiff
wait #6091 @0.75
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 29 Jun 2023 16:17:31 +0000 (16:17 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 29 Jun 2023 16:17:31 +0000 (16:17 +0000)
inc/ws/Controlleur/class.ws.maintenance.php
inc/ws/Controlleur/class.ws.url.php
inc/ws/Util/packager/class.ws.packager.php

index 123d110477151db85e0d9e26de2e64ff5eccb792..c8ca06a9e3769ecb0505cdfb81b7a44f8ed15f0d 100644 (file)
@@ -1447,8 +1447,6 @@ class wsMaintenance
 
         shuffle($pages);
 
-        echo wsDocument::isFarmUser() ? 'farm' : 'not farm' . "\n";
-
         foreach ($pages as $page) {
             foreach ($files as $file) {
                 //echo ($force ? '!' : '') . $page . "-" . implode(',' . $file) . "\n";
@@ -1475,7 +1473,7 @@ class wsMaintenance
         }
         $allPages = range(1, $count);
 
-        $coef =4;
+        $coef = 4;
         $it = round($coef * max(4, min(12, ceil($count / 20))));
 
         shuffle($allPages);
@@ -1717,7 +1715,7 @@ class wsMaintenance
 
     public static function matomo()
     {
-        require_once ROOT.'/vendor/autoload.php';
+        require_once ROOT . '/vendor/autoload.php';
         set_time_limit(0);
         $reporting6 = new \Cubist\Matomo\Reporting('https://stats6.fluidbook.com/', '16f4c1d77cdc4792b807718388db96a0');
         for ($i = 2; $i <= 40000; $i++) {
@@ -1761,7 +1759,7 @@ class wsMaintenance
 
         foreach ($files as $file) {
             echo '<h2>' . json_encode($file) . '</h2>';
-            $path = $doc->getFile($page, $file[0], $file[1],85, $file[2], $file[3], $file[4], true);
+            $path = $doc->getFile($page, $file[0], $file[1], 85, $file[2], $file[3], $file[4], true);
             echo '<p>' . $path . '</p>';
             $path = str_replace('/data1/extranet/www/', 'https://workshop.fluidbook.com/', $path);
             $path = str_replace('/home/extranet/www/', 'https://workshop.fluidbook.com/', $path);
index de85a15aea133f0138b07bbb6dce9b0b2d536948..c2e2642f9430d7efcd55d004177ec05f6c13a3a6 100644 (file)
@@ -120,6 +120,8 @@ class wsUrl
         }
 
         foreach ($liste as $id => $book) {
+            $v2 = $book->version == 2;
+
             $odd = cubeMath::isOdd($i) ? ' class="odd"' : '';
             $res .= '<tr' . $odd . '>';
             $res .= '<td>' . $book->book_id . '</td>';
@@ -164,14 +166,20 @@ class wsUrl
                 }
 
                 $res .= '<td class="bouton"><a href="/' . $defaultPlayer . '/' . $book->book_id . '_' . $book->hash . '/" class="openContextMenu voir btbook" data-type="' . implode(',', $types) . '" rel="' . $context_view_id . '" rev="' . $book->book_id . '§' . $book->hash . '§' . TIME . '">' . $btVoir . '</a></td>';
-                $res .= '<td class="bouton"><a class="popupFSBar edit btbook" rel="toolbar=yes" rev="editor_' . $book->book_id . '" href="' . SITE_PATH . 'editor/' . $book->book_id . '_' . $book->hash . '">' . $btEdit . '</a></td>';
+
+                $res .= '<td class="bouton">';
+                if ($v2) {
+                    $res .= '<a class="popupFSBar edit btbook" rel="toolbar=yes" rev="editor_' . $book->book_id . '" href="' . SITE_PATH . 'editor/' . $book->book_id . '_' . $book->hash . '">' . $btEdit . '</a>';
+                }
+                $res .= '</td>';
             } else {
                 $res .= '<td></td><td></td>';
             }
             $res .= '<td class="bouton"><a href="' . SITE_PATH . 'stats/' . $book->book_id . '_' . $book->hash . '" class="normallink stats btbook">' . $btStats . '</a></td>';
             if ($report) {
                 $res .= '<td class="bouton"><a href="/yslReport/' . $book->book_id . '" class="download btbook"><div></div><span>' . __('feedback') . '</span></a></td>';
-            } elseif ($book->version > 1) {
+            } elseif ($v2) {
+
                 if ($droits->admin) {
                     $res .= '<td class="bouton"><a href="#" rel="exportbook/' . $book->book_id . '" class="popup download btbook">' . $btDownload . '</a></td>';
                 } else {
@@ -181,7 +189,7 @@ class wsUrl
             } else {
                 $res .= '<td></td>';
             }
-            if (!$report && ($droits->creation && $book->status < 0)) {
+            if (!$report && ($droits->creation && $book->status < 0) && $v2) {
                 $res .= '<td class="bouton"><a href="#" rel="supprimeBook/' . $book->book_id . '" class="ajax suppr btbook" title="' . __('Êtes-vous certain de vouloir supprimer cette publication ?') . '">' . $btDel . '</a></td>';
             } else {
                 $res .= '<td></td>';
index 7fb6b12f5bd0540a0848988946bd03eba6b84fe3..8f5088bab0671bbd175a4236535fe24efbfabfe2 100644 (file)
@@ -24,7 +24,7 @@ class wsPackager
         global $packager;
 
         cubePHP::neverStop();
-        if ($version === 'html') {
+        if ($version === 'html' || $version === 'online') {
             $packager = new wsPackagerHTML($book_id, null, true, $options);
         } else if ($version === 'scorm') {
             $packager = new wsPackagerSCORM($book_id, null, true, $options);