Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quassel-rest-search
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janne Mareike Koschinski
quassel-rest-search
Commits
78f72e29
Commit
78f72e29
authored
7 years ago
by
Janne Mareike Koschinski
Browse files
Options
Downloads
Patches
Plain Diff
Fixed ordering issue
parent
ea132292
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
database/Database.php
+1
-1
1 addition, 1 deletion
database/Database.php
database/backends/PostgresSmartBackend.php
+3
-2
3 additions, 2 deletions
database/backends/PostgresSmartBackend.php
with
4 additions
and
3 deletions
database/Database.php
+
1
−
1
View file @
78f72e29
...
...
@@ -249,7 +249,7 @@ class Database
public
function
after
(
int
$anchor
,
int
$buffer
,
int
$limit
):
array
{
$truncatedLimit
=
max
(
min
(
$limit
+
1
,
50
),
1
);
$truncatedLimit
=
max
(
min
(
$limit
,
50
),
0
);
$stmt
=
$this
->
backend
->
loadAfter
();
...
...
This diff is collapsed.
Click to expand it.
database/backends/PostgresSmartBackend.php
+
3
−
2
View file @
78f72e29
...
...
@@ -218,7 +218,7 @@ class PostgresSmartBackend implements Backend
public
function
loadBefore
():
\PDOStatement
{
return
$this
->
db
->
prepare
(
"
SELECT backlog.messageid,
SELECT
* FROM (SELECT
backlog.messageid,
backlog.bufferid,
buffer.buffername,
sender.sender,
...
...
@@ -234,7 +234,8 @@ class PostgresSmartBackend implements Backend
AND backlog.bufferid = :bufferid
AND backlog.messageid < :anchor
ORDER BY backlog.messageid DESC
LIMIT :limit;
LIMIT :limit) t
ORDER BY messageid ASC;
"
);
}
}
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