Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_news
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_news
Commits
8c6ca651
Commit
8c6ca651
authored
2 years ago
by
Michael Kessler
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Fix pagination for new overview action
parent
ec663cf8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!43
[FEATURE] Enable filtering by all filters
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Classes/Controller/OverviewController.php
+3
-3
3 additions, 3 deletions
Classes/Controller/OverviewController.php
with
3 additions
and
3 deletions
Classes/Controller/OverviewController.php
+
3
−
3
View file @
8c6ca651
...
...
@@ -222,7 +222,7 @@ class OverviewController extends AbstractController {
// Get all news by category and tag ids
$news
=
$this
->
newsRepository
->
findAllSortedNewsByCategories
(
$categoryIds
,
$newsLimit
PerTag
,
$offset
,
$sortBy
,
$tagIds
,
$startTime
,
$endTime
,
$sortDirection
$categoryIds
,
$newsLimit
,
$offset
,
$sortBy
,
$tagIds
,
$startTime
,
$endTime
,
$sortDirection
);
// Process news result query into meta data
...
...
@@ -244,8 +244,8 @@ class OverviewController extends AbstractController {
$this
->
highlightBestFitNews
(
$categoryIds
,
$tagIds
);
// Check to achieve less Ajax calls.
$newsCount
=
$this
->
newsRepository
->
newsCountByCategories
(
[]
,
$tagIds
,
$startTime
,
$endTime
);
$numberOfPages
=
(
int
)
(
$newsLimit
PerTag
<=
0
?
0
:
ceil
(
$newsCount
/
$newsLimit
PerTag
));
$newsCount
=
$this
->
newsRepository
->
newsCountByCategories
(
$categoryIds
,
$tagIds
,
$startTime
,
$endTime
);
$numberOfPages
=
(
int
)
(
$newsLimit
<=
0
?
0
:
ceil
(
$newsCount
/
$newsLimit
));
if
(
$numberOfPages
!==
0
&&
$currentPageBrowserPage
>=
$numberOfPages
)
{
/** @var ErrorController $errorController */
$errorController
=
GeneralUtility
::
makeInstance
(
ErrorController
::
class
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment