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.
diff --git a/index.php b/index.php
index 6e67c2d..a8d58b2 100644
--- a/index.php
+++ b/index.php
@@ -163,6 +163,7 @@
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 @@
* 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 e022e1b..03b25ab 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 1aca809..d1e8e77 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 863c5ef..4493ff2 100644
--- a/system/core/Config.php
+++ b/system/core/Config.php
@@ -80,7 +80,7 @@
*/
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 @@
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 @@
{
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 f565956..bff86a9 100644
--- a/system/core/Exceptions.php
+++ b/system/core/Exceptions.php
@@ -128,7 +128,7 @@
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 @@
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 24fa105..fd6380f 100644
--- a/system/core/Hooks.php
+++ b/system/core/Hooks.php
@@ -65,13 +65,13 @@
// 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 cdadc7f..170e6c7 100644
--- a/system/core/Lang.php
+++ b/system/core/Lang.php
@@ -51,14 +51,14 @@
*/
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 e75805d..59415b7 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -161,7 +161,7 @@
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 @@
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 @@
return FALSE;
}
- require_once(BASEPATH.'database/DB'.EXT);
+ require_once(BASEPATH.'database/DB.php');
if ($return === TRUE)
{
@@ -253,8 +253,8 @@
// 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 @@
$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 @@
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 @@
// 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 @@
// 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 @@
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 @@
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 @@
// 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 @@
// 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 @@
$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 @@
// 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 @@
*/
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 @@
{
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 45a82f3..05ace91 100644
--- a/system/core/Output.php
+++ b/system/core/Output.php
@@ -42,13 +42,13 @@
$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 d451aab..5e92a04 100644
--- a/system/core/Router.php
+++ b/system/core/Router.php
@@ -87,13 +87,13 @@
}
// 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 @@
}
// 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 @@
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 @@
}
// 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 8bf1ba8..33207d8 100644
--- a/system/database/DB.php
+++ b/system/database/DB.php
@@ -28,11 +28,11 @@
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 @@
$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 @@
}
}
- 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 e7a9de4..10e8ed0 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -424,8 +424,8 @@
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 @@
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 f8073d2..1145688 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -58,13 +58,13 @@
$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 4434494..3931667 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -352,13 +352,13 @@
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 a292043..080f622 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -259,13 +259,13 @@
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 a2d1031..6d88893 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -229,13 +229,13 @@
{
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 cca0939..33d7fa2 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -366,13 +366,13 @@
{
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 72d228e..df0fd6e 100644
--- a/system/libraries/Calendar.php
+++ b/system/libraries/Calendar.php
@@ -47,7 +47,7 @@
{
$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 b942f53..d1925c0 100644
--- a/system/libraries/Driver.php
+++ b/system/libraries/Driver.php
@@ -59,7 +59,7 @@
// 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 e5f6587..b30a8cf 100644
--- a/system/libraries/Encrypt.php
+++ b/system/libraries/Encrypt.php
@@ -524,7 +524,7 @@
{
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 fb2c5a4..9f1db76 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -83,7 +83,7 @@
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 e80049f..3177424 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -945,13 +945,13 @@
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 04cda73..016102a 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -84,13 +84,13 @@
*/
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 9890f60..945b104 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -66,6 +66,7 @@
<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 0000000..4937cf2
--- /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> ›
+<a href="../index.html">User Guide Home</a> ›
+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 <input type="text" class="input" style="width:200px;" name="q" id="q" size="31" maxlength="255" value="" /> <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: <a href="index.html">Installation Instructions</a>
+ ·
+<a href="#top">Top of Page</a> ·
+<a href="../index.html">User Guide Home</a> ·
+Next Topic: <a href="troubleshooting.html">Troubleshooting</a>
+</p>
+<p><a href="http://codeigniter.com">CodeIgniter</a> · Copyright © 2006 - 2011 · <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 1c4eb88..014ffa3 100644
--- a/user_guide/installation/upgrading.html
+++ b/user_guide/installation/upgrading.html
@@ -60,6 +60,7 @@
<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>