From d48ef1c8e2e84067a58818291935593d70e491f8 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 21 Sep 2006 06:22:05 +0000 Subject: --- system/application/config/autoload.php | 27 ++++++++++++++++++--------- system/libraries/Controller.php | 12 ++++++++---- user_guide/general/changelog.html | 3 +++ user_guide/scripts/nav.js | 1 - 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/system/application/config/autoload.php b/system/application/config/autoload.php index 1ed6f1757..4efe3be41 100644 --- a/system/application/config/autoload.php +++ b/system/application/config/autoload.php @@ -10,8 +10,7 @@ | the database is not connected to automatically since no assumption | is made regarding whether you intend to use it. This file lets | you globally define which systems you would like loaded with every -| request. In addition to core systems you can auto-load plugins, -| helper files, config files, and your own scripts. +| request. | | ------------------------------------------------------------------- | Instructions @@ -19,27 +18,27 @@ | | These are the things you can load automatically: | -| 1. Core classes +| 1. Libraries | 2. Helper files | 3. Plugins | 4. Scripts | 5. Custom config files | -| Note: The items will be loaded in the order that they are defined -| -| Please read the user guide for more detailed information */ /* | ------------------------------------------------------------------- -| Auto-load Core Classes +| Auto-load Libraries | ------------------------------------------------------------------- +| These are the classes located in the system/libraries folder +| or in your system/application/libraries folder. +| | Prototype: | -| $autoload['core'] = array('database', 'session', 'xmlrpc'); +| $autoload['libraries'] = array('database', 'session', 'xmlrpc'); */ -$autoload['core'] = array(); +$autoload['libraries'] = array(); /* @@ -97,5 +96,15 @@ $autoload['script'] = array(); $autoload['config'] = array(); +/* +| ------------------------------------------------------------------- +| Auto-load Core Libraries +| ------------------------------------------------------------------- +| +| DEPRECATED: Use $autoload $autoload['libraries'] instead. +| +*/ +// $autoload['core'] = array(); + ?> \ No newline at end of file diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php index 768b154e8..5a32e65c0 100644 --- a/system/libraries/Controller.php +++ b/system/libraries/Controller.php @@ -232,16 +232,20 @@ class Controller extends CI_Base { } unset($autoload['config']); - if ( ! is_array($autoload['core'])) + // A little tweak to remain backward compatible + // The $autoload['core'] item was deprecated + if ( ! isset($autoload['libraries'])) { - $autoload['core'] = array($autoload['core']); + $autoload['libraries'] = $autoload['core']; + } - foreach ($autoload['core'] as $item) + foreach ($autoload['libraries'] as $item) { $this->_ci_initialize($item); } - + unset($autoload['libraries']); + return $autoload; } // END _ci_autoload() diff --git a/user_guide/general/changelog.html b/user_guide/general/changelog.html index 80ffe7a4e..9aa9dcf02 100644 --- a/user_guide/general/changelog.html +++ b/user_guide/general/changelog.html @@ -79,6 +79,9 @@ Change Log
  • Fixed a bug that was causing a PHP error when the Exceptions class was called within the _get_config() function.
  • Fixed an oversight in the cookie helper in which the config file cookie settings were not being honored.
  • Added some code to allow email attachments to be reset when sending batches of email.
  • +
  • Deprecated the application/scripts folder. It will continue to work for legacy users, but it is recommended that you create your own +libraries or models instead. +
  • Deprecated the $autoload['core'] item from the autoload.php file. Instead, please now use: $autoload['libraries']
  • Deprecated the following database functions: $this->db->smart_escape_str() and $this->db->fields().
  • diff --git a/user_guide/scripts/nav.js b/user_guide/scripts/nav.js index de5a35fa8..960a6a8b2 100644 --- a/user_guide/scripts/nav.js +++ b/user_guide/scripts/nav.js @@ -43,7 +43,6 @@ function create_menu(basepath) '
  • Models
  • ' + '
  • Helpers
  • ' + '
  • Plugins
  • ' + - '
  • Scripts
  • ' + '
  • Using Code Igniter Libraries
  • ' + '
  • Creating Your Own Libraries
  • ' + '
  • Creating Core Classes
  • ' + -- cgit v1.2.3-24-g4f1b