// Sanitise
$path = sanitise_filepath(get_input('path'));
$dataroot = sanitise_filepath(get_input('dataroot'));
+ $url = sanitise_filepath(get_input('wwwroot'));
// Blank?
if ($dataroot == "/") {
$site = new ElggSite();
$site->name = get_input('sitename');
- $site->url = get_input('wwwroot');
+ $site->url = $url;
$site->description = get_input('sitedescription');
$site->email = get_input('siteemail');
$site->access_id = ACCESS_PUBLIC;
*
* Note: this function does not handle nested arrays (ex: form input of param[m][n])
* because of the filtering done in htmlawed from the filter_tags call.
- *
+ *
* @param $variable string The variable we want to return.
* @param $default mixed A default value for the variable if it is not found.
* @param $filter_result If true then the result is filtered for bad tags.
/**
* Sets an input value that may later be retrieved by get_input
- *
+ *
* Note: this function does not handle nested arrays (ex: form input of param[m][n])
*
* @param string $variable The name of the variable
// Sort trailing slash
$path = trim($path);
- $path = rtrim($path, " /");
+ // rtrim defaults plus /
+ $path = rtrim($path, " \n\t\0\x0B/");
$path = $path . "/";
return $path;