web/modules/rhn/RHN/Utils.pm | 30 ------------------------------ 1 file changed, 30 deletions(-)
New commits: commit 3bfb8cdf62733e428110fd6c6aa5aa6e9a8c0784 Author: Jan Pazdziora jpazdziora@redhat.com Date: Mon Feb 7 10:46:55 2011 +0100
The RHN::Utils::parametrize is not used anywhere, removing.
diff --git a/web/modules/rhn/RHN/Utils.pm b/web/modules/rhn/RHN/Utils.pm index cacd501..6e8d6a6 100644 --- a/web/modules/rhn/RHN/Utils.pm +++ b/web/modules/rhn/RHN/Utils.pm @@ -27,36 +27,6 @@ use Socket;
# similar to PXT::Utils, but for RHN specific stuff...
-#takes an ref to an array of arrayrefs, and a list of parameters - -#traverses the array, and assigns elements of each array to named -#parameters in a hashref... - example - - -# my @channels = ( [1, 'Red Hat Linux 7.0'], [2, 'Red Hat Linux 7.1'], [3, 'Red Hat Linux 7.3'] ); -# my @p_channels = parameterize(@channels, 'id', 'name'); - -# foreach my $chan (@p_channels) { -# $html =~ s/{channel_name}/$chan->{name}/ge; -# $html =~ s/{channel_id}/$chan->{id}/ge; -# } - -sub parameterize { - my $class = shift; - my $data = shift; - my @params = @_; - - my @return; - - foreach my $datum (@{$data}) { - - my $x = { }; - @{$x}{@params} = @{$datum}[0 .. $#params]; #slice. allows $x->{name}, etc - - push @return, $x; - } - - return @return; -} - sub sets_differ { my ($first, $second) = @_;
spacewalk-commits@lists.fedorahosted.org