mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
draft pagination
This commit is contained in:
parent
3aa7e5ff3c
commit
ab217b240a
1 changed files with 5 additions and 0 deletions
|
|
@ -48,6 +48,8 @@ class SearchController extends AbstractController
|
||||||
|
|
||||||
case 'torrent':
|
case 'torrent':
|
||||||
|
|
||||||
|
$total = 0; // @TODO pagination
|
||||||
|
|
||||||
$torrents = [];
|
$torrents = [];
|
||||||
foreach ($torrentService->searchTorrents($request->query->get('query')) as $torrent)
|
foreach ($torrentService->searchTorrents($request->query->get('query')) as $torrent)
|
||||||
{
|
{
|
||||||
|
|
@ -60,6 +62,7 @@ class SearchController extends AbstractController
|
||||||
$user->getLocales()
|
$user->getLocales()
|
||||||
)
|
)
|
||||||
)) {
|
)) {
|
||||||
|
$total--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -69,6 +72,7 @@ class SearchController extends AbstractController
|
||||||
{
|
{
|
||||||
if ($user->isSensitive() && $lastTorrentSensitive->isValue())
|
if ($user->isSensitive() && $lastTorrentSensitive->isValue())
|
||||||
{
|
{
|
||||||
|
$total--;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -76,6 +80,7 @@ class SearchController extends AbstractController
|
||||||
// Read file
|
// Read file
|
||||||
if (!$file = $torrentService->readTorrentFileByTorrentId($torrent->getId()))
|
if (!$file = $torrentService->readTorrentFileByTorrentId($torrent->getId()))
|
||||||
{
|
{
|
||||||
|
$total--;
|
||||||
continue; // @TODO exception
|
continue; // @TODO exception
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue