CodeIgniter Forums
CI 2.0.2 - FTP-Library - Obsolete checks for PHP5 when using chmod. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CI 2.0.2 - FTP-Library - Obsolete checks for PHP5 when using chmod. (/showthread.php?tid=40744)



CI 2.0.2 - FTP-Library - Obsolete checks for PHP5 when using chmod. - El Forum - 04-17-2011

[eluser]Unknown[/eluser]
The FTP-Library in CI 2.0.2 contains obsolete content from CI 1. CI 1 was able to run on PHP 4, too, so it did make sense the following:
Code:
// Permissions can only be set when running PHP 5
if ( ! function_exists('ftp_chmod'))
{
    if ($this->debug == TRUE)
    {
        $this->_error('ftp_unable_to_chmod');
    }
    return FALSE;
}

and some hints in the user guide (http://ellislab.com/codeigniter/user-guide/libraries/ftp.html), that chmod-related functions only work on PHP 5.

But now we have CI 2 and according to http://ellislab.com/codeigniter/user-guide/general/requirements.html the entire CI only works on PHP 5, not only chmod-related functions in the FTP library.

The hints in the user guide and the check if function exists does not make sense anymore.

To keep the code clean I suggest removing these hints and these checks.


CI 2.0.2 - FTP-Library - Obsolete checks for PHP5 when using chmod. - El Forum - 04-17-2011

[eluser]Matthieu Fauveau[/eluser]
Hi, two words for you: pull request Wink