From 416024696aabd82a3468dec2bd164abbb2c6309a Mon Sep 17 00:00:00 2001 From: Luiz Gustavo Costa Date: Fri, 7 Mar 2014 14:12:24 -0300 Subject: better make of gettext in expression (thanks rbgarga) --- usr/local/www/guiconfig.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr') diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 928b039..0187e42 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -254,13 +254,13 @@ function do_input_validation($postdata, $reqdfields, $reqdfieldsn, &$input_error /* check for bad control characters */ foreach ($postdata as $pn => $pd) { if (is_string($pd) && preg_match("/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/", $pd)) { - $input_errors[] = gettext("The field") . " '" . $pn . "' ". gettext("contains invalid characters."); + $input_errors[] = sprintf(gettext("The field %s contains invalid characters."), $pn); } } for ($i = 0; $i < count($reqdfields); $i++) { if ($_POST[$reqdfields[$i]] == "" && $_REQUEST[$reqdfields[$i]] == "") { - $input_errors[] = gettext("The field") . " '" . $reqdfieldsn[$i] . "' " . gettext("is required."); + $input_errors[] = sprintf(gettext("The field %s is required."), $reqfieldsn[$i]); } } } -- cgit v1.1