# HG changeset patch # User Christophe Lincoln # Date 1487796182 -3600 # Node ID b49ba342d1574d2f17df38e7b42fab8eb9142caa # Parent 6d13228babae1bdcf7d22f79562eddc445e622d4 Fix mybugs plugin if no created bug diff -r 6d13228babae -r b49ba342d157 web/plugins/mybugs/user.sh --- a/web/plugins/mybugs/user.sh Wed Feb 22 21:35:46 2017 +0100 +++ b/web/plugins/mybugs/user.sh Wed Feb 22 21:43:02 2017 +0100 @@ -6,12 +6,11 @@ # [ -f "$plugins/mybugs/bugdir.conf" ] && . $plugins/mybugs/bugdir.conf [ "$(GET user)" ] && user="$(GET user)" -list="$(fgrep -l $user ${bugdir}/*/*/bug.conf | xargs ls -lt | awk '{print $9}')" -if [ "$list" ]; then +if fgrep -q -l "$user" ${bugdir}/*/*/bug.conf; then echo "

My bugs

" echo "
"
-	for bug in ${list}
+	for bug in $(fgrep -l $user ${bugdir}/*/*/bug.conf | xargs ls -lt | awk '{print $9}')
 	do
 		. ${bug}
 		id=$(basename $(dirname $bug))