EllisLab/CodeIgniter — pull request #649 by jamierumbelow (2011-11-05 12:12:21+00:00)
Title: Unconstantised Paths

I was writing an EE add-on earlier and I needed to adjust the loading paths of some of the internal libraries. While you can alter the paths for libraries, models, helpers and views in the Loader, there are some bits of code where the paths are hard-coded with the **BASEPATH** and **APPPATH** constants.

In this commit, I've changed (most) of the internal references to **BASEPATH**, **APPPATH** and **VIEWPATH** to use the newly added `system_path()` function. The `system_path()` registry means that we can swap out the paths for things such as the database connection with minimal problems. It also just gives the system another tier of flexibility.

I've also added documentation to this commit.