From b6d076b9ec2c5002a84275093004247988a001da Mon Sep 17 00:00:00 2001 From: "ian%hixie.ch" Date: Mon, 6 May 2002 04:36:42 +0000 Subject: [PATCH] Fixing the spelling of getRightsForGroups() where it is declared and used. Also fixing one of the SQL statements to use rights.rightID not rights.ID. --- webtools/PLIF/PLIF/DataSource/User.pm | 2 +- webtools/PLIF/PLIF/DataSource/User/MySQL.pm | 4 ++-- webtools/PLIF/PLIF/Service/User.pm | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/webtools/PLIF/PLIF/DataSource/User.pm b/webtools/PLIF/PLIF/DataSource/User.pm index fd42799f641..d8f39d01abe 100644 --- a/webtools/PLIF/PLIF/DataSource/User.pm +++ b/webtools/PLIF/PLIF/DataSource/User.pm @@ -283,7 +283,7 @@ sub setGroup { $self->notImplemented(); } -sub getRightForGroups { +sub getRightsForGroups { my $self = shift; my($app, @groups) = @_; $self->notImplemented(); diff --git a/webtools/PLIF/PLIF/DataSource/User/MySQL.pm b/webtools/PLIF/PLIF/DataSource/User/MySQL.pm index a92c198014d..115b34f43f0 100644 --- a/webtools/PLIF/PLIF/DataSource/User/MySQL.pm +++ b/webtools/PLIF/PLIF/DataSource/User/MySQL.pm @@ -304,10 +304,10 @@ sub setGroup { return $groupID; } -sub getRightForGroups { +sub getRightsForGroups { my $self = shift; my($app, @groups) = @_; - my $rights = $self->database($app)->execute('SELECT rights.name FROM rights, groupRightsMapping WHERE groupRightsMapping.rightID = rights.ID AND groupRightsMapping.groupID IN(' . + my $rights = $self->database($app)->execute('SELECT rights.name FROM rights, groupRightsMapping WHERE groupRightsMapping.rightID = rights.rightID AND groupRightsMapping.groupID IN(' . ('?, ' x (@groups-1)) . '?'.')', @groups)->rows; foreach my $right (@$rights) { $right = $right->[0]; diff --git a/webtools/PLIF/PLIF/Service/User.pm b/webtools/PLIF/PLIF/Service/User.pm index eddf8f46873..2c8a0be625f 100644 --- a/webtools/PLIF/PLIF/Service/User.pm +++ b/webtools/PLIF/PLIF/Service/User.pm @@ -350,7 +350,7 @@ sub insertField { sub invalidateRights { my $self = shift; - my $rights = $self->app->getService('dataSource.user')->getRightsForGroup($self->app, keys(%{$self->{'groupsByID'}})); + my $rights = $self->app->getService('dataSource.user')->getRightsForGroups($self->app, keys(%{$self->{'groupsByID'}})); $self->rights({ map {$_ => 1} @$rights }); # map a list of strings into a hash for easy access # don't set a dirty flag, because rights are merely a convenient # cached expansion of the rights data. Changing this externally