various tiny improvements

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-07-09 09:39:26 +02:00
parent a7a971f444
commit 25fa9a8121
5 changed files with 21 additions and 11 deletions

View File

@@ -17,17 +17,17 @@
*
*/
function checkMysqlAccessHost($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
{
function checkMysqlAccessHost($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) {
$mysql_access_host_array = array_map('trim', explode(',', $newfieldvalue));
foreach($mysql_access_host_array as $host_entry)
{
if(validate_ip($host_entry, true) == false
foreach ($mysql_access_host_array as $host_entry) {
if (validate_ip2($host_entry, true, 'invalidip', true) == false
&& validateDomain($host_entry) == false
&& validateLocalHostname($host_entry) == false
&& $host_entry != '%')
{
&& $host_entry != '%'
) {
return array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'invalidmysqlhost', $host_entry);
}
}