Ensure that the wwwroot has been supplied with a http:// or https:// prefix

This commit is contained in:
donal
2008-02-13 03:06:54 +00:00
parent d79dfb8586
commit a29910300d
+5
View File
@@ -50,6 +50,11 @@ if (($form = data_submitted()) && confirm_sesskey()) {
if (!empty($form->wwwroot)) {
// ensure we remove trailing slashes
$form->wwwroot = preg_replace(':/$:', '', $form->wwwroot);
// ensure the wwwroot starts with a http or https prefix
if (strtolower(substr($form->wwwroot, 0, 4)) != 'http') {
$form->wwwroot = 'http://'.$form->wwwroot;
}
}
if(!function_exists('xmlrpc_encode_request')) {