summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-09 23:29:07 +0200
committeradmin <devnull@localhost>2006-10-09 23:29:07 +0200
commitb1fddc051af66a0a41a709862dd84d06139e2325 (patch)
tree373907951ae91b7a45165388aa3966b3b4363068 /system
parent2f0bac87c73febde8019e7cbab541905bcb0e5dd (diff)
Diffstat (limited to 'system')
-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
4 files changed, 25 insertions, 10 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;
}