tazbug rev 145
mybugs plugin: fix if * is used in MSG
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Wed Feb 22 23:48:16 2017 +0100 (2017-02-22) |
parents | d98dc7dce8d4 |
children | fb5c47b8d6f5 |
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:24:52 2017 +0100 1.2 +++ b/web/plugins/mybugs/mybugs.cgi Wed Feb 22 23:48:16 2017 +0100 1.3 @@ -42,10 +42,11 @@ 1.4 do 1.5 . ${msg} 1.6 id=$(basename $(dirname $msg)) 1.7 + msgid=$(echo $msg | cut -d "." -f 2) 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}">$(echo "$MSG" | cut -c 1-40)...</a> 1.13 EOT 1.14 done 1.15 echo "</pre>"
2.1 --- a/web/plugins/mybugs/user.sh Wed Feb 22 23:24:52 2017 +0100 2.2 +++ b/web/plugins/mybugs/user.sh Wed Feb 22 23:48:16 2017 +0100 2.3 @@ -19,7 +19,7 @@ 2.4 id=$(basename $(dirname $bug)) 2.5 cat << EOT 2.6 <img src='images/bug.png' alt='' /> \ 2.7 -Bug $id: <a href="${url}/?id=$id">$BUG</a> <span class="date">- $DATE</span> 2.8 +Bug $id: <a href="${url}?id=$id">$BUG</a> <span class="date">- $DATE</span> 2.9 EOT 2.10 done 2.11 echo "</pre>" 2.12 @@ -29,6 +29,7 @@ 2.13 show_more="0" 2.14 echo "<h3>Latest debug messages</h3>" 2.15 echo "<pre>" 2.16 + 2.17 for msg in $(fgrep -l "USER=\"$user\"" ${bugdir}/*/*/msg.* | \ 2.18 xargs ls -lt | awk '{print $9}' | head -n 4) 2.19 do 2.20 @@ -36,10 +37,11 @@ 2.21 id=$(basename $(dirname $msg)) 2.22 msgid=$(echo $msg | cut -d "." -f 2) 2.23 cat << EOT 2.24 -<img src='images/bug.png' alt='' /> \ 2.25 -<a href="${url}/?id=$id">Bug $id:</a> <span class="date">$DATE</span> \ 2.26 -<a href="${url}/?id=$id#msg${msgid}">$(echo $MSG | cut -c 1-40)...</a> 2.27 +<img src='images/bug.png' alt='' /> msg $msgid \ 2.28 +<a href="?id=$id">Bug $id:</a> <span class="date">$DATE</span> \ 2.29 +<a href="?id=$id#msg${msgid}">$(echo "$MSG" | cut -c 1-40)...</a> 2.30 EOT 2.31 + unset USER DATE MSG 2.32 done 2.33 echo "</pre>" 2.34 fi