slitaz-dev-tools rev 57

tazwikiss: fix upload
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Apr 03 01:00:19 2011 +0200 (2011-04-03)
parents 4cb3956c4415
children a8cceb6943e9
files tazwikiss/rootfs/var/www/wiki/plugins/wkp_ListPlugins.sh
line diff
     1.1 --- a/tazwikiss/rootfs/var/www/wiki/plugins/wkp_ListPlugins.sh	Sun Apr 03 00:29:02 2011 +0200
     1.2 +++ b/tazwikiss/rootfs/var/www/wiki/plugins/wkp_ListPlugins.sh	Sun Apr 03 01:00:19 2011 +0200
     1.3 @@ -16,9 +16,10 @@
     1.4  
     1.5  EOT
     1.6  			cat $file
     1.7 -		elif [ -n "$(POST restore)" ]; then
     1.8 +		else
     1.9  			file=$(FILE file tmpname)
    1.10  			zcat $file | cpio -idmu
    1.11 +			return 1
    1.12  		fi
    1.13  		rm -f $file
    1.14  		exit 0
    1.15 @@ -60,7 +61,7 @@
    1.16  	done
    1.17  	CONTENT="$CONTENT
    1.18  <tr><td><br /><h2>Data</h2></td>
    1.19 -<td><form method=\"post\" action=\"?action=backup\">
    1.20 +<td><form method=\"post\" enctype=\"multipart/form-data\" action=\"?action=backup\">
    1.21  <input type=\"submit\" name=\"save\" value=\"save\" />"
    1.22  	[ "$ALLOW_UPLOAD" == "yes" ] && CONTENT="$CONTENT
    1.23  <input type=\"file\" name=\"file\" value=\"file\" />