From 25bebbddfc0d99e8bc7f7d1d2c41dc0646984d59 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 3 Sep 2007 09:50:16 +0000 Subject: (get_medium_type) introduce it in order to get medium type (needed for #25043) --- Rpmdrake/edit_urpm_sources.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'Rpmdrake/edit_urpm_sources.pm') diff --git a/Rpmdrake/edit_urpm_sources.pm b/Rpmdrake/edit_urpm_sources.pm index 97fd0cdb..801284c3 100755 --- a/Rpmdrake/edit_urpm_sources.pm +++ b/Rpmdrake/edit_urpm_sources.pm @@ -52,6 +52,23 @@ my %col = ( }, ); + +sub get_medium_type { + my ($medium) = @_; + my %medium_type = ( + ftp => N("FTP"), + file => N("Local"), + http => N("HTTP"), + https => N("HTTPS"), + nfs => N("NFS"), + removable => N("Removable"), + rsync => N("rsync"), + ssh => N("NFS"), + ); + return $medium_type{$1} if $medium->{url} =~ m!^([^:]*)://!; + return N("Local"); +} + sub selrow { my ($o_list_tv) = @_; defined $o_list_tv or $o_list_tv = $list_tv; -- cgit v1.2.1