diff options
Diffstat (limited to 'include/report')
-rw-r--r-- | include/report | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/report b/include/report index a2c23ef9..03de8a28 100644 --- a/include/report +++ b/include/report @@ -138,12 +138,21 @@ echo " ${YELLOW}Suggestions${NORMAL} (${TOTAL_SUGGESTIONS}):" echo " ${WHITE}----------------------------${NORMAL}" for SUGGESTION in ${SSUGGESTIONS}; do + SOLUTION="" SHOWSUGGESTION=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: //' | sed 's/\[details:\(.*\)\] \[solution:\(.*\)\]//' | sed 's/test://'` ADDLINK=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[test://' | sed 's/\]\(.*\)]//'` DETAILS=`echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[details://' | sed 's/\]\(.*\)]//'` + SUGGESTION_PIECES=$(echo ${SUGGESTION} | sed 's/\[/ [/g') + for PIECE in ${SUGGESTION_PIECES}; do + if [ -z "${SOLUTION}" ]; then + SEARCH=$(echo ${PIECE} | grep "^\[solution:") + if [ $? -eq 0 ]; then SOLUTION=$(echo ${SEARCH} | sed 's/!space!/ /g' | sed 's/solution://' | sed 's/text://' | tr -d '[]'); fi + fi + done IS_CUSTOM=`echo ${ADDLINK} | grep "^CUST"` echo " ${YELLOW}*${NORMAL} ${SHOWSUGGESTION}" - if [ ! "${DETAILS}" = "-" ]; then echo " - Details: ${CYAN}${DETAILS}${NORMAL}"; fi + if [ ! "${DETAILS}" = "-" ]; then echo " - Details : ${CYAN}${DETAILS}${NORMAL}"; fi + if [ ${SHOW_REPORT_SOLUTION} -eq 1 -a ! "${SOLUTION}" = "-" ]; then echo " - Solution : ${SOLUTION}"; fi if [ "${IS_CUSTOM}" = "" ]; then echo " ${GRAY}${CONTROL_URL_PROTOCOL}://${CONTROL_URL_PREPEND}${ADDLINK}${CONTROL_URL_APPEND}${NORMAL}" else |