tazbug rev 146
mybugs plugin: fix if * is used in MSG (again)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Feb 22 23:53:25 2017 +0100 (2017-02-22) |
parents | b964fe0ab828 |
children | 2b7f0070810d |
files | web/plugins/mybugs/mybugs.cgi web/plugins/mybugs/user.sh |
line diff
1.1 --- a/web/plugins/mybugs/mybugs.cgi Wed Feb 22 23:48:16 2017 +0100 1.2 +++ b/web/plugins/mybugs/mybugs.cgi Wed Feb 22 23:53:25 2017 +0100 1.3 @@ -43,10 +43,11 @@ 1.4 . ${msg} 1.5 id=$(basename $(dirname $msg)) 1.6 msgid=$(echo $msg | cut -d "." -f 2) 1.7 + msg="$(echo $MSG | cut -c 1-40)" 1.8 cat << EOT 1.9 <img src='images/bug.png' alt='' /> \ 1.10 <a href="?id=$id">Bug $id:</a> <span class="date">$DATE</span> \ 1.11 -<a href="?id=$id#msg${msgid}">$(echo "$MSG" | cut -c 1-40)...</a> 1.12 +<a href="?id=$id#msg${msgid}">${msg}...</a> 1.13 EOT 1.14 done 1.15 echo "</pre>"
2.1 --- a/web/plugins/mybugs/user.sh Wed Feb 22 23:48:16 2017 +0100 2.2 +++ b/web/plugins/mybugs/user.sh Wed Feb 22 23:53:25 2017 +0100 2.3 @@ -36,10 +36,11 @@ 2.4 . ${msg} 2.5 id=$(basename $(dirname $msg)) 2.6 msgid=$(echo $msg | cut -d "." -f 2) 2.7 + msg="$(echo $MSG | cut -c 1-40)" 2.8 cat << EOT 2.9 <img src='images/bug.png' alt='' /> msg $msgid \ 2.10 <a href="?id=$id">Bug $id:</a> <span class="date">$DATE</span> \ 2.11 -<a href="?id=$id#msg${msgid}">$(echo "$MSG" | cut -c 1-40)...</a> 2.12 +<a href="?id=$id#msg${msgid}">${msg}...</a> 2.13 EOT 2.14 unset USER DATE MSG 2.15 done