Translation Teams body<= << Back to progress page. prepare("SELECT lnid, lncode, lnname, lastupdate FROM ml_langs"); $sth->execute; my %lang; $lang{$_->{'lnid'}} = $_ while $_ = $sth->fetchrow_hashref; # get each lang's community $sth = $dbr->prepare("SELECT l.lnid, t.text ". "FROM ml_latest l, ml_items i, ml_text t ". "WHERE l.dmid=1 AND t.dmid=1 AND i.dmid=1 AND i.itcode='thislang.community' ". "AND l.itid=i.itid AND t.txtid=l.txtid AND t.lnid=l.lnid"); $sth->execute; while ($_ = $sth->fetchrow_hashref) { next unless exists $lang{$_->{'lnid'}}; $lang{$_->{'lnid'}}->{'community'} = $_->{'text'}; } # get people with privs $sth = $dbr->prepare("SELECT pm.arg, u.user FROM useridmap u, priv_list pl, priv_map pm ". "WHERE pm.userid=u.userid AND pm.prlid=pl.prlid AND pl.privcode='translate'"); $sth->execute; my %team; while (my ($arg, $user) = $sth->fetchrow_array) { push @{$team{$arg}}, $user; } $ret .= "
Language | Community | Users with privs |
---|---|---|
$l->{'lnname'} | "; $ret .= ""; $ret .= "{'community'} ljcomm?>" if $l->{'community'}; $ret .= " | "; if ($team{$l->{'lncode'}}) { $ret .= join(", ", map { LJ::ljuser($_) } sort @{$team{$l->{'lncode'}}}); } $ret .= " |