language field renamed to "language"
This commit is contained in:
@@ -1376,7 +1376,7 @@ class PostUpdate
|
||||
return true;
|
||||
}
|
||||
|
||||
$engagements = DBA::select('post-engagement', ['uri-id'], ["`iso-639-1` IS NULL"], ['order' => ['uri-id' => true], 'limit' => 1000]);
|
||||
$engagements = DBA::select('post-engagement', ['uri-id'], ["`language` IS NULL"], ['order' => ['uri-id' => true], 'limit' => 1000]);
|
||||
while ($engagement = DBA::fetch($engagements)) {
|
||||
$item = Post::selectFirst([], ['uri-id' => $engagement['uri-id']]);
|
||||
if (empty($item)) {
|
||||
|
||||
@@ -104,7 +104,7 @@ class Engagement
|
||||
'owner-id' => $parent['owner-id'],
|
||||
'contact-type' => $parent['contact-contact-type'],
|
||||
'media-type' => $mediatype,
|
||||
'iso-639-1' => $language,
|
||||
'language' => $language,
|
||||
'searchtext' => $searchtext,
|
||||
'size' => self::getContentSize($parent),
|
||||
'created' => $parent['created'],
|
||||
|
||||
@@ -53,7 +53,7 @@ class SearchIndex
|
||||
'uri-id' => $uri_id,
|
||||
'owner-id' => $item['owner-id'],
|
||||
'media-type' => Engagement::getMediaType($uri_id),
|
||||
'iso-639-1' => !empty($item['language']) ? (array_key_first(json_decode($item['language'], true)) ?? L10n::UNDETERMINED_LANGUAGE) : L10n::UNDETERMINED_LANGUAGE,
|
||||
'language' => !empty($item['language']) ? (array_key_first(json_decode($item['language'], true)) ?? L10n::UNDETERMINED_LANGUAGE) : L10n::UNDETERMINED_LANGUAGE,
|
||||
'searchtext' => Post\Engagement::getSearchTextForUriId($uri_id, $refresh),
|
||||
'size' => Engagement::getContentSize($item),
|
||||
'created' => $item['created'],
|
||||
|
||||
@@ -324,7 +324,7 @@ class Timeline extends BaseModule
|
||||
} elseif ($this->selectedTab == ChannelEntity::AUDIO) {
|
||||
$condition = ["`media-type` & ?", 4];
|
||||
} elseif ($this->selectedTab == ChannelEntity::LANGUAGE) {
|
||||
$condition = ["`iso-639-1` = ?", User::getLanguageCode($uid)];
|
||||
$condition = ["`language` = ?", User::getLanguageCode($uid)];
|
||||
} elseif (is_numeric($this->selectedTab)) {
|
||||
$condition = $this->getUserChannelConditions($this->selectedTab, $uid);
|
||||
}
|
||||
@@ -450,7 +450,7 @@ class Timeline extends BaseModule
|
||||
$conditions = [];
|
||||
$languages = $languages ?: User::getWantedLanguages($uid);
|
||||
foreach ($languages as $language) {
|
||||
$conditions[] = "`iso-639-1` = ?";
|
||||
$conditions[] = "`language` = ?";
|
||||
$condition[] = $language;
|
||||
}
|
||||
if (!empty($conditions)) {
|
||||
|
||||
Reference in New Issue
Block a user