From: vincent@cubedesigners.com Date: Thu, 29 Jun 2023 16:17:31 +0000 (+0000) Subject: wait #6091 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9126e22bc8f4d83f9415782cde01cdfa9b76a0f8;p=cubeextranet.git wait #6091 @0.75 --- diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index 123d11047..c8ca06a9e 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -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 '

' . json_encode($file) . '

'; - $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 '

' . $path . '

'; $path = str_replace('/data1/extranet/www/', 'https://workshop.fluidbook.com/', $path); $path = str_replace('/home/extranet/www/', 'https://workshop.fluidbook.com/', $path); diff --git a/inc/ws/Controlleur/class.ws.url.php b/inc/ws/Controlleur/class.ws.url.php index de85a15ae..c2e2642f9 100644 --- a/inc/ws/Controlleur/class.ws.url.php +++ b/inc/ws/Controlleur/class.ws.url.php @@ -120,6 +120,8 @@ class wsUrl } foreach ($liste as $id => $book) { + $v2 = $book->version == 2; + $odd = cubeMath::isOdd($i) ? ' class="odd"' : ''; $res .= ''; $res .= '' . $book->book_id . ''; @@ -164,14 +166,20 @@ class wsUrl } $res .= '' . $btVoir . ''; - $res .= '' . $btEdit . ''; + + $res .= ''; + if ($v2) { + $res .= '' . $btEdit . ''; + } + $res .= ''; } else { $res .= ''; } $res .= '' . $btStats . ''; if ($report) { $res .= '
' . __('feedback') . '
'; - } elseif ($book->version > 1) { + } elseif ($v2) { + if ($droits->admin) { $res .= '' . $btDownload . ''; } else { @@ -181,7 +189,7 @@ class wsUrl } else { $res .= ''; } - if (!$report && ($droits->creation && $book->status < 0)) { + if (!$report && ($droits->creation && $book->status < 0) && $v2) { $res .= '' . $btDel . ''; } else { $res .= ''; diff --git a/inc/ws/Util/packager/class.ws.packager.php b/inc/ws/Util/packager/class.ws.packager.php index 7fb6b12f5..8f5088bab 100644 --- a/inc/ws/Util/packager/class.ws.packager.php +++ b/inc/ws/Util/packager/class.ws.packager.php @@ -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);