Changeset 760

Show
Ignore:
Timestamp:
08/20/07 11:28:19 (1 year ago)
Author:
gnif
Message:

Fixed FTP edit account path does not exist bug

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/ssl-addon/trunk/CHANGELOG

    r757 r760  
    1212        * Changed the default site (ispcp) to listen on port 3400 
    1313        * Added ssl support on port 3400 if mod_ssl is loaded 
     14    - GUI: 
     15        * Fixed edit FTP account directory does not exist bug 
    1416 
    15172007-08-20 Geoffrey McRae 
  • branches/ssl-addon/trunk/gui/client/edit_ftp_acc.php

    r731 r760  
    9292            if (isset($_POST['use_other_dir']) && $_POST['use_other_dir'] === 'on') { 
    9393                $other_dir = $cfg['FTP_HOMEDIR'] . "/" . $_SESSION['user_logged'] . clean_input($_POST['other_dir']); 
    94  
    95                 if (!$vfs->exists($other_dir) || !is_subdir_of($cfg['FTP_HOMEDIR'] . "/" . $_SESSION['user_logged'], $other_dir)) { 
     94                $virtual_dir = clean_input($_POST['other_dir']); 
     95                $res = $vfs->exists($virtual_dir); 
     96 
     97                if (!$res || !is_subdir_of($cfg['FTP_HOMEDIR'] . "/" . $_SESSION['user_logged'], $other_dir)) { 
    9698                    set_page_message(tr('%s does not exist', clean_input($_POST['other_dir']))); 
    9799                    return; 
     
    126128            if (isset($_POST['use_other_dir']) && $_POST['use_other_dir'] === 'on') { 
    127129                $other_dir = $cfg['FTP_HOMEDIR'] . "/" . $_SESSION['user_logged'] . clean_input($_POST['other_dir']); 
    128  
    129                 if (!$vfs->exists($other_dir) || !is_subdir_of($cfg['FTP_HOMEDIR'] . "/" . $_SESSION['user_logged'], $other_dir)) { 
     130                $virtual_dir = clean_input($_POST['other_dir']); 
     131                $res = $vfs->exists($virtual_dir); 
     132                if (!$res) { 
    130133                    set_page_message(tr('%s does not exist', clean_input($_POST['other_dir']))); 
    131134                    return;