From f1c54ddd40069e77d281c002d8f0e3b44d965c91 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 21 Dec 2015 20:31:19 +0300 Subject: [PATCH] fix lp: 1527201 --- admin/samplelist.php | 21 +++++++-------------- functions/functions.import.php | 13 ++++--------- 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/admin/samplelist.php b/admin/samplelist.php index b34152ac..3bd72fa7 100644 --- a/admin/samplelist.php +++ b/admin/samplelist.php @@ -89,13 +89,9 @@ if (isset($_POST['ed'])) unset($_POST['ed']); unset($_POST['sample_import_id']); - -// print_r($_POST). "
"; //посмотрим чего отравляется if (isset($_POST['del']) && isset($_POST['type']) ) { $a = array(); $b = array(); $cert = array(); $a = $_POST['type']; - - //echo "

type before unset->>"; foreach($_POST['type'] as $key => $val) { echo ' | ', $key,' => ',$val,' | '; }; print "

"; foreach($_POST['del'] as $p) { unset ($_POST['type'][$p]); @@ -110,7 +106,6 @@ if (isset($_POST['ed'])) } /* else { echo "
", T_("You can delete string '$key'. "), "
"; } */ } - //echo "

del ->>"; foreach($_POST['del'] as $key => $val) { echo ' | ', $key,' => ',$val,' | '; }; print "

"; } if (isset($_POST['type'])){ @@ -136,7 +131,7 @@ if (isset($_POST['ed'])) if ($eml < 2) {$ch4 = true;} else { echo "
", T_("Too many e-mail fields. Please check selected types for E-mail."), "
"; } - if ($ch1 && $ch2 && $ch3 && $ch4) */$typecheck = true; //echo $ch1,$ch2,$ch3,$ch4, "typecheck=",$typecheck, "
" ; + if ($ch1 && $ch2 && $ch3 && $ch4) */$typecheck = true; if ($typecheck){ @@ -178,11 +173,10 @@ if (isset($_POST['ed'])) if (isset($_POST['var'])){ foreach($_POST['var'] as $p => $val) - {// echo '| ',$p,' => ',$val,'+ '; - $v = str_replace(" ", "_", $val); - + { + $val = str_replace(array(" ,",", ",","," "," "),"_", $val); $sql = "UPDATE sample_import_var_restrict - SET `var` = '$v' + SET `var` = '$val' WHERE sample_import_id = $sample_import_id AND `var_id` = $p"; $db->Execute($sql); @@ -199,7 +193,7 @@ if (isset($_POST['ed'])) $db->Execute($sql); foreach($_POST['see'] as $p => $val) - {// echo $p,' => ',$val,' + '; + { $sql = "UPDATE sample_import_var_restrict SET `restrict` = 0 WHERE sample_import_id = $sample_import_id @@ -300,7 +294,7 @@ if (isset($_GET['edit']) ) $rd = $db->GetAll($sql); $sql = "SELECT sir.var_id, - CONCAT('') as var, + CONCAT('') as var, CONCAT ('