Re: Tazpanel - pkgs.cgi

[ Thread Index | Date Index | More lists.tuxfamily.org/slitaz Archives ]


Hi, i'm here again :)

i think now it should work perfectly, for ALL the packages selected in
the checkboxes: just add

cmdline=${cmdline#*repo=* }

between line 465 and 466.

This way it will chop the shortest string matched with '*repo=* ', for
example for the string
'Remove repo=Any pkg=aria2+ pkg=b43-fwcutter', it will chop 'Remove
repo=Any ' and will leave 'pkg=....'. So we don't ever need to know
what's the name of the repo, nor we need to use sed to chop the
string; only it is important to have repo=* before pkg=*.

Here the diff, pkgs.cgi is the working one, taz2/tazpanel/pkgs.cgi is
the cloned tazpanel from hg.slitaz.org/tazpanel

--- pkgs.cgi
+++ taz2/tazpanel/pkgs.cgi
@@ -463,7 +463,6 @@
 		pkgs=""
 		cmdline=`echo ${QUERY_STRING#do=} | sed s'/&/ /g'`		
 		cmd=`echo ${cmdline} | awk '{print $1}'`		
-		cmdline=${cmdline#*repo=* }
 		pkgs=`echo $cmdline | sed -e s'/+/ /g' -e s'/pkg=//g' -e s/$cmd//`
 		cmd=`echo $cmd | tr [A-Z] [a-z]`		
 		case $cmd in


Daniele

---
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/