I resisted doing anything with CodeIgniter 3.0 for a long time, mostly due to the licensing that Ellislab had said they were going with. BCIT changed the license due to popular demand, and with an EOL notice for the 2.X branch posted about a month ago, I decided it was time to convert Community Auth over to CodeIgniter 3.0.
I had a special problem this week, and it took some digging to find out what was going wrong. It turns out that an encrypted cookie I was setting was being corrupted by a different encryption class configuration.
In a project I am working on, we are using the encryption class a lot, and in many cases providing a special cipher and/or key configuration. Since we are doing that, it’s important to remember what cipher and key are being used and when. When working on a large application, it can be difficult to remember what is being encrypted, and so I had to work out a solution.
Although CodeIgniter has been taking a beating, and many developers have moved on to more cutting edge frameworks, I’ve still got projects going in CodeIgniter, so I keep coming up with ways to extend the core, libraries, and helpers.
I want to show you how to extend CodeIgniter’s File Helper to change the way the get_filenames function retrieves files in a directory. With no option to choose whether or not it should recursively retrieve files in sub-directories, the original get_filenames function will go as deep as it can, retrieving files in sub-directories that you may not want.
Development of Community Auth has slowed way down since I made the decision to say farewell to CodeIgniter. I really had planned to keep investing time in it, but due to some irreconcilable differences with EllisLab and CodeIgniter, I decided that I was never going to upgrade Community Auth to CodeIgniter 3.X.X. I am currently working on projects that use both CodeIgniter and Community Auth, so I’m not just going to disappear, and do keep tinkering with Community Auth when I have time. Once CodeIgniter V3 is officially released, and if it looks like Community Auth downloads are down, I may elect to discontinue development and simply maintain the existing project.