diff --git a/system/application/config/database.php b/system/application/config/database.php
index de78164..c594ba8 100644
--- a/system/application/config/database.php
+++ b/system/application/config/database.php
@@ -40,7 +40,7 @@
$db['default']['active_r'] = TRUE;
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
-$db['default']['cache_on'] = TRUE;
+$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = APPPATH.'db_cache/';
diff --git a/system/application/config/mimes.php b/system/application/config/mimes.php
index de0a917..8b5036f 100644
--- a/system/application/config/mimes.php
+++ b/system/application/config/mimes.php
@@ -4,7 +4,7 @@
| MIME TYPES
| -------------------------------------------------------------------
| This file contains an array of mime types. It is used by the
-| Upload class to help identyfiy allowed file types.
+| Upload class to help identify allowed file types.
|
*/
diff --git a/system/libraries/Loader.php b/system/libraries/Loader.php
index 452e39d..dc588bb 100644
--- a/system/libraries/Loader.php
+++ b/system/libraries/Loader.php
@@ -30,12 +30,13 @@
var $CI;
var $ob_level;
+ var $view_path = '';
var $cached_vars = array();
var $models = array();
var $helpers = array();
var $plugins = array();
var $scripts = array();
- var $view_path = '';
+ var $varmap = array('unit_test' => 'unit', 'user_agent' => 'agent');
/**
* Constructor
@@ -665,6 +666,7 @@
function _ci_init_class($class, $prefix = '', $varname = NULL)
{
// Is there an associated config file for this class?
+ $config = NULL;
if (file_exists(APPPATH.'config/'.$class.EXT))
{
include_once(APPPATH.'config/'.$class.EXT);
@@ -678,9 +680,17 @@
{
$name = $prefix.$class;
}
-
- $classvar = ( ! is_null($varname)) ? $varname : strtolower($class);
+ // Set the variable name we will assign the class to
+ if ( ! is_null($varname))
+ {
+ $classvar = $varname;
+ }
+ else
+ {
+ $class = strtolower($class);
+ $classvar = ( ! isset($this->varmap[$class])) ? $class : $this->varmap[$class];
+ }
// Instantiate the class
if ($config !== NULL)
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index 39e1232..11c2baa 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -37,12 +37,16 @@
var $languages = array();
var $charsets = array();
+ var $platforms = array();
+ var $browsers = array();
+ var $mobiles = array();
+ var $robots = array();
+
var $platform = '';
var $browser = '';
var $version = '';
var $moble = '';
var $robot = '';
-
/**
* Constructor
@@ -66,8 +70,9 @@
$this->_compile_data();
}
}
+
+ log_message('debug', "Table Class Initialized");
}
-
// --------------------------------------------------------------------
@@ -79,7 +84,7 @@
*/
function _load_agent_file()
{
- if ( ! @include(APPPATH.'config/user_agent'.EXT))
+ if ( ! @include(APPPATH.'config/user_agents'.EXT))
{
return FALSE;
}
@@ -102,7 +107,7 @@
if (isset($mobiles))
{
- $this->browsers = $mobiles;
+ $this->mobiles = $mobiles;
unset($mobiles);
$return = TRUE;
}
@@ -344,7 +349,7 @@
* @access public
* @return string
*/
- function agent()
+ function agent_string()
{
return $this->agent;
}
diff --git a/user_guide/installation/upgrade_150.html b/user_guide/installation/upgrade_150.html
index 55ebaa7..b532073 100644
--- a/user_guide/installation/upgrade_150.html
+++ b/user_guide/installation/upgrade_150.html
@@ -71,16 +71,17 @@
<h2>Step 1: Update your Code Igniter files</h2>
-<p>Replace these directories in your "system" folder with the new versions:
+<p>Replace these files and directories in your "system" folder with the new versions:
<ul>
-<li><dfn>system/codeigniter/</dfn></li>
-<li><dfn>system/database/</dfn> (new for 1.5)</li>
-<li><dfn>system/helpers/</dfn></li>
-<li><dfn>system/language/</dfn></li>
-<li><dfn>system/libraries/</dfn></li>
-<li><dfn>system/scaffolding/</dfn></li>
+<li><dfn>application/config/user_agents.php</dfn> (new file for 1.5)</li>
+<li><dfn>codeigniter/</dfn></li>
+<li><dfn>database/</dfn> (new folder for 1.5. Replaces the "drivers" folder)</li>
+<li><dfn>helpers/</dfn></li>
+<li><dfn>language/</dfn></li>
+<li><dfn>libraries/</dfn></li>
+<li><dfn>scaffolding/</dfn></li>
</ul>
<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p>
diff --git a/user_guide/libraries/calendar.html b/user_guide/libraries/calendar.html
index cd3e664..9d2a01e 100644
--- a/user_guide/libraries/calendar.html
+++ b/user_guide/libraries/calendar.html
@@ -75,6 +75,8 @@
<code>$this->load->library('calendar');</code>
<p>Once loaded, the Calendar object will be available using: <dfn>$this->calendar</dfn></p>
+<p>You can also set your own class variable name. Please see the <a href="loader.html">Loader Class</a> for more info.</p>
+
<h2>Displaying a Calendar</h2>
diff --git a/user_guide/libraries/encryption.html b/user_guide/libraries/encryption.html
index 9be32cf..92d128c 100644
--- a/user_guide/libraries/encryption.html
+++ b/user_guide/libraries/encryption.html
@@ -110,6 +110,8 @@
<code>$this->load->library('encrypt');</code>
<p>Once loaded, the Encrypt library object will be available using: <dfn>$this->encrypt</dfn></p>
+<p>You can also set your own class variable name. Please see the <a href="loader.html">Loader Class</a> for more info.</p>
+
<h2>$this->encrypt->encode()</h2>
diff --git a/user_guide/libraries/parser.html b/user_guide/libraries/parser.html
index bf7b135..2f93baf 100644
--- a/user_guide/libraries/parser.html
+++ b/user_guide/libraries/parser.html
@@ -103,6 +103,8 @@
<code>$this->load->library('parser');</code>
<p>Once loaded, the Parser library object will be available using: <dfn>$this->parser</dfn></p>
+<p>You can also set your own class variable name. Please see the <a href="loader.html">Loader Class</a> for more info.</p>
+
<p>The following functions are available in this library:</p>
diff --git a/user_guide/libraries/sessions.html b/user_guide/libraries/sessions.html
index 5a1216f..7a894fa 100644
--- a/user_guide/libraries/sessions.html
+++ b/user_guide/libraries/sessions.html
@@ -87,6 +87,7 @@
<code>$this->load->library('session');</code>
<p>Once loaded, the Sessions library object will be available using: <dfn>$this->session</dfn></p>
+<p>You can also set your own class variable name. Please see the <a href="loader.html">Loader Class</a> for more info.</p>
<h2>How do Sessions work?</h2>
diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html
index 61b5ce8..c2e3239 100644
--- a/user_guide/libraries/table.html
+++ b/user_guide/libraries/table.html
@@ -72,6 +72,8 @@
<code>$this->load->library('table');</code>
<p>Once loaded, the Table library object will be available using: <dfn>$this->table</dfn></p>
+<p>You can also set your own class variable name. Please see the <a href="loader.html">Loader Class</a> for more info.</p>
+
<h2>Examples</h2>
diff --git a/user_guide/libraries/trackback.html b/user_guide/libraries/trackback.html
index 0621d4e..87f6f3a 100644
--- a/user_guide/libraries/trackback.html
+++ b/user_guide/libraries/trackback.html
@@ -74,6 +74,7 @@
<code>$this->load->library('trackback');</code>
<p>Once loaded, the Trackback library object will be available using: <dfn>$this->trackback</dfn></p>
+<p>You can also set your own class variable name. Please see the <a href="loader.html">Loader Class</a> for more info.</p>
<h2>Sending Trackbacks</h2>
diff --git a/user_guide/libraries/unit_testing.html b/user_guide/libraries/unit_testing.html
index 11a8fc2..aa74758 100644
--- a/user_guide/libraries/unit_testing.html
+++ b/user_guide/libraries/unit_testing.html
@@ -78,6 +78,7 @@
<code>$this->load->library('unit');</code>
<p>Once loaded, the Unit Test object will be available using: <dfn>$this->unit</dfn></p>
+<p>You can also set your own class variable name. Please see the <a href="loader.html">Loader Class</a> for more info.</p>
<h2>Running Tests</h2>
diff --git a/user_guide/libraries/zip.html b/user_guide/libraries/zip.html
index 6171ed1..32ef3be 100644
--- a/user_guide/libraries/zip.html
+++ b/user_guide/libraries/zip.html
@@ -71,6 +71,8 @@
<code>$this->load->library('zip');</code>
<p>Once loaded, the Zip library object will be available using: <dfn>$this->zip</dfn></p>
+<p>You can also set your own class variable name. Please see the <a href="loader.html">Loader Class</a> for more info.</p>
+
<h2>Usage Example</h2>