From 310ec5c934b7d8c2ea64a19408a9f49d6433cbf3 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Tue, 31 Mar 2009 11:42:51 -0400 Subject: [PATCH] Fixed: FS#670 - Changing ftp_user_prefix and shell_user_prefix not possible --- interface/web/sites/ftp_user_edit.php | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/interface/web/sites/ftp_user_edit.php b/interface/web/sites/ftp_user_edit.php index 8c31940..ec35fd3 100644 --- a/interface/web/sites/ftp_user_edit.php +++ b/interface/web/sites/ftp_user_edit.php @@ -82,7 +82,8 @@ $app->uses('getconf'); $global_config = $app->getconf->get_global_config('sites'); - $ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']); + // $ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']); + $ftpuser_prefix = replacePrefix($global_config['ftpuser_prefix'], $this->dataRecord); if ($this->dataRecord['username'] != ""){ /* REMOVE the restriction */ @@ -115,7 +116,8 @@ $app->uses('getconf'); $global_config = $app->getconf->get_global_config('sites'); - $ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']); + //$ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']); + $ftpuser_prefix = replacePrefix($global_config['ftpuser_prefix'], $this->dataRecord); if ($app->tform->errorMessage == '') { $this->dataRecord['username'] = $ftpuser_prefix . $this->dataRecord['username']; @@ -151,7 +153,8 @@ $app->uses('getconf'); $global_config = $app->getconf->get_global_config('sites'); - $ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']); + //$ftpuser_prefix = ($global_config['ftpuser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['ftpuser_prefix']); + $ftpuser_prefix = replacePrefix($global_config['ftpuser_prefix'], $this->dataRecord); /* restrict the names */ if ($app->tform->errorMessage == '') { -- Gitblit v1.9.1