mirror of
https://github.com/openvk/openvk
synced 2024-11-11 01:19:53 +03:00
Revert Clubs::getPopularClubs change
This functionality is so unstable it causes majority of installations to fail miserably out of the box. The performance also is a major concern. Might re-add later. Sometime. btw i amended
This commit is contained in:
parent
e28964c813
commit
384c0da78b
2 changed files with 5 additions and 1 deletions
|
@ -45,6 +45,9 @@ class Clubs
|
|||
|
||||
function getPopularClubs(): \Traversable
|
||||
{
|
||||
// TODO rewrite
|
||||
|
||||
/*
|
||||
$query = "SELECT ROW_NUMBER() OVER (ORDER BY `subscriptions` DESC) as `place`, `target` as `id`, COUNT(`follower`) as `subscriptions` FROM `subscriptions` WHERE `model` = \"openvk\\\Web\\\Models\\\Entities\\\Club\" GROUP BY `target` ORDER BY `subscriptions` DESC, `id` LIMIT 30;";
|
||||
$entries = DatabaseConnection::i()->getConnection()->query($query);
|
||||
|
||||
|
@ -54,6 +57,7 @@ class Clubs
|
|||
"club" => $this->get($entry["id"]),
|
||||
"subscriptions" => $entry["subscriptions"],
|
||||
];
|
||||
*/
|
||||
}
|
||||
|
||||
use \Nette\SmartObject;
|
||||
|
|
|
@ -64,7 +64,7 @@ final class AboutPresenter extends OpenVKPresenter
|
|||
$this->template->usersStats = (new Users)->getStatistics();
|
||||
$this->template->clubsCount = (new Clubs)->getCount();
|
||||
$this->template->postsCount = (new Posts)->getCount();
|
||||
$this->template->popularClubs = iterator_to_array((new Clubs)->getPopularClubs());
|
||||
$this->template->popularClubs = [];
|
||||
$this->template->admins = iterator_to_array((new Users)->getInstanceAdmins());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue