tiny-slitaz rev 14

step4.php: multiple checkbox support
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Feb 15 22:04:29 2016 +0100 (2016-02-15)
parents 70ba6d904230
children c53990da4741
files helper step4.php
line diff
     1.1 --- a/helper	Mon Feb 08 23:57:16 2016 +0100
     1.2 +++ b/helper	Mon Feb 15 22:04:29 2016 +0100
     1.3 @@ -289,7 +289,8 @@
     1.4  		[ -s $2/vars ] && . $2/vars
     1.5  		echo "=== $pkg: $(date) ===" >> $2/post_install.log 2>&1
     1.6  		post_install $2/fs >> $2/post_install.log 2>&1
     1.7 -		sed -e 's/^export/ /' -e 's/^/  /' < $2/vars >> $2/fs/etc/packages.conf
     1.8 +		sed -e 's/^export/ /' -e 's/^/  /' -e '/^   suggested=/d' \
     1.9 +			< $2/vars >> $2/fs/etc/packages.conf
    1.10  	fi
    1.11  	rm -f $2/vars
    1.12  	exit 
     2.1 --- a/step4.php	Mon Feb 08 23:57:16 2016 +0100
     2.2 +++ b/step4.php	Mon Feb 15 22:04:29 2016 +0100
     2.3 @@ -10,6 +10,7 @@
     2.4  	$fp = fopen($_POST['tmp_dir']."vars","w");
     2.5  	foreach ($_POST as $key => $val) {
     2.6  		if (in_array($key, $usedvars)) continue;
     2.7 +		if (is_array($val)) $val = implode(",",$val);
     2.8  		fwrite($fp,"export ".$key."='".$val."'\n");
     2.9  	}
    2.10  	fclose($fp);