tazbug rev 143

Fix mybugs plugin if no created bug
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 22 21:43:02 2017 +0100 (2017-02-22)
parents 6d13228babae
children d98dc7dce8d4
files web/plugins/mybugs/user.sh
line diff
     1.1 --- a/web/plugins/mybugs/user.sh	Wed Feb 22 21:35:46 2017 +0100
     1.2 +++ b/web/plugins/mybugs/user.sh	Wed Feb 22 21:43:02 2017 +0100
     1.3 @@ -6,12 +6,11 @@
     1.4  #
     1.5  [ -f "$plugins/mybugs/bugdir.conf" ] && . $plugins/mybugs/bugdir.conf
     1.6  [ "$(GET user)" ] && user="$(GET user)"
     1.7 -list="$(fgrep -l $user ${bugdir}/*/*/bug.conf | xargs ls -lt | awk '{print $9}')"
     1.8  
     1.9 -if [ "$list" ]; then
    1.10 +if fgrep -q -l "$user" ${bugdir}/*/*/bug.conf; then
    1.11  	echo "<h3>My bugs</h3>"
    1.12  	echo "<pre>"
    1.13 -	for bug in ${list}
    1.14 +	for bug in $(fgrep -l $user ${bugdir}/*/*/bug.conf | xargs ls -lt | awk '{print $9}')
    1.15  	do
    1.16  		. ${bug}
    1.17  		id=$(basename $(dirname $bug))