IPv6 friendly funcs
authorJamie Cameron <jcameron@webmin.com>
Sun, 7 Nov 2010 06:15:49 +0000 (23:15 -0700)
committerJamie Cameron <jcameron@webmin.com>
Sun, 7 Nov 2010 06:15:49 +0000 (23:15 -0700)
phpini/save_db.cgi
phpini/save_misc.cgi

index f85fad0..83cadd7 100755 (executable)
@@ -47,7 +47,7 @@ if ($in{"mysql.default_host_def"}) {
        &save_directive($conf, "mysql.default_host", undef);
        }
 else {
-       gethostbyname($in{"mysql.default_host"}) ||
+       &to_ipaddress($in{"mysql.default_host"}) ||
                &error($text{'db_ehost'});
        &save_directive($conf, "mysql.default_host",
                        $in{"mysql.default_host"});
index b842b7e..85258e2 100755 (executable)
@@ -26,7 +26,7 @@ $conf = &get_config($in{'file'});
                $in{"allow_url_fopen"} || undef);
 
 # Save email sending options
-$in{"smtp_def"} || gethostbyname($in{"smtp"}) || &error($text{'misc_esmtp'});
+$in{"smtp_def"} || &to_ipaddress($in{"smtp"}) || &error($text{'misc_esmtp'});
 &save_directive($conf, "SMTP",
                $in{"smtp_def"} ? undef : $in{"smtp"});
 $in{"smtp_port_def"} || $in{"smtp_port"} =~ /^\d+$/ ||