mirror of https://github.com/BOINC/boinc.git
Previously the only
profiles with verification=1 were those with credit, so UOTD was selected from those. Now there are profiles of users with zero credit that have verification=1. So script that selects UOTD now does a table join to restrict profile searches to those of users with credit only. svn path=/trunk/boinc/; revision=7969
This commit is contained in:
parent
4185f363ed
commit
c0f10ced41
|
@ -11635,11 +11635,17 @@ Bruce 10 Sept 2005
|
|||
If admins have rejected it, user will see a message saying that they
|
||||
must replace their picture or no one but themselves can see it.
|
||||
- The only known side effect of this is that selection of UOTD is now
|
||||
includes users with no credit. I will try to fix this.
|
||||
done slightly differently by the uotd.inc functions. Previously the only
|
||||
profiles with verification=1 were those with credit, so UOTD was
|
||||
selected from those. Now there are profiles of users with zero credit
|
||||
that have verification=1. So script that selects UOTD now does
|
||||
a table join to restrict profile searches to those of users with
|
||||
credit only.
|
||||
|
||||
html/
|
||||
inc/
|
||||
profile.inc
|
||||
uotd.inc
|
||||
ops/
|
||||
profile_screen_form.php
|
||||
|
||||
|
|
|
@ -50,8 +50,7 @@ function build_uotd_page() {
|
|||
exit();
|
||||
}
|
||||
}
|
||||
// TODO: Verify that adding RAND() didn't screw this up.
|
||||
$result = mysql_query("SELECT * FROM profile WHERE verification = 1 AND uotd_time IS NULL ORDER BY RAND()");
|
||||
$result = mysql_query("SELECT * FROM profile,user WHERE profile.userid=user.id AND total_credit>0 AND verification=1 AND uotd_time IS NULL ORDER BY RAND()");
|
||||
|
||||
// If the number of approved profiles dips below a threshold,
|
||||
// email the sys admin every time we pick a new one.
|
||||
|
@ -70,7 +69,7 @@ function build_uotd_page() {
|
|||
// If all verified profiles have been selected as UOTD,
|
||||
// reshow the one that was shown least recently.
|
||||
//
|
||||
$result = mysql_query("SELECT * FROM profile WHERE verification = 1 ORDER BY uotd_time ASC LIMIT 1");
|
||||
$result = mysql_query("SELECT * FROM profile,user WHERE profile.userid=user.id AND total_credit>0 AND verification=1 ORDER BY uotd_time ASC LIMIT 1");
|
||||
}
|
||||
|
||||
if (!$result || mysql_num_rows($result) == 0) {
|
||||
|
|
Loading…
Reference in New Issue