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
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
87a196dc
Commit
87a196dc
authored
1 year ago
by
Moritz Strohm
Committed by
Jan-Hendrik Willms
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
renamed columns and tables in sql statements for the new calendar, fixes #3715
Closes #3715 Merge request
studip/studip!2625
parent
41b3733f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/classes/Score.class.php
+6
-5
6 additions, 5 deletions
lib/classes/Score.class.php
lib/models/User.class.php
+3
-11
3 additions, 11 deletions
lib/models/User.class.php
with
9 additions
and
16 deletions
lib/classes/Score.class.php
+
6
−
5
View file @
87a196dc
...
...
@@ -35,11 +35,12 @@ class Score
}
// Events
$query
=
"SELECT range_id as user_id, COUNT(*) AS eventcount
FROM calendar_event
INNER JOIN event_data ON (calendar_event.event_id = event_data.event_id AND class = 'PUBLIC')
WHERE range_id IN (?) AND UNIX_TIMESTAMP() <= end
GROUP BY range_id
$query
=
"SELECT `range_id` AS user_id, COUNT(*) AS eventcount
FROM `calendar_date_assignments`
INNER JOIN `calendar_dates`
ON (`calendar_date_assignments`.`calendar_date_id` = `calendar_dates`.`id` AND `access` = 'PUBLIC')
WHERE `range_id` IN (?) AND UNIX_TIMESTAMP() <= `end`
GROUP BY `range_id`
ORDER BY NULL"
;
$statement
=
DBManager
::
get
()
->
prepare
(
$query
);
$statement
->
execute
([
$user_ids
]);
...
...
This diff is collapsed.
Click to expand it.
lib/models/User.class.php
+
3
−
11
View file @
87a196dc
...
...
@@ -1191,23 +1191,15 @@ class User extends AuthUserMd5 implements Range, PrivacyObject, Studip\Calendar\
$statement
->
execute
([
$new_id
,
$old_id
]);
//Kalender
$query
=
"UPDATE IGNORE calendar_
ev
ent SET range_id = ? WHERE range_id = ?"
;
$query
=
"UPDATE IGNORE
`
calendar_
date_assignm
ent
s`
SET
`
range_id
`
= ? WHERE
`
range_id
`
= ?"
;
$statement
=
DBManager
::
get
()
->
prepare
(
$query
);
$statement
->
execute
([
$new_id
,
$old_id
]);
$query
=
"UPDATE IGNORE calendar_
user SET owne
r_id = ? WHERE
owne
r_id = ?"
;
$query
=
"UPDATE IGNORE
`
calendar_
dates` SET `autho
r_id
`
= ? WHERE
`autho
r_id
`
= ?"
;
$statement
=
DBManager
::
get
()
->
prepare
(
$query
);
$statement
->
execute
([
$new_id
,
$old_id
]);
$query
=
"UPDATE IGNORE calendar_user SET user_id = ? WHERE user_id = ?"
;
$statement
=
DBManager
::
get
()
->
prepare
(
$query
);
$statement
->
execute
([
$new_id
,
$old_id
]);
$query
=
"UPDATE IGNORE event_data SET author_id = ? WHERE author_id = ?"
;
$statement
=
DBManager
::
get
()
->
prepare
(
$query
);
$statement
->
execute
([
$new_id
,
$old_id
]);
$query
=
"UPDATE IGNORE event_data SET editor_id = ? WHERE editor_id = ?"
;
$query
=
"UPDATE IGNORE `calendar_dates` SET `editor_id` = ? WHERE `editor_id` = ?"
;
$statement
=
DBManager
::
get
()
->
prepare
(
$query
);
$statement
->
execute
([
$new_id
,
$old_id
]);
...
...
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