From 5dedf5e5009ba545c1702b6fbfe7aa06af8b1560 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 8 Jan 2024 06:23:28 +0000 Subject: [PATCH] Execute the language detection all the time --- src/Model/Item.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index aa2d9aa7e5..f9ccc473fe 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -2069,12 +2069,12 @@ class Item $transmitted[$language] = 0; } - $content = trim(($item['title'] ?? '') . ' ' . ($item['content-warning'] ?? '') . ' ' . ($item['body'] ?? '')); - - if (!in_array($item['gravity'], [self::GRAVITY_PARENT, self::GRAVITY_COMMENT]) || empty($content)) { + if (!in_array($item['gravity'], [self::GRAVITY_PARENT, self::GRAVITY_COMMENT])) { return !empty($transmitted) ? json_encode($transmitted) : null; } + $content = trim(($item['title'] ?? '') . ' ' . ($item['content-warning'] ?? '') . ' ' . ($item['body'] ?? '')); + $languages = self::getLanguageArray($content, 3, $item['uri-id'], $item['author-id'], $transmitted); if (!empty($transmitted)) {