Added scratch filter to groups.
This commit is contained in:
parent
13e1a253dd
commit
4f3859724b
7 changed files with 90 additions and 28 deletions
|
|
@ -46,6 +46,7 @@ This package provides an object-oriented way of managing WebGUI groups and group
|
|||
$string = $g->ipFilter("10.;192.168.1.");
|
||||
$epoch = $g->lastUpdated;
|
||||
$string = $g->name("Nerds");
|
||||
$string = $g->scratchFilter("www_location=International;somesetting=1");
|
||||
|
||||
$g->addGroups(\@arr);
|
||||
$g->deleteGroups(\@arr);
|
||||
|
|
@ -457,6 +458,34 @@ sub new {
|
|||
bless {_groupId => $groupId, _group => \%group }, $class;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 scratchFilter ( [ value ] )
|
||||
|
||||
Returns the name of this group.
|
||||
|
||||
=over
|
||||
|
||||
=item value
|
||||
|
||||
If specified, the name is set to this value.
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
sub scratchFilter {
|
||||
my ($class, $value);
|
||||
$class = shift;
|
||||
$value = shift;
|
||||
if (defined $value) {
|
||||
$class->{_group}{"scratchFilter"} = $value;
|
||||
WebGUI::SQL->write("update groups set scratchFilter=".quote($value).",
|
||||
lastUpdated=".time()." where groupId=$class->{_groupId}");
|
||||
}
|
||||
return $class->{_group}{"scratchFilter"};
|
||||
}
|
||||
|
||||
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue