From 791df09271253ca6a746bbdb8407864eccc86b35 Mon Sep 17 00:00:00 2001 From: Daouda Lo Date: Tue, 7 Jan 2003 10:34:11 +0000 Subject: - compress code (pixel) - use ask_warn when no browser is found on the system and BROWSER env var not set. --- perl-install/standalone.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm index addeb5f2d..aacabdc72 100644 --- a/perl-install/standalone.pm +++ b/perl-install/standalone.pm @@ -145,11 +145,8 @@ Copyright (C) 1999-2002 MandrakeSoft by } sub on_request_help { - my ($link) = shift; - my $browser; - if (!($browser = $ENV{BROWSER})) { - foreach (qw(mozilla konqueror galeon)) { -x "/usr/bin/$_" or next; $browser = $_; last }; - } + my ($o, $link) = @_; + my $browser = $ENV{BROWSER} || MDK::Common::Func::find { -x "/usr/bin/$_" } qw(mozilla konqueror galeon) or $o->ask_warn('',N("No browser is installed on your system, Please install one if you want to browse the help system")); standalone::explanations("Connection to help system at $link"); system("$browser $link &"); } -- cgit v1.2.1