mirror of https://github.com/BOINC/boinc.git
Drupal: Adjust foundership placeholder countdown by 30 days
The countdown was using the 60 day target instead of the proper 90 day target, so it was possible for other team members to see a negative number if a user had a request open for more than 60 days (DBOINCP-214)
This commit is contained in:
parent
992957dec2
commit
c271e8bd86
|
@ -1041,12 +1041,12 @@ function boincteam_request_foundership_panel($team_id) {
|
|||
$boincteam_id = boincteam_lookup_id($team_id);
|
||||
$boincteam = boincteam_load($boincteam_id);
|
||||
$boincuser_id = $account->boincuser_id;
|
||||
$deadline = boincteam_foundership_transfer_ok_time($boincteam);
|
||||
$days_to_deadline = ceil(($deadline - time()) / (24*60*60));
|
||||
$output = '';
|
||||
$output .= '<h2 class="pane-title">' . bts('Request foundership') . '</h2>';
|
||||
|
||||
if (boincteam_user_requested_foundership($team_id)) {
|
||||
$deadline = boincteam_foundership_transfer_ok_time($boincteam);
|
||||
$days_to_deadline = ceil(($deadline - time()) / (24*60*60));
|
||||
$request_age = 60 - $days_to_deadline;
|
||||
$days_to_respond = 30 + $days_to_deadline;
|
||||
if (time() > $deadline) {
|
||||
|
@ -1094,7 +1094,12 @@ function boincteam_request_foundership_panel($team_id) {
|
|||
}
|
||||
}
|
||||
elseif (!boincteam_new_foundership_transfer_request_ok($team_id)) {
|
||||
// Requests are not allowed right now
|
||||
// If this user does not have a transfer request pending, but new requests
|
||||
// are not allowed, set the deadline to 90 days instead of 60 (as the user
|
||||
// who made the request has 30 additional days to assume foundership if
|
||||
// there is no response to the request)
|
||||
$deadline = boincteam_foundership_transfer_ok_time($boincteam);
|
||||
$days_to_deadline = ceil(($deadline - time()) / (24*60*60)) + 30;
|
||||
$output .= '<p>';
|
||||
$output .= bts('A team foundership change was already requested recently.'
|
||||
. ' Only one request is allowed within a period of 90 days.'
|
||||
|
|
Loading…
Reference in New Issue