瀏覽代碼

Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

Laurent Destailleur 2 年之前
父節點
當前提交
675eacbbce
共有 2 個文件被更改,包括 5 次插入6 次删除
  1. 2 2
      htdocs/comm/action/class/actioncomm.class.php
  2. 3 4
      htdocs/core/tpl/filemanager.tpl.php

+ 2 - 2
htdocs/comm/action/class/actioncomm.class.php

@@ -2196,12 +2196,12 @@ class ActionComm extends CommonObject
 						$obj   = $this->db->fetch_object($resql);
 						$event = array();
 
-						if ($obj->halfday == -1) {
+						if ($obj->halfday == 1) {
 							$event['fulldayevent'] = false;
 
 							$timestampStart = dol_stringtotime($obj->date_start." 00:00:00", 0);
 							$timestampEnd   = dol_stringtotime($obj->date_end." 12:00:00", 0);
-						} elseif ($obj->halfday == 1) {
+						} elseif ($obj->halfday == -1) {
 							$event['fulldayevent'] = false;
 
 							$timestampStart = dol_stringtotime($obj->date_start." 12:00:00", 0);

+ 3 - 4
htdocs/core/tpl/filemanager.tpl.php

@@ -238,10 +238,9 @@ if ($action == 'convertimgwebp' && $permtoadd) {
 	foreach ($filelist as $filename) {
 		$filepath = $filename['fullname'];
 		if (!(substr_compare($filepath, 'webp', -strlen('webp')) === 0)) {
-			if (image_format_supported($filepath) == 1) {
-				$filepathnoext = preg_replace("/\.[a-z0-9]+$/i", "", $filepath);
-
-				if (! dol_is_file($filepathnoext.'.webp')) {	// If file does not exists yet
+			if (!empty($file) || !dol_is_file($filepathnoext.'.webp')) { // If file does not exists yet
+				if (image_format_supported($filepath) == 1) {
+					$filepathnoext = preg_replace("/\.[a-z0-9]+$/i", "", $filepath);
 					$result = dol_imageResizeOrCrop($filepath, 0, 0, 0, 0, 0, $filepathnoext.'.webp', 90);
 					if (!dol_is_file($result)) {
 						$error++;