]> _ Git - cubeextranet.git/commitdiff
wait #4475 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 20 May 2021 18:29:41 +0000 (18:29 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 20 May 2021 18:29:41 +0000 (18:29 +0000)
inc/ws/Controlleur/class.ws.flash.php

index 48a1fe7ce9bfd6d620762e63ff334fcf9c318754..e0fdf2516753f4f8df08e2bd8ed62ca4dab097ca 100644 (file)
@@ -211,12 +211,13 @@ class wsFlash extends cubeFlashGateway
             $dir = WS_THEMES . '/' . $this->args['theme_id'] . '/';
             $dest = $dir . $fname;
 
-
             if (!file_exists(WS_THEMES . '/' . $this->args['theme_id'])) {
                 mkdir(WS_THEMES . '/' . $this->args['theme_id'], 0755, true);
             }
 
             move_uploaded_file($infos['tmp_name'], $dest);
+            $api = new ws3API();
+            $api->uploadThemeField($this->args['theme_id'], $this->args['fieldname'], $dest);
 
             if (isset($this->args['type']) && $this->args['type'] == 'favicon') {
                 $icotool = new cubeCommandLine('icotool');
@@ -618,6 +619,8 @@ class wsFlash extends cubeFlashGateway
             $maxHeight = max($size[1], $maxHeight);
             break;
         }
+        $maxWidth = round($maxWidth * 20) / 20;
+        $maxHeight = round($maxHeight * 20) / 20;
 
         wsLinks::getLinksAndRulersFromFile($this->args['book_id'], $links, $rulers);