mirror of https://github.com/BOINC/boinc.git
Web: add TEAM_CREATE_NEED_CREDIT option to suppress team spam
This commit is contained in:
parent
3e156ab9a2
commit
dce6254411
|
@ -80,14 +80,13 @@
|
|||
// delete users with ID N to M inclusive
|
||||
//
|
||||
// --teams
|
||||
// delete teams (and their owners) where the team
|
||||
// - has 0 or 1 members
|
||||
// delete teams (and their owners and members) where the team
|
||||
// - has no total credit
|
||||
// - has description containing a link, or a URL
|
||||
// - is not a BOINC-Wide team
|
||||
// and the owner
|
||||
// - has no posts
|
||||
// - has no hosts
|
||||
// and the owner and members
|
||||
// - have no posts
|
||||
// - have no hosts
|
||||
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', true);
|
||||
|
|
|
@ -31,6 +31,12 @@ check_get_args(array());
|
|||
|
||||
$user = get_logged_in_user();
|
||||
|
||||
if (@constant('TEAM_CREATE_NEED_CREDIT')) {
|
||||
if ($user->total_credit == 0) {
|
||||
error_page("You must complete a task to create a team");
|
||||
}
|
||||
}
|
||||
|
||||
if ($recaptcha_private_key) {
|
||||
if (!boinc_recaptcha_isValidated($recaptcha_private_key)) {
|
||||
error_page(
|
||||
|
|
|
@ -27,6 +27,12 @@ check_get_args(array());
|
|||
|
||||
$user = get_logged_in_user();
|
||||
|
||||
if (@constant('TEAM_CREATE_NEED_CREDIT')) {
|
||||
if ($user->total_credit == 0) {
|
||||
error_page("You must complete a task to create a team");
|
||||
}
|
||||
}
|
||||
|
||||
page_head(
|
||||
tra("Create a team"), null, null, null, boinc_recaptcha_get_head_extra()
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue