From 01a4de9d90ce8d33fd4e0a2bc8ca3c0a78225441 Mon Sep 17 00:00:00 2001 From: Andreas Brachold Date: Sun, 6 Jan 2008 09:53:15 +0000 Subject: * RECORDS: optimize scan directory * Ajax: Add support version 2.0 * Skins: drop widget url * tools: Fix multiline messages --- lib/Tools.pm | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'lib/Tools.pm') diff --git a/lib/Tools.pm b/lib/Tools.pm index 6e2072d..a212216 100644 --- a/lib/Tools.pm +++ b/lib/Tools.pm @@ -177,16 +177,17 @@ sub con_err { my $console = shift; my $msg = shift; + if(ref $console) { + $console->{call} = 'message'; #reset default widget, avoid own widget + $console->err($msg); + } + if(ref $msg eq 'ARRAY') { - $msg = join('\n', @$msg); + $msg = join("\n", @$msg); } &_msg(501,$msg, 2); - if(ref $console) { - $console->{call} = 'message'; #reset default widget, avoid own widget - $console->err($msg); - } return undef; } @@ -197,17 +198,17 @@ sub con_msg { my $console = shift; my $msg = shift; - if(ref $msg eq 'ARRAY') { - $msg = join('\n', @$msg); - } - - &_msg(250,$msg, 4); - if(ref $console) { $console->{call} = 'message'; #reset default widget, avoid own widget $console->msg($msg); } + if(ref $msg eq 'ARRAY') { + $msg = join("\n", @$msg); + } + + &_msg(250,$msg, 4); + return undef; } -- cgit v1.2.3