Check more fields for the language
This commit is contained in:
@@ -1212,8 +1212,6 @@ class Item
|
||||
// Check for hashtags in the body and repair or add hashtag links
|
||||
$item['body'] = self::setHashtags($item['body']);
|
||||
|
||||
$item['language'] = self::getLanguage($item);
|
||||
|
||||
$notify_type = Delivery::POST;
|
||||
|
||||
// Filling item related side tables
|
||||
@@ -1262,6 +1260,8 @@ class Item
|
||||
}
|
||||
}
|
||||
|
||||
$item['language'] = self::getLanguage($item);
|
||||
|
||||
$inserted = Post::insert($item['uri-id'], $item);
|
||||
|
||||
if ($item['gravity'] == self::GRAVITY_PARENT) {
|
||||
@@ -1991,7 +1991,7 @@ class Item
|
||||
return '';
|
||||
}
|
||||
|
||||
$languages = self::getLanguageArray(trim($item['title'] . "\n" . $item['body']), 3, $item['uri-id'], $item['author-id']);
|
||||
$languages = self::getLanguageArray($item['title'] . ' ' . ($item['content-warning'] ?? '') . ' ' . $item['body'], 3, $item['uri-id'], $item['author-id']);
|
||||
if (empty($languages)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user