tazbug view web/plugins/mybugs/user.sh @ rev 142

Dont show My bugs on profile if any created
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 22 21:35:46 2017 +0100 (2017-02-22)
parents b4700d7f9d42
children b49ba342d157
line source
1 #!/bin/sh
2 #
3 # This script display bug for a given user. A copy is used on SCN to
4 # display user bugs on profile page with a custom config file to set
5 # $bugdir.
6 #
7 [ -f "$plugins/mybugs/bugdir.conf" ] && . $plugins/mybugs/bugdir.conf
8 [ "$(GET user)" ] && user="$(GET user)"
9 list="$(fgrep -l $user ${bugdir}/*/*/bug.conf | xargs ls -lt | awk '{print $9}')"
11 if [ "$list" ]; then
12 echo "<h3>My bugs</h3>"
13 echo "<pre>"
14 for bug in ${list}
15 do
16 . ${bug}
17 id=$(basename $(dirname $bug))
18 cat << EOT
19 <img src='images/bug.png' alt='' /> \
20 Bug $id: <a href="?id=$id">$BUG</a> <span class="date">- $DATE</span>
21 EOT
22 done
23 echo "</pre>"
24 fi