[Rt-commit] r10309 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Sun Jan 13 17:51:34 EST 2008
Author: ruz
Date: Sun Jan 13 17:51:34 2008
New Revision: 10309
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Group_Overlay.pm
Log:
r10133 at cubic-pc: cubic | 2008-01-06 02:18:44 +0300
::Group::LoadUserDefinedGroup()
* allow to load by id instead of name only mode
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Group_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Group_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Group_Overlay.pm Sun Jan 13 17:51:34 2008
@@ -204,8 +204,17 @@
my $self = shift;
my $identifier = shift;
- $self->LoadByCols( "Domain" => 'UserDefined',
- "Name" => $identifier );
+ if ( $identifier =~ /^\d+$/ ) {
+ return $self->LoadByCols(
+ Domain => 'UserDefined',
+ id => $identifier,
+ );
+ } else {
+ return $self->LoadByCols(
+ Domain => 'UserDefined',
+ Name => $identifier,
+ );
+ }
}
# }}}
More information about the Rt-commit
mailing list