tbrehm
2009-03-31 310ec5c934b7d8c2ea64a19408a9f49d6433cbf3
Fixed: FS#670 - Changing ftp_user_prefix and shell_user_prefix not possible
2 files modified
18 ■■■■■ changed files
interface/web/sites/ftp_user_edit.php 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/shell_user_edit.php 9 ●●●●● patch | view | raw | blame | history
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 == '') {
interface/web/sites/shell_user_edit.php
@@ -82,7 +82,8 @@
        
        $app->uses('getconf');
        $global_config = $app->getconf->get_global_config('sites');
        $shelluser_prefix = ($global_config['shelluser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['shelluser_prefix']);
        //$shelluser_prefix = ($global_config['shelluser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['shelluser_prefix']);
        $shelluser_prefix = replacePrefix($global_config['shelluser_prefix'], $this->dataRecord);
        
        if ($this->dataRecord['username'] != ""){
            /* REMOVE the restriction */
@@ -136,7 +137,8 @@
            
            $app->uses('getconf');
            $global_config = $app->getconf->get_global_config('sites');
            $shelluser_prefix = ($global_config['shelluser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['shelluser_prefix']);
            // $shelluser_prefix = ($global_config['shelluser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['shelluser_prefix']);
            $shelluser_prefix = replacePrefix($global_config['shelluser_prefix'], $this->dataRecord);
            /* restrict the names */
            $this->dataRecord['username'] = $shelluser_prefix . $this->dataRecord['username'];
@@ -182,7 +184,8 @@
            */
            $app->uses('getconf');
            $global_config = $app->getconf->get_global_config('sites');
            $shelluser_prefix = ($global_config['shelluser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['shelluser_prefix']);
            // $shelluser_prefix = ($global_config['shelluser_prefix'] == '')?'':str_replace('[CLIENTNAME]', $this->getClientName(), $global_config['shelluser_prefix']);
            $shelluser_prefix = replacePrefix($global_config['shelluser_prefix'], $this->dataRecord);
            
            /* restrict the names */
            $this->dataRecord['username'] = $shelluser_prefix . $this->dataRecord['username'];