Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Curriculum-Request
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
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
Tim Steiner
Curriculum-Request
Commits
b537c64a
Commit
b537c64a
authored
15 years ago
by
Tim Steiner
Browse files
Options
Downloads
Patches
Plain Diff
When counting requests that need approval for/by a user, pre-votes are no longer counted.
parent
e90d2774
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
library/App/RequestNotification.php
+14
-0
14 additions, 0 deletions
library/App/RequestNotification.php
with
14 additions
and
0 deletions
library/App/RequestNotification.php
+
14
−
0
View file @
b537c64a
...
...
@@ -43,7 +43,21 @@ class App_RequestNotification
$myVotes
=
Requests_ApproverVoteModel
::
findUsersVotesForRequests
(
$user
,
$myRequests
);
$myRequestCount
=
count
(
$myRequests
);
$myVotedRequests
=
array
();
if
(
count
(
$myRequests
)
>
0
)
{
$myRequestStacks
=
Requests_StackModel
::
findForRequests
(
$myRequests
);
}
foreach
(
$myVotes
as
$myVote
)
{
if
(
$myVote
->
getApprovalAction
()
!=
$myRequestStacks
[
$myVote
->
getRequest
()]
->
getAction
())
{
continue
;
}
// THIS IS A HACK TO EXCLUDE PRE-VOTES FROM PREVIOUSLY TABLED VOTES OF THE SAME ACTION.
// IF ANY [VOTING PERIOD/TIME BETWEEN VOTING PERIODS] IS EVER [LONGER/SHORTER] THAN 14 DAYS IT WILL NO LONGER WORK!
if
(
$myVote
->
getTime
()
->
getTimestamp
()
<
time
()
-
60
*
60
*
24
*
14
)
{
continue
;
}
$myVotedRequests
[]
=
$myVote
->
getRequest
();
}
...
...
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