diff --git a/lib/formfields/customer/domains/formfield.domains_add.php b/lib/formfields/customer/domains/formfield.domains_add.php index 2e0a12a2..d333bb07 100644 --- a/lib/formfields/customer/domains/formfield.domains_add.php +++ b/lib/formfields/customer/domains/formfield.domains_add.php @@ -42,9 +42,9 @@ return array( ), 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null), - 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), - 'select_var' => $pathSelect + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'type' => $pathSelect['type'], + 'select_var' => $pathSelect['value'] ), 'url' => array( 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), diff --git a/lib/formfields/customer/domains/formfield.domains_edit.php b/lib/formfields/customer/domains/formfield.domains_edit.php index 1abb0f8f..2741e5f3 100644 --- a/lib/formfields/customer/domains/formfield.domains_edit.php +++ b/lib/formfields/customer/domains/formfield.domains_edit.php @@ -42,9 +42,9 @@ return array( ), 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null), - 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), - 'select_var' => $pathSelect + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'type' => $pathSelect['type'], + 'select_var' => $pathSelect['value'] ), 'url' => array( 'visible' => ($settings['panel']['pathedit'] == 'Dropdown' ? true : false), diff --git a/lib/formfields/customer/extras/formfield.htaccess_add.php b/lib/formfields/customer/extras/formfield.htaccess_add.php index 57f489cb..9890554b 100644 --- a/lib/formfields/customer/extras/formfield.htaccess_add.php +++ b/lib/formfields/customer/extras/formfield.htaccess_add.php @@ -26,9 +26,9 @@ return array( 'fields' => array( 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null), - 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), - 'select_var' => $pathSelect + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'type' => $pathSelect['type'], + 'select_var' => $pathSelect['value'] ), 'options_indexes' => array( 'label' => $lng['extras']['directory_browsing'], diff --git a/lib/formfields/customer/extras/formfield.htpasswd_add.php b/lib/formfields/customer/extras/formfield.htpasswd_add.php index 5802e040..fe936c37 100644 --- a/lib/formfields/customer/extras/formfield.htpasswd_add.php +++ b/lib/formfields/customer/extras/formfield.htpasswd_add.php @@ -26,9 +26,9 @@ return array( 'fields' => array( 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null), - 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), - 'select_var' => $pathSelect + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'type' => $pathSelect['type'], + 'select_var' => $pathSelect['value'] ), 'username' => array( 'label' => $lng['login']['username'], diff --git a/lib/formfields/customer/ftp/formfield.ftp_add.php b/lib/formfields/customer/ftp/formfield.ftp_add.php index 19475ecc..bc7529c2 100644 --- a/lib/formfields/customer/ftp/formfield.ftp_add.php +++ b/lib/formfields/customer/ftp/formfield.ftp_add.php @@ -36,9 +36,9 @@ return array( ), 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null), - 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), - 'select_var' => $pathSelect, + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'type' => $pathSelect['type'], + 'select_var' => $pathSelect['value'] ), 'ftp_password' => array( 'label' => $lng['login']['password'], diff --git a/lib/formfields/customer/ftp/formfield.ftp_edit.php b/lib/formfields/customer/ftp/formfield.ftp_edit.php index 42199ff9..5015870e 100644 --- a/lib/formfields/customer/ftp/formfield.ftp_edit.php +++ b/lib/formfields/customer/ftp/formfield.ftp_edit.php @@ -41,9 +41,9 @@ return array( ), 'path' => array( 'label' => $lng['panel']['path'], - 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : NULL), - 'type' => ($settings['panel']['pathedit'] != 'Dropdown' ? 'text' : 'select'), - 'select_var' => $pathSelect + 'desc' => ($settings['panel']['pathedit'] != 'Dropdown' ? $lng['panel']['pathDescription'] : null).(isset($pathSelect['note']) ? '
'.$pathSelect['value'] : ''), + 'type' => $pathSelect['type'], + 'select_var' => $pathSelect['value'] ), 'ftp_password' => array( 'label' => $lng['login']['password'], diff --git a/lib/functions/filedir/function.makePathfield.php b/lib/functions/filedir/function.makePathfield.php index f2293b85..1d5098b3 100644 --- a/lib/functions/filedir/function.makePathfield.php +++ b/lib/functions/filedir/function.makePathfield.php @@ -36,11 +36,15 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '') { global $lng; $value = str_replace($path, '', $value); - $field = ''; + $field = array(); if($fieldType == 'Manual') { - $field = ''; + $field = array( + 'type' => 'text', + 'value' => htmlspecialchars($value) + ); + } elseif($fieldType == 'Dropdown') { @@ -58,7 +62,7 @@ function makePathfield($path, $uid, $gid, $fieldType, $value = '') { if(sizeof($dirList) <= 100) { - $field = ''; + $field = array( + 'type' => 'select', + 'value' => $_field + ); } else { // remove starting slash we added // for the Dropdown, #225 $value = substr($value, 1); - $field = $lng['panel']['toomanydirs']; - $field.= '
'; + //$field = $lng['panel']['toomanydirs']; + $field = array( + 'type' => 'text', + 'value' => htmlspecialchars($value), + 'note' => $lng['panel']['toomanydirs'] + ); } } else { - $field = $lng['panel']['dirsmissing']; - $field.= ''; + //$field = $lng['panel']['dirsmissing']; + $field = ''; + $field = array( + 'type' => 'hidden', + 'value' => '/', + 'note' => $lng['panel']['dirsmissing'] + ); } }