summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/application/config/database.php2
-rw-r--r--system/application/config/mimes.php2
-rw-r--r--system/libraries/Loader.php16
-rw-r--r--system/libraries/User_agent.php15
-rw-r--r--user_guide/installation/upgrade_150.html15
-rw-r--r--user_guide/libraries/calendar.html2
-rw-r--r--user_guide/libraries/encryption.html2
-rw-r--r--user_guide/libraries/parser.html2
-rw-r--r--user_guide/libraries/sessions.html1
-rw-r--r--user_guide/libraries/table.html2
-rw-r--r--user_guide/libraries/trackback.html1
-rw-r--r--user_guide/libraries/unit_testing.html1
-rw-r--r--user_guide/libraries/zip.html2
13 files changed, 46 insertions, 17 deletions
diff --git a/system/application/config/database.php b/system/application/config/database.php
index de781646c..c594ba896 100644
--- a/system/application/config/database.php
+++ b/system/application/config/database.php
@@ -40,7 +40,7 @@ $db['default']['dbprefix'] = "";
$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 de0a91752..8b5036f23 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 452e39dfa..dc588bb0c 100644
--- a/system/libraries/Loader.php
+++ b/system/libraries/Loader.php
@@ -30,12 +30,13 @@ class CI_Loader {
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 @@ class CI_Loader {
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 @@ class CI_Loader {
{
$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 39e12327f..11c2baa68 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -37,12 +37,16 @@ class CI_User_agent {
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 @@ class CI_User_agent {
$this->_compile_data();
}
}
+
+ log_message('debug', "Table Class Initialized");
}
-
// --------------------------------------------------------------------
@@ -79,7 +84,7 @@ class CI_User_agent {
*/
function _load_agent_file()
{
- if ( ! @include(APPPATH.'config/user_agent'.EXT))
+ if ( ! @include(APPPATH.'config/user_agents'.EXT))
{
return FALSE;
}
@@ -102,7 +107,7 @@ class CI_User_agent {
if (isset($mobiles))
{
- $this->browsers = $mobiles;
+ $this->mobiles = $mobiles;
unset($mobiles);
$return = TRUE;
}
@@ -344,7 +349,7 @@ class CI_User_agent {
* @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 55ebaa747..b532073fd 100644
--- a/user_guide/installation/upgrade_150.html
+++ b/user_guide/installation/upgrade_150.html
@@ -71,16 +71,17 @@ have not upgraded to that version please do so first.</p>
<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 cd3e66441..9d2a01e1b 100644
--- a/user_guide/libraries/calendar.html
+++ b/user_guide/libraries/calendar.html
@@ -75,6 +75,8 @@ template, allowing 100% control over every aspect of its design. In addition, yo
<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 9be32cf4f..92d128cd8 100644
--- a/user_guide/libraries/encryption.html
+++ b/user_guide/libraries/encryption.html
@@ -110,6 +110,8 @@ for example, can only hold 4K of information.</p>
<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 bf7b13518..2f93baf0b 100644
--- a/user_guide/libraries/parser.html
+++ b/user_guide/libraries/parser.html
@@ -103,6 +103,8 @@ full-blown template parsing solution. We've kept it very lean on purpose in orde
<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 5a1216f6e..7a894faed 100644
--- a/user_guide/libraries/sessions.html
+++ b/user_guide/libraries/sessions.html
@@ -87,6 +87,7 @@ will cause it to read, create, and update sessions.</p>
<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 61b5ce82f..c2e323993 100644
--- a/user_guide/libraries/table.html
+++ b/user_guide/libraries/table.html
@@ -72,6 +72,8 @@ HTML Table Class
<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 0621d4e75..87f6f3a0b 100644
--- a/user_guide/libraries/trackback.html
+++ b/user_guide/libraries/trackback.html
@@ -74,6 +74,7 @@ Trackback Class
<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 11a8fc26c..aa7475870 100644
--- a/user_guide/libraries/unit_testing.html
+++ b/user_guide/libraries/unit_testing.html
@@ -78,6 +78,7 @@ to determine if it is producing the correct data type and result.
<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 6171ed1c8..32ef3bedd 100644
--- a/user_guide/libraries/zip.html
+++ b/user_guide/libraries/zip.html
@@ -71,6 +71,8 @@ desktop or saved to a directory.</p>
<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>