mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Count users in "Trusted User & Developer" group as TU
This reflects the changes in 3610f3c
.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
6d5c936540
commit
92e827330c
2 changed files with 3 additions and 3 deletions
|
@ -605,7 +605,7 @@ function open_user_proposals($user) {
|
|||
function add_tu_proposal($agenda, $user, $votelength, $quorum, $submitteruid) {
|
||||
$dbh = DB::connect();
|
||||
|
||||
$q = "SELECT COUNT(*) FROM Users WHERE AccountTypeID = 2";
|
||||
$q = "SELECT COUNT(*) FROM Users WHERE (AccountTypeID = 2 OR AccountTypeID = 4)";
|
||||
$result = $dbh->query($q);
|
||||
$row = $result->fetch(PDO::FETCH_NUM);
|
||||
$active_tus = $row[0];
|
||||
|
@ -1021,7 +1021,7 @@ function last_votes_list() {
|
|||
$q = "SELECT UserID, MAX(VoteID) AS LastVote FROM TU_Votes, ";
|
||||
$q .= "TU_VoteInfo, Users WHERE TU_VoteInfo.ID = TU_Votes.VoteID AND ";
|
||||
$q .= "TU_VoteInfo.End < UNIX_TIMESTAMP() AND ";
|
||||
$q .= "Users.ID = TU_Votes.UserID AND Users.AccountTypeID = 2 ";
|
||||
$q .= "Users.ID = TU_Votes.UserID AND (Users.AccountTypeID = 2 OR Users.AccountTypeID = 4) ";
|
||||
$q .= "GROUP BY UserID ORDER BY LastVote DESC, UserName ASC";
|
||||
$result = $dbh->query($q);
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ function general_stats_table() {
|
|||
$q = "SELECT count(*) FROM Users";
|
||||
$user_count = db_cache_value($q, 'user_count');
|
||||
|
||||
$q = "SELECT count(*) FROM Users,AccountTypes WHERE Users.AccountTypeID = AccountTypes.ID AND AccountTypes.AccountType = 'Trusted User'";
|
||||
$q = "SELECT count(*) FROM Users,AccountTypes WHERE Users.AccountTypeID = AccountTypes.ID AND (AccountTypes.AccountType = 'Trusted User' OR AccountTypes.AccountType = 'Trusted User & Developer')";
|
||||
$tu_count = db_cache_value($q, 'tu_count');
|
||||
|
||||
$targstamp = intval(strtotime("-7 days"));
|
||||
|
|
Loading…
Add table
Reference in a new issue