tazbug rev 147
mybugs plugin: some fix again!
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Thu Feb 23 00:51:16 2017 +0100 (2017-02-23) |
parents | fb5c47b8d6f5 |
children | 0cd81dfe65e9 |
files | web/bugs.cgi web/plugins/mybugs/mybugs.cgi web/plugins/mybugs/user.sh |
line diff
1.1 --- a/web/bugs.cgi Wed Feb 22 23:53:25 2017 +0100 1.2 +++ b/web/bugs.cgi Thu Feb 23 00:51:16 2017 +0100 1.3 @@ -281,13 +281,14 @@ 1.4 msgid=$(echo $msg | cut -d "." -f 2) 1.5 dir=$(dirname $msg) 1.6 id=$(basename $dir) 1.7 + resume="$(fgrep MSG= $msg | cut -d \" -f 2 | cut -c 1-40)" 1.8 . ${msg} 1.9 [ -f "${PEOPLE}/${USER}/account.conf" ] && \ 1.10 . ${PEOPLE}/${USER}/account.conf 1.11 cat << EOT 1.12 <a href="?user=$USER">$(get_gravatar "$MAIL" 24)</a> \ 1.13 <a href="?id=$id">Bug $id</a>: <span class="date">$DATE</span> \ 1.14 -$USER: <a href="?id=$id#msg${msgid}">$(echo $MSG | cut -c 1-40)...</a> 1.15 +$USER: <a href="?id=$id#msg${msgid}">${resume}...</a> 1.16 EOT 1.17 unset CREATOR USER MAIL 1.18 }
2.1 --- a/web/plugins/mybugs/mybugs.cgi Wed Feb 22 23:53:25 2017 +0100 2.2 +++ b/web/plugins/mybugs/mybugs.cgi Thu Feb 23 00:51:16 2017 +0100 2.3 @@ -22,7 +22,7 @@ 2.4 echo "<h3>$(gettext 'My bugs')</h3>" 2.5 echo "<pre>" 2.6 for bug in $(fgrep -l "CREATOR=\"$user\"" ${bugdir}/*/*/bug.conf | \ 2.7 - xargs ls -lt | awk '{print $9}' | head -n 4) 2.8 + xargs ls -lt | awk '{print $9}') 2.9 do 2.10 . ${bug} 2.11 id=$(basename $(dirname $bug)) 2.12 @@ -38,16 +38,16 @@ 2.13 echo "<h3>Debug messages</h3>" 2.14 echo "<pre>" 2.15 for msg in $(fgrep -l "USER=\"$user\"" ${bugdir}/*/*/msg.* | \ 2.16 - xargs ls -lt | awk '{print $9}' | head -n 4) 2.17 + xargs ls -lt | awk '{print $9}') 2.18 do 2.19 . ${msg} 2.20 id=$(basename $(dirname $msg)) 2.21 msgid=$(echo $msg | cut -d "." -f 2) 2.22 - msg="$(echo $MSG | cut -c 1-40)" 2.23 + message="$(fgrep MSG= $msg | cut -d \" -f 2 | cut -c 1-40)" 2.24 cat << EOT 2.25 <img src='images/bug.png' alt='' /> \ 2.26 <a href="?id=$id">Bug $id:</a> <span class="date">$DATE</span> \ 2.27 -<a href="?id=$id#msg${msgid}">${msg}...</a> 2.28 +<a href="?id=$id#msg${msgid}">${message}...</a> 2.29 EOT 2.30 done 2.31 echo "</pre>"
3.1 --- a/web/plugins/mybugs/user.sh Wed Feb 22 23:53:25 2017 +0100 3.2 +++ b/web/plugins/mybugs/user.sh Thu Feb 23 00:51:16 2017 +0100 3.3 @@ -36,13 +36,12 @@ 3.4 . ${msg} 3.5 id=$(basename $(dirname $msg)) 3.6 msgid=$(echo $msg | cut -d "." -f 2) 3.7 - msg="$(echo $MSG | cut -c 1-40)" 3.8 + message="$(fgrep MSG= $msg | cut -d \" -f 2 | cut -c 1-40)" 3.9 cat << EOT 3.10 -<img src='images/bug.png' alt='' /> msg $msgid \ 3.11 +<img src='images/bug.png' alt='' /> \ 3.12 <a href="?id=$id">Bug $id:</a> <span class="date">$DATE</span> \ 3.13 -<a href="?id=$id#msg${msgid}">${msg}...</a> 3.14 +<a href="?id=$id#msg${msgid}">${message}...</a> 3.15 EOT 3.16 - unset USER DATE MSG 3.17 done 3.18 echo "</pre>" 3.19 fi 3.20 @@ -50,7 +49,7 @@ 3.21 if [ "$show_more" ]; then 3.22 echo "<p>" 3.23 if [ "$HTTP_HOST" == "bugs.slitaz.org" ]; then 3.24 - echo "<a href='?mybugs&user=$user'>$(gettext 'View all bugs and messages')</a>" 3.25 + echo "<a href='?mybugs&user=$user'>$(gettext 'View all my bugs and messages')</a>" 3.26 else 3.27 echo "$(gettext 'View all my bugs and debug messages on:') " 3.28 echo "<a href='?mybugs&user=$user'>bugs.slitaz.org</a>"