show correct errormessage when sql-prefix is wrong

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-12-23 13:56:49 +01:00
parent 2b55ceba7a
commit 4523ef87b7

View File

@@ -31,7 +31,11 @@ function checkUsername($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalue
) {
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_OK);
} else {
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'accountprefixiswrong');
$errmsg = 'accountprefixiswrong';
if ($fieldname == 'customer_mysqlprefix') {
$errmsg = 'mysqlprefixiswrong';
}
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, $errmsg);
}
return $returnvalue;
}