mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Fix permission issue with the transfer class if using PHP4 or for those not having the ftp extension available
git-svn-id: file:///svn/phpbb/trunk@7782 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
f175509f71
commit
22b970ef1e
2 changed files with 8 additions and 2 deletions
|
@ -289,6 +289,8 @@ p a {
|
|||
<li>[Fix] MS SQL DBAL drivers now write over extension limitations, they are too low for most installations (Bug #12415)</li>
|
||||
<li>[Fix] Fix sorting by author on "unanswered posts" (Bug #12545)</li>
|
||||
<li>[Fix] Allow searching for multibyte authors (Bug #11793)</li>
|
||||
<li>[Fix] Writing directories/files with correct permissions using FTP for transfers on PHP4</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -382,7 +382,9 @@ class ftp extends transfer
|
|||
}
|
||||
else
|
||||
{
|
||||
$chmod_cmd = 'CHMOD ' . $perms . ' ' . $file;
|
||||
// Unfortunatly CHMOD is not expecting an octal value...
|
||||
// We need to transform the integer (which was an octal) to an octal representation (to get the int) and then pass as is. ;)
|
||||
$chmod_cmd = 'CHMOD ' . base_convert($perms, 10, 8) . ' ' . $file;
|
||||
$err = $this->_site($chmod_cmd);
|
||||
}
|
||||
|
||||
|
@ -605,7 +607,9 @@ class ftp_fsock extends transfer
|
|||
*/
|
||||
function _chmod($file, $perms)
|
||||
{
|
||||
return $this->_send_command('SITE CHMOD', $perms . ' ' . $file);
|
||||
// Unfortunatly CHMOD is not expecting an octal value...
|
||||
// We need to transform the integer (which was an octal) to an octal representation (to get the int) and then pass as is. ;)
|
||||
return $this->_send_command('SITE CHMOD', base_convert($perms, 10, 8) . ' ' . $file);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue