From b0aa5e4b173926867d532d86944997198d408330 Mon Sep 17 00:00:00 2001 From: Leinad4Mind Date: Sun, 24 Aug 2025 01:32:02 +0100 Subject: [PATCH] Fix Webp --- core/acp/config_module.php | 2 +- core/file/file.php | 6 +++--- core/language/es/gallery_acp.php | 2 +- core/language/ru/gallery.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/acp/config_module.php b/core/acp/config_module.php index e54477c0..3a2b8d5b 100644 --- a/core/acp/config_module.php +++ b/core/acp/config_module.php @@ -376,7 +376,7 @@ public function get_display_vars($mode) 'allow_gif' => array('lang' => 'GIF_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), 'allow_jpg' => array('lang' => 'JPG_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), 'allow_png' => array('lang' => 'PNG_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), - 'allow_webp' => array('lang' => 'WEBP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), + 'allow_webp' => array('lang' => 'WEBP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), 'allow_zip' => array('lang' => 'ZIP_ALLOWED', 'validate' => 'bool', 'type' => 'radio:yes_no'), 'description_length' => array('lang' => 'IMAGE_DESC_MAX_LENGTH', 'validate' => 'int', 'type' => 'text:7:5', 'append' => 'CHARACTERS'), 'disp_nextprev_thumbnail' => array('lang' => 'DISP_NEXTPREV_THUMB','validate' => 'bool', 'type' => 'radio:yes_no'), diff --git a/core/file/file.php b/core/file/file.php index 2ee0c71d..7999e46a 100644 --- a/core/file/file.php +++ b/core/file/file.php @@ -127,7 +127,7 @@ static public function mimetype_by_filename($filename) case '.jpg': return 'image/jpeg'; break; - case '.webp': + case 'webp': return 'image/webp'; break; } @@ -149,7 +149,7 @@ static public function extension_by_filename($filename) case '.jpg': return 'jpg'; break; - case '.webp': + case 'webp': return 'webp'; break; } @@ -177,7 +177,7 @@ public function read_image($force_filesize = false) imagealphablending($this->image, true); // Set alpha blending on ... imagesavealpha($this->image, true); // ... and save alpha blending! break; - case '.webp': + case 'webp': $this->image_type = 'webp'; $this->image = imagecreatefromwebp($this->image_source); break; diff --git a/core/language/es/gallery_acp.php b/core/language/es/gallery_acp.php index 137a81fa..fa6d5cd1 100644 --- a/core/language/es/gallery_acp.php +++ b/core/language/es/gallery_acp.php @@ -284,7 +284,7 @@ 'RECENT_ON_INDEX_COUNT' => 'Conteo de imágenes recientes', 'PHPBB_INTEGRATION' => 'Integración de phpBB', 'PNG_ALLOWED' => 'Permitido subir archivos PNG', - 'WEBP_ALLOWED' => 'Allowed to upload WEBP files', + 'WEBP_ALLOWED' => 'Permitido subir archivos WEBP', 'PURGED_CACHE' => 'Purgó la caché', 'RATE_SCALE' => 'Escala de calificación', diff --git a/core/language/ru/gallery.php b/core/language/ru/gallery.php index d07c74b6..7d55d309 100644 --- a/core/language/ru/gallery.php +++ b/core/language/ru/gallery.php @@ -124,7 +124,7 @@ 'FILETYPES_GIF' => 'gif', 'FILETYPES_JPG' => 'jpg', 'FILETYPES_PNG' => 'png', - 'FILETYPES_WEBP' => 'webp', + 'FILETYPES_WEBP' => 'webp', 'FILETYPES_ZIP' => 'zip', 'FULL_EDITOR_GALLERY' => 'Редактировать',