From efd52abc62ca63a0f763e0e39a7bd845c23b8797 Mon Sep 17 00:00:00 2001 From: Lukas Macura Date: Fri, 22 Apr 2016 08:38:36 +0200 Subject: [PATCH] Repaired show plugin --- lib/plugin.lib.sh | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/lib/plugin.lib.sh b/lib/plugin.lib.sh index 90ad655..3554cfd 100644 --- a/lib/plugin.lib.sh +++ b/lib/plugin.lib.sh @@ -197,23 +197,29 @@ zaf_list_plugin_items() { p=$(zaf_ctrl_get_item_option $cfile $i "Parameters") testparms=$(zaf_ctrl_get_item_option $cfile $i "Testparameters") precache=$(zaf_ctrl_get_item_option $cfile $i "Precache") - if [ -n "$p" ]; then - if [ -n "$testparms" ] && [ "$2" = "test" ]; then - for tp in $testparms; do + case $2 in + test) + for tp in $testparms; do + if [ -n "$p" ]; then echo -n "$1.$i[$tp] " - done - else - if [ -n "$precache" ] && [ "$2" = "precache" ]; then - for tp in $precache; do - echo -n "$1.$i[$tp] " - done + else + echo -n "$1.$i " fi - [ "$2" != "test" ] && key="$1.$i[]" + done + ;; + precache) + for tp in $precache; do + echo -n "$1.$i[$tp] " + done + ;; + *) + if [ -n "$p" ]; then + echo -n "$1.$i[] " + else + echo -n "$1.$i " fi - else - key="$1.$i" - fi - [ "$2" != "precache" ] && echo -n "$key " + ;; + esac done echo }