git.cweiske.de
/
stouyapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b81dbf
)
"Best rated" and "Last updated" only for 20+ games categories
author
Christian Weiske
<
[email protected]
>
Wed, 28 Jul 2021 15:45:43 +0000
(17:45 +0200)
committer
Christian Weiske
<
[email protected]
>
Wed, 28 Jul 2021 15:45:43 +0000
(17:45 +0200)
bin/import-game-data.php
patch
|
blob
|
history
diff --git
a/bin/import-game-data.php
b/bin/import-game-data.php
index ee6c1d971b8d835e1f025eb35add345ca3a17140..5ee582e9501c18220fa8913f437691ab6f06ea30 100755
(executable)
--- a/
bin/import-game-data.php
+++ b/
bin/import-game-data.php
@@
-290,15
+290,18
@@
function buildDiscoverCategory($name, $games)
'rows' => [],
'tiles' => [],
];
- addDiscoverRow(
- $data, 'Last Updated',
- filterLastUpdated($games, 10)
- );
- addDiscoverRow(
- $data, 'Best rated',
- filterBestRated($games, 10),
- true
- );
+
+ if (count($games) >= 20) {
+ addDiscoverRow(
+ $data, 'Last Updated',
+ filterLastUpdated($games, 10)
+ );
+ addDiscoverRow(
+ $data, 'Best rated',
+ filterBestRated($games, 10),
+ true
+ );
+ }
$games = sortByTitle($games);
$chunks = array_chunk($games, 4);