From 1408a69813c8a2acdb8cab1d51d66e2325729fdd Mon Sep 17 00:00:00 2001 From: Alan Ritari Date: Tue, 10 Feb 2004 19:03:40 +0000 Subject: [PATCH] Optional second parameter can be a boolean value to turn off file icons. --- lib/WebGUI/Macro/File.pm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib/WebGUI/Macro/File.pm b/lib/WebGUI/Macro/File.pm index 4bb545fa0..39992de2e 100644 --- a/lib/WebGUI/Macro/File.pm +++ b/lib/WebGUI/Macro/File.pm @@ -19,10 +19,19 @@ use WebGUI::Session; sub process { my @param = WebGUI::Macro::getParams($_[0]); if (my $collateral = WebGUI::Collateral->find($param[0])) { - return ' ' . - $collateral->get("name") . ''; + + # include default icon unless a second param + if ( ! $param[1] ) { + return ' ' . + $collateral->get("name") . ''; + + # second param was flag, so no accompanying image + } else { + return '' . $collateral->get("name") . ''; + } } else { return undef; }