From: Andreas F. <ba...@ph...> - 2009-07-22 01:26:46
|
Author: bantu Date: Wed Jul 22 01:26:09 2009 New Revision: 9820 Log: Fix bug #46295 - Be less strict with FTP daemons when getting directory filelists. Authorised by: bantu ;-) Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html branches/phpBB-3_0_0/phpBB/includes/functions_transfer.php Modified: branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html ============================================================================== *** branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html (original) --- branches/phpBB-3_0_0/phpBB/docs/CHANGELOG.html Wed Jul 22 01:26:09 2009 *************** *** 169,174 **** --- 169,175 ---- <li>[Fix] Display required fields notice on registration above the custom profile fields. (Bug #39665)</li> <li>[Fix] Copy poll options properly when copying topic. (Bug #39065)</li> <li>[Fix] Preserve newlines in template files (one newline had been always dropped after a template variable due to PHP's handling of closing tags)</li> + <li>[Fix] Be less strict with FTP daemons when getting directory filelists. (Bug #46295)</li> <li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li> <li>[Change] Add index on log_time to the log table to prevent slowdown on boards with many log entries. (Bug #44665 - Patch by bantu)</li> <li>[Change] Template engine now permits to a limited extent variable includes.</li> Modified: branches/phpBB-3_0_0/phpBB/includes/functions_transfer.php ============================================================================== *** branches/phpBB-3_0_0/phpBB/includes/functions_transfer.php (original) --- branches/phpBB-3_0_0/phpBB/includes/functions_transfer.php Wed Jul 22 01:26:09 2009 *************** *** 462,467 **** --- 462,475 ---- { $list = @ftp_nlist($this->connection, $dir); + // See bug #46295 - Some FTP daemons don't like './' + if ($dir === './') + { + // Let's try some alternatives + $list = (empty($list)) ? @ftp_nlist($this->connection, '.') : $list; + $list = (empty($list)) ? @ftp_nlist($this->connection, '') : $list; + } + // Return on error if ($list === false) { |