tazbug rev 150

Samaller info on user page about bugs (more to come)
author Christophe Lincoln <pankso@slitaz.org>
date Mon Feb 27 13:50:39 2017 +0100 (2017-02-27)
parents 6db228036db5
children 027865f27580
files web/plugins/mybugs/user.sh
line diff
     1.1 --- a/web/plugins/mybugs/user.sh	Thu Feb 23 18:52:34 2017 +0000
     1.2 +++ b/web/plugins/mybugs/user.sh	Mon Feb 27 13:50:39 2017 +0100
     1.3 @@ -13,7 +13,7 @@
     1.4  	echo "<h3>Latest bugs</h3>"
     1.5  	echo "<pre>"
     1.6  	for bug in $(fgrep -l "CREATOR=\"$user\"" ${bugdir}/*/*/bug.conf | \
     1.7 -		xargs ls -lt | awk '{print $9}' | head -n 4)
     1.8 +		xargs ls -lt | awk '{print $9}' | head -n 3)
     1.9  	do
    1.10  		. ${bug}
    1.11  		id=$(basename $(dirname $bug))
    1.12 @@ -25,26 +25,26 @@
    1.13  	echo "</pre>"
    1.14  fi
    1.15  
    1.16 -if fgrep -q -l "USER=\"$user\"" ${bugdir}/*/*/msg.*; then
    1.17 -	show_more="0"
    1.18 -	echo "<h3>Latest debug messages</h3>"
    1.19 -	echo "<pre>"
    1.20 +#if fgrep -q -l "USER=\"$user\"" ${bugdir}/*/*/msg.*; then
    1.21 +	#show_more="0"
    1.22 +	#echo "<h3>Latest debug messages</h3>"
    1.23 +	#echo "<pre>"
    1.24  	
    1.25 -	for msg in $(fgrep -l "USER=\"$user\"" ${bugdir}/*/*/msg.* | \
    1.26 -		xargs ls -lt | awk '{print $9}' | head -n 4)
    1.27 -	do
    1.28 -		. ${msg}
    1.29 -		id=$(basename $(dirname $msg))
    1.30 -		msgid=$(echo $msg | cut -d "." -f 2)
    1.31 -		message="$(fgrep MSG= $msg | cut -d \" -f 2 | cut -c 1-40)"
    1.32 -		cat << EOT
    1.33 -<img src='images/bug.png' alt='' /> \
    1.34 -<a href="?id=$id">Bug $id:</a> <span class="date">$DATE</span> \
    1.35 -<a href="?id=$id#msg${msgid}">${message}...</a>
    1.36 -EOT
    1.37 -	done
    1.38 -	echo "</pre>"
    1.39 -fi
    1.40 +	#for msg in $(fgrep -l "USER=\"$user\"" ${bugdir}/*/*/msg.* | \
    1.41 +		#xargs ls -lt | awk '{print $9}' | head -n 4)
    1.42 +	#do
    1.43 +		#. ${msg}
    1.44 +		#id=$(basename $(dirname $msg))
    1.45 +		#msgid=$(echo $msg | cut -d "." -f 2)
    1.46 +		#message="$(fgrep MSG= $msg | cut -d \" -f 2 | cut -c 1-40)"
    1.47 +		#cat << EOT
    1.48 +#<img src='images/bug.png' alt='' /> \
    1.49 +#<a href="${url}?id=$id">Bug $id:</a> <span class="date">$DATE</span> \
    1.50 +#<a href="${url}?id=$id#msg${msgid}">${message}...</a>
    1.51 +#EOT
    1.52 +	#done
    1.53 +	#echo "</pre>"
    1.54 +#fi
    1.55  
    1.56  if [ "$show_more" ]; then
    1.57  	echo "<p>"
    1.58 @@ -52,7 +52,7 @@
    1.59  		echo "<a href='?mybugs&user=$user'>$(gettext 'View all my bugs and messages')</a>"
    1.60  	else
    1.61  		echo "$(gettext 'View all my bugs and debug messages on:') "
    1.62 -		echo "<a href='?mybugs&user=$user'>bugs.slitaz.org</a>"
    1.63 +		echo "<a href='${url}?mybugs&user=$user'>bugs.slitaz.org</a>"
    1.64  	fi
    1.65  	echo "</p>"
    1.66  fi