Allow listed and searched Wikidata entries to be without descriptions
This commit is contained in:
parent
c56ae6ce66
commit
af13f747b7
@ -1558,10 +1558,9 @@ final class NodaWikidataFetcher {
|
||||
|
||||
foreach ($wikidata_data['search'] as $result) {
|
||||
|
||||
if (empty($result['description'])
|
||||
or empty($result['label'])
|
||||
or (isset($result['description']) and $result['description'] == 'Wikipedia disambiguation page')
|
||||
or (isset($result['description']) and $result['description'] == 'Wikimedia disambiguation page')
|
||||
if (empty($result['label'])
|
||||
or (!empty($result['description']) and $result['description'] == 'Wikipedia disambiguation page')
|
||||
or (!empty($result['description']) and $result['description'] == 'Wikimedia disambiguation page')
|
||||
) continue;
|
||||
|
||||
$cur = [
|
||||
@ -1610,7 +1609,7 @@ final class NodaWikidataFetcher {
|
||||
|
||||
foreach ($wikidata_data as $result) {
|
||||
|
||||
if ((isset($result['description']) and $result['description'] == '') or (isset($result['label']) and $result['label'] == '') or !isset($result['label']) or (isset($result['description']) and $result['description'] == 'Wikipedia disambiguation page') or (isset($result['description']) and $result['description'] == 'Wikimedia disambiguation page')) continue;
|
||||
if ((isset($result['label']) and $result['label'] == '') or !isset($result['label']) or (isset($result['description']) and $result['description'] == 'Wikipedia disambiguation page') or (isset($result['description']) and $result['description'] == 'Wikimedia disambiguation page')) continue;
|
||||
|
||||
$output .= '<div><a href="' . $link . 'suchbegriff=' . $searchTerm . '&wikidata_id=' . $result['id'] . '&lang=' . $lang . '">
|
||||
<h4 class="icons iconsTag">' . $result['id'] . '</h4>';
|
||||
|
Loading…
Reference in New Issue
Block a user