mirror of
https://github.com/friendica/friendica-directory
synced 2024-11-13 07:43:42 +01:00
Use only language part of locale for popular languages
- Fixes https://github.com/friendica/friendica-directory/issues/13
This commit is contained in:
parent
b29aafc2d9
commit
01d476f542
|
@ -24,7 +24,7 @@ class PopularLanguages
|
|||
|
||||
public function render(): string
|
||||
{
|
||||
$stmt = 'SELECT `language`, COUNT(*) AS `total` FROM `profile` WHERE `language` IS NOT NULL GROUP BY `language` ORDER BY COUNT(`language`) DESC LIMIT 10';
|
||||
$stmt = 'SELECT LEFT(`language`, 2) AS `language`, COUNT(*) AS `total` FROM `profile` WHERE `language` IS NOT NULL GROUP BY LEFT(`language`, 2) ORDER BY COUNT(*) DESC LIMIT 10';
|
||||
$languages = $this->connection->fetchAll($stmt);
|
||||
|
||||
$vars = [
|
||||
|
|
Loading…
Reference in a new issue