tazbug diff web/plugins/textmode/textmode.cgi @ rev 137

Update all plugins to use new storage paths
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 22 14:59:49 2017 +0100 (2017-02-22)
parents 7bf28563c0f6
children 2a172aca8228
line diff
     1.1 --- a/web/plugins/textmode/textmode.cgi	Tue Feb 21 19:12:22 2017 +0000
     1.2 +++ b/web/plugins/textmode/textmode.cgi	Wed Feb 22 14:59:49 2017 +0100
     1.3 @@ -13,12 +13,14 @@
     1.4  	case " $(GET) " in
     1.5  		
     1.6  	*\ stats\ *)
     1.7 -		echo "Bugs count     : $(ls $bugdir | wc -l)" 
     1.8 +		echo "Bugs count     : $(ls_bugs | wc -l)"
     1.9 +		echo "Messages count : $(find $bugdir -name msg.* | wc -l)"
    1.10  		echo "Database size  : $(du -sh $bugdir | awk '{print $1}')" ;;
    1.11  	
    1.12  	*\ search\ *)
    1.13 -		for bug in $(ls $bugdir)
    1.14 +		for bug in $(ls_bugs)
    1.15  		do
    1.16 +			set_bugdir "$bug"
    1.17  			result=$(fgrep -i -h "$(GET search)" $bugdir/$bug/*)
    1.18  			if [ "$result" ]; then
    1.19  				found=$(($found + 1))
    1.20 @@ -35,6 +37,7 @@
    1.21  	*\ id\ *)
    1.22  		# Show bug information and description
    1.23  		id=$(GET id)
    1.24 +		set_bugdir "$id"
    1.25  		if [ -f "$bugdir/$id/bug.conf" ]; then
    1.26  			. ${bugdir}/${id}/bug.conf
    1.27  			cat << EOT