Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Jan-Hendrik Willms
Stud.IP
Commits
8dd6ffbe
Commit
8dd6ffbe
authored
2 years ago
by
Jan-Hendrik Willms
Browse files
Options
Downloads
Patches
Plain Diff
adjust queries to avoid 'Numeric value out of range' error, fixes #894
Closes #894
parent
e9c5a61a
No related branches found
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
lib/classes/FilesSearch/FilesIndexManager.php
+1
-1
1 addition, 1 deletion
lib/classes/FilesSearch/FilesIndexManager.php
lib/classes/Score.class.php
+1
-1
1 addition, 1 deletion
lib/classes/Score.class.php
with
2 additions
and
2 deletions
lib/classes/FilesSearch/FilesIndexManager.php
+
1
−
1
View file @
8dd6ffbe
...
...
@@ -197,7 +197,7 @@ class FilesIndexManager
private
static
function
relevance
(
$base
,
$modifier
)
{
// 31556926 is the number of seconds in one year
return
"POW(
$base
, ((UNIX_TIMESTAMP() -
$modifier
) / 31556926)) AS relevance"
;
return
"POW(
$base
, ((UNIX_TIMESTAMP() -
CAST(
$modifier
AS SIGNED)
) / 31556926)) AS relevance"
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
lib/classes/Score.class.php
+
1
−
1
View file @
8dd6ffbe
...
...
@@ -25,7 +25,7 @@ class Score
$query
=
"SELECT nr.range_id as user_id, COUNT(*) AS newscount
FROM news_range AS nr
INNER JOIN news AS n ON (nr.news_id = n.news_id)
WHERE nr.range_id IN (?) AND
(
UNIX_TIMESTAMP()
-
n.date
) <=
n.expire
WHERE nr.range_id IN (?) AND UNIX_TIMESTAMP()
<=
n.date
+
n.expire
GROUP BY nr.range_id
ORDER BY NULL"
;
$statement
=
DBManager
::
get
()
->
prepare
(
$query
);
...
...
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