Commit 976b2729 authored by Adrian Rossouw's avatar Adrian Rossouw

Remember the port setting on future form submissions. #724182

parent 2a6286fc
......@@ -369,7 +369,7 @@ function hosting_site_form($node) {
'#title' => t('Port'),
'#value' => $node->port,
);
$form['port'] = _hosting_site_form_port();
$form['port'] = _hosting_site_form_port($node->platform, $node->port);
$form['info']['profile'] = array(
'#type' => 'item',
'#title' => t('Install Profile'),
......@@ -959,9 +959,9 @@ function _hosting_site_form_profile($platform = NULL) {
/**
* Generate hosting site node form element 'port'
*/
function _hosting_site_form_port($platform = HOSTING_DEFAULT_PLATFORM) {
function _hosting_site_form_port($platform = HOSTING_DEFAULT_PLATFORM, $default = null) {
$showports = _hosting_site_allowed_ports($platform);
$defport = reset($showports);
$defport = ($default) ? $default : reset($showports);
if (sizeof($showports) > 1 && user_access('change site port')) {
$form['port'] = array(
'#type' => 'radios',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment