Bug 286235: Implicit joins should be replaced by explicit joins - installment A
Patch By Tomas Kopal <Tomas.Kopal@altap.cz> r=joel, a=myk git-svn-id: svn://10.0.0.236/trunk@171610 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -177,8 +177,9 @@ sub DoEmail {
|
||||
###########################################################################
|
||||
if (Param("supportwatchers")) {
|
||||
my $watched_ref = $dbh->selectcol_arrayref(
|
||||
"SELECT profiles.login_name FROM watch, profiles"
|
||||
. " WHERE watcher = ? AND watch.watched = profiles.userid",
|
||||
"SELECT profiles.login_name FROM watch INNER JOIN profiles" .
|
||||
" ON watch.watched = profiles.userid" .
|
||||
" WHERE watcher = ?",
|
||||
undef, $userid);
|
||||
$vars->{'watchedusers'} = join(',', @$watched_ref);
|
||||
|
||||
@@ -307,9 +308,10 @@ sub SaveEmail {
|
||||
sub DoPermissions {
|
||||
my (@has_bits, @set_bits);
|
||||
|
||||
SendSQL("SELECT DISTINCT name, description FROM groups, user_group_map " .
|
||||
"WHERE user_group_map.group_id = groups.id " .
|
||||
"AND user_id = $::userid " .
|
||||
SendSQL("SELECT DISTINCT name, description FROM groups " .
|
||||
"INNER JOIN user_group_map " .
|
||||
"ON user_group_map.group_id = groups.id " .
|
||||
"WHERE user_id = $::userid " .
|
||||
"AND isbless = 0 " .
|
||||
"ORDER BY name");
|
||||
while (MoreSQLData()) {
|
||||
|
||||
Reference in New Issue
Block a user