summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Aker <greg.aker@ellislab.com>2011-04-19 17:59:47 +0200
committerGreg Aker <greg.aker@ellislab.com>2011-04-19 17:59:47 +0200
commit3a746655e92ec59ee7e731c3535673a9aedc5d3e (patch)
treeb7890445cdad0a65d02c27ae570c2c5d05905267
parente6e6e64ab078205153513af24dd4163157efb148 (diff)
Removing internal references to the EXT constant. Additionally, marked the constant as deprecated. Use ".php" instead. Also adding upgrade notes from 2.0.2 to 2.0.3.
-rw-r--r--index.php3
-rw-r--r--system/core/CodeIgniter.php22
-rw-r--r--system/core/Common.php14
-rw-r--r--system/core/Config.php6
-rw-r--r--system/core/Exceptions.php4
-rw-r--r--system/core/Hooks.php8
-rw-r--r--system/core/Lang.php4
-rw-r--r--system/core/Loader.php64
-rw-r--r--system/core/Output.php6
-rw-r--r--system/core/Router.php14
-rw-r--r--system/database/DB.php12
-rw-r--r--system/database/DB_driver.php6
-rw-r--r--system/helpers/download_helper.php8
-rw-r--r--system/helpers/file_helper.php8
-rw-r--r--system/helpers/html_helper.php8
-rw-r--r--system/helpers/smiley_helper.php8
-rw-r--r--system/helpers/text_helper.php8
-rw-r--r--system/libraries/Calendar.php2
-rw-r--r--system/libraries/Driver.php2
-rw-r--r--system/libraries/Encrypt.php2
-rw-r--r--system/libraries/Log.php2
-rw-r--r--system/libraries/Upload.php8
-rw-r--r--system/libraries/User_agent.php8
-rw-r--r--user_guide/changelog.html1
-rw-r--r--user_guide/installation/upgrade_203.html102
-rw-r--r--user_guide/installation/upgrading.html1
26 files changed, 218 insertions, 113 deletions
diff --git a/index.php b/index.php
index 6e67c2db5..a8d58b2d9 100644
--- a/index.php
+++ b/index.php
@@ -163,6 +163,7 @@ if (defined('ENVIRONMENT'))
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
// The PHP file extension
+ // this global constant is deprecated.
define('EXT', '.php');
// Path to the system folder
@@ -198,7 +199,7 @@ if (defined('ENVIRONMENT'))
* And away we go...
*
*/
-require_once BASEPATH.'core/CodeIgniter'.EXT;
+require_once BASEPATH.'core/CodeIgniter.php';
/* End of file index.php */
/* Location: ./index.php */ \ No newline at end of file
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index e022e1b46..03b25ab9e 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -46,20 +46,20 @@
* Load the global functions
* ------------------------------------------------------
*/
- require(BASEPATH.'core/Common'.EXT);
+ require(BASEPATH.'core/Common.php');
/*
* ------------------------------------------------------
* Load the framework constants
* ------------------------------------------------------
*/
- if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/constants'.EXT))
+ if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/constants.php'))
{
- require(APPPATH.'config/'.ENVIRONMENT.'/constants'.EXT);
+ require(APPPATH.'config/'.ENVIRONMENT.'/constants.php');
}
else
{
- require(APPPATH.'config/constants'.EXT);
+ require(APPPATH.'config/constants.php');
}
/*
@@ -224,7 +224,7 @@
*
*/
// Load the base controller class
- require BASEPATH.'core/Controller'.EXT;
+ require BASEPATH.'core/Controller.php';
function &get_instance()
{
@@ -232,20 +232,20 @@
}
- if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller'.EXT))
+ if (file_exists(APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php'))
{
- require APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller'.EXT;
+ require APPPATH.'core/'.$CFG->config['subclass_prefix'].'Controller.php';
}
// Load the local application controller
// Note: The Router class automatically validates the controller path using the router->_validate_request().
// If this include fails it means that the default controller in the Routes.php file is not resolving to something valid.
- if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT))
+ if ( ! file_exists(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php'))
{
show_error('Unable to load your default controller. Please make sure the controller specified in your Routes.php file is valid.');
}
- include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().EXT);
+ include(APPPATH.'controllers/'.$RTR->fetch_directory().$RTR->fetch_class().'.php');
// Set a mark point for benchmarking
$BM->mark('loading_time:_base_classes_end');
@@ -318,12 +318,12 @@
$method = (isset($x[1]) ? $x[1] : 'index');
if ( ! class_exists($class))
{
- if ( ! file_exists(APPPATH.'controllers/'.$class.EXT))
+ if ( ! file_exists(APPPATH.'controllers/'.$class.'.php'))
{
show_404("{$class}/{$method}");
}
- include_once(APPPATH.'controllers/'.$class.EXT);
+ include_once(APPPATH.'controllers/'.$class.'.php');
unset($CI);
$CI = new $class();
}
diff --git a/system/core/Common.php b/system/core/Common.php
index 1aca809ab..d1e8e77e9 100644
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -128,13 +128,13 @@
// thenin the local application/libraries folder
foreach (array(BASEPATH, APPPATH) as $path)
{
- if (file_exists($path.$directory.'/'.$class.EXT))
+ if (file_exists($path.$directory.'/'.$class.'.php'))
{
$name = $prefix.$class;
if (class_exists($name) === FALSE)
{
- require($path.$directory.'/'.$class.EXT);
+ require($path.$directory.'/'.$class.'.php');
}
break;
@@ -142,13 +142,13 @@
}
// Is the request a class extension? If so we load it too
- if (file_exists(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.EXT))
+ if (file_exists(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php'))
{
$name = config_item('subclass_prefix').$class;
if (class_exists($name) === FALSE)
{
- require(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.EXT);
+ require(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php');
}
}
@@ -157,7 +157,7 @@
{
// Note: We use exit() rather then show_error() in order to avoid a
// self-referencing loop with the Excptions class
- exit('Unable to locate the specified class: '.$class.EXT);
+ exit('Unable to locate the specified class: '.$class.'.php');
}
// Keep track of what we just loaded
@@ -209,9 +209,9 @@
}
// Is the config file in the environment folder?
- if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/config'.EXT))
+ if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/config.php'))
{
- $file_path = APPPATH.'config/config'.EXT;
+ $file_path = APPPATH.'config/config.php';
}
// Fetch the config file
diff --git a/system/core/Config.php b/system/core/Config.php
index 863c5ef4b..4493ff266 100644
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -80,7 +80,7 @@ class CI_Config {
*/
function load($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)
{
- $file = ($file == '') ? 'config' : str_replace(EXT, '', $file);
+ $file = ($file == '') ? 'config' : str_replace('.php', '', $file);
$found = FALSE;
$loaded = FALSE;
@@ -92,7 +92,7 @@ class CI_Config {
foreach ($check_locations as $location)
{
- $file_path = $path.'config/'.$location.EXT;
+ $file_path = $path.'config/'.$location.'.php';
if (in_array($file_path, $this->is_loaded, TRUE))
{
@@ -152,7 +152,7 @@ class CI_Config {
{
return FALSE;
}
- show_error('The configuration file '.$file.EXT.' does not exist.');
+ show_error('The configuration file '.$file.'.php'.' does not exist.');
}
return TRUE;
diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php
index f5659561c..bff86a92f 100644
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -128,7 +128,7 @@ class CI_Exceptions {
ob_end_flush();
}
ob_start();
- include(APPPATH.'errors/'.$template.EXT);
+ include(APPPATH.'errors/'.$template.'.php');
$buffer = ob_get_contents();
ob_end_clean();
return $buffer;
@@ -164,7 +164,7 @@ class CI_Exceptions {
ob_end_flush();
}
ob_start();
- include(APPPATH.'errors/error_php'.EXT);
+ include(APPPATH.'errors/error_php.php');
$buffer = ob_get_contents();
ob_end_clean();
echo $buffer;
diff --git a/system/core/Hooks.php b/system/core/Hooks.php
index 24fa1055b..fd6380f0a 100644
--- a/system/core/Hooks.php
+++ b/system/core/Hooks.php
@@ -65,13 +65,13 @@ class CI_Hooks {
// Grab the "hooks" definition file.
// If there are no hooks, we're done.
- if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks'.EXT))
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/hooks'.EXT);
+ include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
}
- elseif (is_file(APPPATH.'config/hooks'.EXT))
+ elseif (is_file(APPPATH.'config/hooks.php'))
{
- include(APPPATH.'config/hooks'.EXT);
+ include(APPPATH.'config/hooks.php');
}
diff --git a/system/core/Lang.php b/system/core/Lang.php
index cdadc7f41..170e6c725 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -51,14 +51,14 @@ class CI_Lang {
*/
function load($langfile = '', $idiom = '', $return = FALSE, $add_suffix = TRUE, $alt_path = '')
{
- $langfile = str_replace(EXT, '', $langfile);
+ $langfile = str_replace('.php', '', $langfile);
if ($add_suffix == TRUE)
{
$langfile = str_replace('_lang.', '', $langfile).'_lang';
}
- $langfile .= EXT;
+ $langfile .= '.php';
if (in_array($langfile, $this->is_loaded, TRUE))
{
diff --git a/system/core/Loader.php b/system/core/Loader.php
index e75805d0e..59415b72a 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -161,7 +161,7 @@ class CI_Loader {
foreach ($this->_ci_model_paths as $mod_path)
{
- if ( ! file_exists($mod_path.'models/'.$path.$model.EXT))
+ if ( ! file_exists($mod_path.'models/'.$path.$model.'.php'))
{
continue;
}
@@ -181,7 +181,7 @@ class CI_Loader {
load_class('Model', 'core');
}
- require_once($mod_path.'models/'.$path.$model.EXT);
+ require_once($mod_path.'models/'.$path.$model.'.php');
$model = ucfirst($model);
@@ -217,7 +217,7 @@ class CI_Loader {
return FALSE;
}
- require_once(BASEPATH.'database/DB'.EXT);
+ require_once(BASEPATH.'database/DB.php');
if ($return === TRUE)
{
@@ -253,8 +253,8 @@ class CI_Loader {
// this use is deprecated and strongly discouraged
$CI->load->dbforge();
- require_once(BASEPATH.'database/DB_utility'.EXT);
- require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_utility'.EXT);
+ require_once(BASEPATH.'database/DB_utility.php');
+ require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_utility.php');
$class = 'CI_DB_'.$CI->db->dbdriver.'_utility';
$CI->dbutil = new $class();
@@ -277,8 +277,8 @@ class CI_Loader {
$CI =& get_instance();
- require_once(BASEPATH.'database/DB_forge'.EXT);
- require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_forge'.EXT);
+ require_once(BASEPATH.'database/DB_forge.php');
+ require_once(BASEPATH.'database/drivers/'.$CI->db->dbdriver.'/'.$CI->db->dbdriver.'_forge.php');
$class = 'CI_DB_'.$CI->db->dbdriver.'_forge';
$CI->dbforge = new $class();
@@ -375,16 +375,16 @@ class CI_Loader {
continue;
}
- $ext_helper = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.EXT;
+ $ext_helper = APPPATH.'helpers/'.config_item('subclass_prefix').$helper.'.php';
// Is this a helper extension request?
if (file_exists($ext_helper))
{
- $base_helper = BASEPATH.'helpers/'.$helper.EXT;
+ $base_helper = BASEPATH.'helpers/'.$helper.'.php';
if ( ! file_exists($base_helper))
{
- show_error('Unable to load the requested file: helpers/'.$helper.EXT);
+ show_error('Unable to load the requested file: helpers/'.$helper.'.php');
}
include_once($ext_helper);
@@ -398,9 +398,9 @@ class CI_Loader {
// Try to load the helper
foreach ($this->_ci_helper_paths as $path)
{
- if (file_exists($path.'helpers/'.$helper.EXT))
+ if (file_exists($path.'helpers/'.$helper.'.php'))
{
- include_once($path.'helpers/'.$helper.EXT);
+ include_once($path.'helpers/'.$helper.'.php');
$this->_ci_helpers[$helper] = TRUE;
log_message('debug', 'Helper loaded: '.$helper);
@@ -411,7 +411,7 @@ class CI_Loader {
// unable to load the helper
if ( ! isset($this->_ci_helpers[$helper]))
{
- show_error('Unable to load the requested file: helpers/'.$helper.EXT);
+ show_error('Unable to load the requested file: helpers/'.$helper.'.php');
}
}
}
@@ -490,7 +490,7 @@ class CI_Loader {
if ( ! class_exists('CI_Driver_Library'))
{
// we aren't instantiating an object here, that'll be done by the Library itself
- require BASEPATH.'libraries/Driver'.EXT;
+ require BASEPATH.'libraries/Driver.php';
}
// We can save the loader some time since Drivers will *always* be in a subfolder,
@@ -616,7 +616,7 @@ class CI_Loader {
if ($_ci_path == '')
{
$_ci_ext = pathinfo($_ci_view, PATHINFO_EXTENSION);
- $_ci_file = ($_ci_ext == '') ? $_ci_view.EXT : $_ci_view;
+ $_ci_file = ($_ci_ext == '') ? $_ci_view.'.php' : $_ci_view;
$_ci_path = $this->_ci_view_path.$_ci_file;
}
else
@@ -732,7 +732,7 @@ class CI_Loader {
// Get the class name, and while we're at it trim any slashes.
// The directory path can be included as part of the class name,
// but we don't want a leading slash
- $class = str_replace(EXT, '', trim($class, '/'));
+ $class = str_replace('.php', '', trim($class, '/'));
// Was the path included with the class name?
// We look for a slash to determine this
@@ -749,12 +749,12 @@ class CI_Loader {
// We'll test for both lowercase and capitalized versions of the file name
foreach (array(ucfirst($class), strtolower($class)) as $class)
{
- $subclass = APPPATH.'libraries/'.$subdir.config_item('subclass_prefix').$class.EXT;
+ $subclass = APPPATH.'libraries/'.$subdir.config_item('subclass_prefix').$class.'.php';
// Is this a class extension request?
if (file_exists($subclass))
{
- $baseclass = BASEPATH.'libraries/'.ucfirst($class).EXT;
+ $baseclass = BASEPATH.'libraries/'.ucfirst($class).'.php';
if ( ! file_exists($baseclass))
{
@@ -793,7 +793,7 @@ class CI_Loader {
$is_duplicate = FALSE;
foreach ($this->_ci_library_paths as $path)
{
- $filepath = $path.'libraries/'.$subdir.$class.EXT;
+ $filepath = $path.'libraries/'.$subdir.$class.'.php';
// Does the file exist? No? Bummer...
if ( ! file_exists($filepath))
@@ -872,24 +872,24 @@ class CI_Loader {
// We test for both uppercase and lowercase, for servers that
// are case-sensitive with regard to file names. Check for environment
// first, global next
- if (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.strtolower($class).EXT))
+ if (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php'))
{
- include_once($path .'config/'.ENVIRONMENT.'/'.strtolower($class).EXT);
+ include_once($path .'config/'.ENVIRONMENT.'/'.strtolower($class).'.php');
break;
}
- elseif (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).EXT))
+ elseif (defined('ENVIRONMENT') AND file_exists($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php'))
{
- include_once($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).EXT);
+ include_once($path .'config/'.ENVIRONMENT.'/'.ucfirst(strtolower($class)).'.php');
break;
}
- elseif (file_exists($path .'config/'.strtolower($class).EXT))
+ elseif (file_exists($path .'config/'.strtolower($class).'.php'))
{
- include_once($path .'config/'.strtolower($class).EXT);
+ include_once($path .'config/'.strtolower($class).'.php');
break;
}
- elseif (file_exists($path .'config/'.ucfirst(strtolower($class)).EXT))
+ elseif (file_exists($path .'config/'.ucfirst(strtolower($class)).'.php'))
{
- include_once($path .'config/'.ucfirst(strtolower($class)).EXT);
+ include_once($path .'config/'.ucfirst(strtolower($class)).'.php');
break;
}
}
@@ -965,13 +965,13 @@ class CI_Loader {
*/
function _ci_autoloader()
{
- if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT))
+ if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/autoload.php'))
{
- include_once(APPPATH.'config/'.ENVIRONMENT.'/autoload'.EXT);
+ include_once(APPPATH.'config/'.ENVIRONMENT.'/autoload.php');
}
else
{
- include_once(APPPATH.'config/autoload'.EXT);
+ include_once(APPPATH.'config/autoload.php');
}
@@ -1084,13 +1084,13 @@ class CI_Loader {
{
if ( ! is_array($filename))
{
- return array(strtolower(str_replace(EXT, '', str_replace($extension, '', $filename)).$extension));
+ return array(strtolower(str_replace('.php', '', str_replace($extension, '', $filename)).$extension));
}
else
{
foreach ($filename as $key => $val)
{
- $filename[$key] = strtolower(str_replace(EXT, '', str_replace($extension, '', $val)).$extension);
+ $filename[$key] = strtolower(str_replace('.php', '', str_replace($extension, '', $val)).$extension);
}
return $filename;
diff --git a/system/core/Output.php b/system/core/Output.php
index 45a82f3cb..05ace919c 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -42,13 +42,13 @@ class CI_Output {
$this->_zlib_oc = @ini_get('zlib.output_compression');
// Get mime types for later
- if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT))
+ if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
{
- include APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT;
+ include APPPATH.'config/'.ENVIRONMENT.'/mimes.php';
}
else
{
- include APPPATH.'config/mimes'.EXT;
+ include APPPATH.'config/mimes.php';
}
diff --git a/system/core/Router.php b/system/core/Router.php
index d451aab68..5e92a04b1 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -87,13 +87,13 @@ class CI_Router {
}
// Load the routes.php file.
- if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT))
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/routes.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/routes'.EXT);
+ include(APPPATH.'config/'.ENVIRONMENT.'/routes.php');
}
- elseif (is_file(APPPATH.'config/routes'.EXT))
+ elseif (is_file(APPPATH.'config/routes.php'))
{
- include(APPPATH.'config/routes'.EXT);
+ include(APPPATH.'config/routes.php');
}
$this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route;
@@ -227,7 +227,7 @@ class CI_Router {
}
// Does the requested controller exist in the root folder?
- if (file_exists(APPPATH.'controllers/'.$segments[0].EXT))
+ if (file_exists(APPPATH.'controllers/'.$segments[0].'.php'))
{
return $segments;
}
@@ -242,7 +242,7 @@ class CI_Router {
if (count($segments) > 0)
{
// Does the requested controller exist in the sub-folder?
- if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].EXT))
+ if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$segments[0].'.php'))
{
show_404($this->fetch_directory().$segments[0]);
}
@@ -264,7 +264,7 @@ class CI_Router {
}
// Does the default controller exist in the sub-folder?
- if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.EXT))
+ if ( ! file_exists(APPPATH.'controllers/'.$this->fetch_directory().$this->default_controller.'.php'))
{
$this->directory = '';
return array();
diff --git a/system/database/DB.php b/system/database/DB.php
index 8bf1ba8ba..33207d885 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -28,11 +28,11 @@ function &DB($params = '', $active_record_override = NULL)
if (is_string($params) AND strpos($params, '://') === FALSE)
{
// Is the config file in the environment folder?
- if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/database'.EXT))
+ if ( ! defined('ENVIRONMENT') OR ! file_exists($file_path = APPPATH.'config/'.ENVIRONMENT.'/database.php'))
{
- if ( ! file_exists($file_path = APPPATH.'config/database'.EXT))
+ if ( ! file_exists($file_path = APPPATH.'config/database.php'))
{
- show_error('The configuration file database'.EXT.' does not exist.');
+ show_error('The configuration file database.php does not exist.');
}
}
@@ -116,11 +116,11 @@ function &DB($params = '', $active_record_override = NULL)
$active_record = $active_record_override;
}
- require_once(BASEPATH.'database/DB_driver'.EXT);
+ require_once(BASEPATH.'database/DB_driver.php');
if ( ! isset($active_record) OR $active_record == TRUE)
{
- require_once(BASEPATH.'database/DB_active_rec'.EXT);
+ require_once(BASEPATH.'database/DB_active_rec.php');
if ( ! class_exists('CI_DB'))
{
@@ -135,7 +135,7 @@ function &DB($params = '', $active_record_override = NULL)
}
}
- require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver'.EXT);
+ require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].'_driver.php');
// Instantiate the DB adapter
$driver = 'CI_DB_'.$params['dbdriver'].'_driver';
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index e7a9de475..10e8ed0c0 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -424,8 +424,8 @@ class CI_DB_driver {
if ( ! class_exists($driver))
{
- include_once(BASEPATH.'database/DB_result'.EXT);
- include_once(BASEPATH.'database/drivers/'.$this->dbdriver.'/'.$this->dbdriver.'_result'.EXT);
+ include_once(BASEPATH.'database/DB_result.php');
+ include_once(BASEPATH.'database/drivers/'.$this->dbdriver.'/'.$this->dbdriver.'_result.php');
}
return $driver;
@@ -1115,7 +1115,7 @@ class CI_DB_driver {
if ( ! class_exists('CI_DB_Cache'))
{
- if ( ! @include(BASEPATH.'database/DB_cache'.EXT))
+ if ( ! @include(BASEPATH.'database/DB_cache.php'))
{
return $this->cache_off();
}
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index f8073d238..1145688ae 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -58,13 +58,13 @@ if ( ! function_exists('force_download'))
$extension = end($x);
// Load the mime types
- if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT))
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT);
+ include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
}
- elseif (is_file(APPPATH.'config/mimes'.EXT))
+ elseif (is_file(APPPATH.'config/mimes.php'))
{
- include(APPPATH.'config/mimes'.EXT);
+ include(APPPATH.'config/mimes.php');
}
// Set a default mime if we can't find it
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 44344947e..3931667fd 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -352,13 +352,13 @@ if ( ! function_exists('get_mime_by_extension'))
if ( ! is_array($mimes))
{
- if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT))
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT);
+ include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
}
- elseif (is_file(APPPATH.'config/mimes'.EXT))
+ elseif (is_file(APPPATH.'config/mimes.php'))
{
- include(APPPATH.'config/mimes'.EXT);
+ include(APPPATH.'config/mimes.php');
}
if ( ! is_array($mimes))
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index a29204391..080f622dd 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -259,13 +259,13 @@ if ( ! function_exists('doctype'))
if ( ! is_array($_doctypes))
{
- if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes'.EXT))
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/doctypes'.EXT);
+ include(APPPATH.'config/'.ENVIRONMENT.'/doctypes.php');
}
- elseif (is_file(APPPATH.'config/doctypes'.EXT))
+ elseif (is_file(APPPATH.'config/doctypes.php'))
{
- include(APPPATH.'config/doctypes'.EXT);
+ include(APPPATH.'config/doctypes.php');
}
if ( ! is_array($_doctypes))
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index a2d1031b3..6d8889354 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -229,13 +229,13 @@ if ( ! function_exists('_get_smiley_array'))
{
function _get_smiley_array()
{
- if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys'.EXT))
+ if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/smileys.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/smileys'.EXT);
+ include(APPPATH.'config/'.ENVIRONMENT.'/smileys.php');
}
- elseif (file_exists(APPPATH.'config/smileys'.EXT))
+ elseif (file_exists(APPPATH.'config/smileys.php'))
{
- include(APPPATH.'config/smileys'.EXT);
+ include(APPPATH.'config/smileys.php');
}
if (isset($smileys) AND is_array($smileys))
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index cca093976..33d7fa2fd 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -366,13 +366,13 @@ if ( ! function_exists('convert_accented_characters'))
{
function convert_accented_characters($str)
{
- if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars'.EXT))
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars'.EXT);
+ include(APPPATH.'config/'.ENVIRONMENT.'/foreign_chars.php');
}
- elseif (is_file(APPPATH.'config/foreign_chars'.EXT))
+ elseif (is_file(APPPATH.'config/foreign_chars.php'))
{
- include(APPPATH.'config/foreign_chars'.EXT);
+ include(APPPATH.'config/foreign_chars.php');
}
if ( ! isset($foreign_characters))
diff --git a/system/libraries/Calendar.php b/system/libraries/Calendar.php
index 72d228e73..df0fd6eeb 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -47,7 +47,7 @@ class CI_Calendar {
{
$this->CI =& get_instance();
- if ( ! in_array('calendar_lang'.EXT, $this->CI->lang->is_loaded, TRUE))
+ if ( ! in_array('calendar_lang.php', $this->CI->lang->is_loaded, TRUE))
{
$this->CI->lang->load('calendar');
}
diff --git a/system/libraries/Driver.php b/system/libraries/Driver.php
index b942f539f..d1925c0ec 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -59,7 +59,7 @@ class CI_Driver_Library {
// loves me some nesting!
foreach (array(ucfirst($driver_name), $driver_name) as $class)
{
- $filepath = $path.'libraries/'.$lib_name.'/drivers/'.$class.EXT;
+ $filepath = $path.'libraries/'.$lib_name.'/drivers/'.$class.'.php';
if (file_exists($filepath))
{
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php
index e5f65878a..b30a8cf0b 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -524,7 +524,7 @@ class CI_Encrypt {
{
if ( ! function_exists('mhash'))
{
- require_once(BASEPATH.'libraries/Sha1'.EXT);
+ require_once(BASEPATH.'libraries/Sha1.php');
$SH = new CI_SHA;
return $SH->generate($str);
}
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index fb2c5a49b..9f1db76ba 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -83,7 +83,7 @@ class CI_Log {
return FALSE;
}
- $filepath = $this->_log_path.'log-'.date('Y-m-d').EXT;
+ $filepath = $this->_log_path.'log-'.date('Y-m-d').'.php';
$message = '';
if ( ! file_exists($filepath))
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index e80049fa4..3177424c4 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -945,13 +945,13 @@ class CI_Upload {
if (count($this->mimes) == 0)
{
- if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT))
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/mimes'.EXT);
+ include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php');
}
- elseif (is_file(APPPATH.'config/mimes'.EXT))
+ elseif (is_file(APPPATH.'config/mimes.php'))
{
- include(APPPATH.'config//mimes'.EXT);
+ include(APPPATH.'config//mimes.php');
}
else
{
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index 04cda7312..016102a2a 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -84,13 +84,13 @@ class CI_User_agent {
*/
private function _load_agent_file()
{
- if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/user_agents'.EXT))
+ if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php'))
{
- include(APPPATH.'config/'.ENVIRONMENT.'/user_agents'.EXT);
+ include(APPPATH.'config/'.ENVIRONMENT.'/user_agents.php');
}
- elseif (is_file(APPPATH.'config/user_agents'.EXT))
+ elseif (is_file(APPPATH.'config/user_agents.php'))
{
- include(APPPATH.'config/user_agents'.EXT);
+ include(APPPATH.'config/user_agents.php');
}
else
{
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 9890f602c..945b10497 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -66,6 +66,7 @@ Change Log
<li>General Changes
<ul>
<li>Added Session Class userdata to the output profiler. Additionally, added a show/hide toggle on HTTP Headers, Session Data and Config Variables.</li>
+ <li>Removed internal usage of the <samp>EXT</samp> constant.</li>
</ul>
</li>
<li>Helpers
diff --git a/user_guide/installation/upgrade_203.html b/user_guide/installation/upgrade_203.html
new file mode 100644
index 000000000..4937cf257
--- /dev/null
+++ b/user_guide/installation/upgrade_203.html
@@ -0,0 +1,102 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>Upgrading from 2.0.2 to 2.0.3 : CodeIgniter User Guide</title>
+
+<style type='text/css' media='all'>@import url('../userguide.css');</style>
+<link rel='stylesheet' type='text/css' media='all' href='../userguide.css' />
+
+<script type="text/javascript" src="../nav/nav.js"></script>
+<script type="text/javascript" src="../nav/prototype.lite.js"></script>
+<script type="text/javascript" src="../nav/moo.fx.js"></script>
+<script type="text/javascript" src="../nav/user_guide_menu.js"></script>
+
+<meta http-equiv='expires' content='-1' />
+<meta http-equiv= 'pragma' content='no-cache' />
+<meta name='robots' content='all' />
+<meta name='author' content='ExpressionEngine Dev Team' />
+<meta name='description' content='CodeIgniter User Guide' />
+
+</head>
+<body>
+
+<!-- START NAVIGATION -->
+<div id="nav"><div id="nav_inner"><script type="text/javascript">create_menu('../');</script></div></div>
+<div id="nav2"><a name="top"></a><a href="javascript:void(0);" onclick="myHeight.toggle();"><img src="../images/nav_toggle_darker.jpg" width="154" height="43" border="0" title="Toggle Table of Contents" alt="Toggle Table of Contents" /></a></div>
+<div id="masthead">
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td><h1>CodeIgniter User Guide Version 2.0.3</h1></td>
+<td id="breadcrumb_right"><a href="../toc.html">Table of Contents Page</a></td>
+</tr>
+</table>
+</div>
+<!-- END NAVIGATION -->
+
+
+<!-- START BREADCRUMB -->
+<table cellpadding="0" cellspacing="0" border="0" style="width:100%">
+<tr>
+<td id="breadcrumb">
+<a href="http://codeigniter.com/">CodeIgniter Home</a> &nbsp;&#8250;&nbsp;
+<a href="../index.html">User Guide Home</a> &nbsp;&#8250;&nbsp;
+Upgrading from 2.0.2 to 2.0.3
+</td>
+<td id="searchbox"><form method="get" action="http://www.google.com/search"><input type="hidden" name="as_sitesearch" id="as_sitesearch" value="codeigniter.com/user_guide/" />Search User Guide&nbsp; <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" />&nbsp;<input type="submit" class="submit" name="sa" value="Go" /></form></td>
+</tr>
+</table>
+<!-- END BREADCRUMB -->
+
+<br clear="all" />
+
+
+<!-- START CONTENT -->
+<div id="content">
+
+<h1>Upgrading from 2.0.2 to 2.0.3</h1>
+
+<p>Before performing an update you should take your site offline by replacing the index.php file with a static one.</p>
+
+
+<h2>Step 1: Update your CodeIgniter files</h2>
+
+<p>Replace all files and directories in your "system" folder and replace your index.php file. If any modifications were made to your index.php they will need to be made fresh in this new one.</p>
+
+<p class="important"><strong>Note:</strong> If you have any custom developed files in these folders please make copies of them first.</p>
+
+<h2>Step 2: Update CodeIgniter files</h2>
+
+<p>Replace the files and directories in your "system" folder with the new versions:</p>
+
+<h2>Step 3: Update your main index.php file</h2>
+
+<p>If you are running a stock <dfn>index.php</dfn> file simply replace your version with the new one.</p>
+
+<p>If your <dfn>index.php</dfn> file has internal modifications, please add your modifications to the new file and use it.</p>
+
+<h2>Step 4: Replace config/user_agents.php</h2>
+
+<p>This config file has been updated to contain more user agent types, please copy it to <kbd>application/config/user_agents.php</kbd>.</p>
+
+<h2>Step 5: Change references of the EXT constant to ".php"</h2>
+<p class="important"><strong>Note:</strong> The EXT Constant has been marked as deprecated, but has not been removed from the application. You are encouraged to make the changes sooner rather than later.</p>
+
+</div>
+<!-- END CONTENT -->
+
+
+<div id="footer">
+<p>
+Previous Topic:&nbsp;&nbsp;<a href="index.html">Installation Instructions</a>
+&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+<a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
+Next Topic:&nbsp;&nbsp;<a href="troubleshooting.html">Troubleshooting</a>
+</p>
+<p><a href="http://codeigniter.com">CodeIgniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 - 2011 &nbsp;&middot;&nbsp; <a href="http://ellislab.com/">EllisLab, Inc.</a></p>
+</div>
+
+</body>
+</html> \ No newline at end of file
diff --git a/user_guide/installation/upgrading.html b/user_guide/installation/upgrading.html
index 1c4eb882d..014ffa3f3 100644
--- a/user_guide/installation/upgrading.html
+++ b/user_guide/installation/upgrading.html
@@ -60,6 +60,7 @@ Upgrading from a Previous Version
<p>Please read the upgrade notes corresponding to the version you are upgrading from.</p>
<ul>
+ <li><a href="upgrade_203.html">Upgrading from 2.0.2 to 2.0.3</a></li>
<li><a href="upgrade_202.html">Upgrading from 2.0.1 to 2.0.2</a></li>
<li><a href="upgrade_201.html">Upgrading from 2.0 to 2.0.1</a></li>
<li><a href="upgrade_200.html">Upgrading from 1.7.2 to 2.0</a></li>