Skip to content

Commit

Permalink
Update to CodeIgniter to 2.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
thebrandonallen committed Apr 22, 2016
1 parent a2fc932 commit 3fba1ff
Show file tree
Hide file tree
Showing 121 changed files with 1,153 additions and 1,138 deletions.
Empty file modified system/.htaccess 100644 → 100755
Empty file.
7 changes: 4 additions & 3 deletions system/core/Benchmark.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -24,7 +25,7 @@
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/benchmark.html
*/
class CI_Benchmark {
Expand Down
9 changes: 5 additions & 4 deletions system/core/CodeIgniter.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -23,7 +24,7 @@
* @package CodeIgniter
* @subpackage codeigniter
* @category Front-controller
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/
*/

Expand All @@ -33,7 +34,7 @@
* @var string
*
*/
define('CI_VERSION', '2.1.4');
define('CI_VERSION', '2.2.6');

/**
* CodeIgniter Branch (Core = TRUE, Reactor = FALSE)
Expand Down
22 changes: 9 additions & 13 deletions system/core/Common.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -23,7 +24,7 @@
* @package CodeIgniter
* @subpackage codeigniter
* @category Common Functions
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/
*/

Expand All @@ -32,9 +33,6 @@
/**
* Determines if the current version of PHP is greater then the supplied value
*
* Since there are a few places where we conditionally test for PHP > 5
* we'll set a static variable.
*
* @access public
* @param string
* @return bool TRUE if the current version is $version or higher
Expand Down Expand Up @@ -254,7 +252,8 @@ function &get_config($replace = array())
}
}

return $_config[0] =& $config;
$_config[0] =& $config;
return $_config[0];
}
}

Expand Down Expand Up @@ -470,9 +469,6 @@ function _exception_handler($severity, $message, $filepath, $line)
{
// We don't bother with "strict" notices since they tend to fill up
// the log file with excess information that isn't normally very helpful.
// For example, if you are running PHP 5 and you use version 4 style
// class functions (without prefixes like "public", "private", etc.)
// you'll get notices telling you that these have been deprecated.
if ($severity == E_STRICT)
{
return;
Expand Down Expand Up @@ -514,16 +510,16 @@ function _exception_handler($severity, $message, $filepath, $line)
function remove_invisible_characters($str, $url_encoded = TRUE)
{
$non_displayables = array();

// every control character except newline (dec 10)
// carriage return (dec 13), and horizontal tab (dec 09)

if ($url_encoded)
{
$non_displayables[] = '/%0[0-8bcef]/'; // url encoded 00-08, 11, 12, 14, 15
$non_displayables[] = '/%1[0-9a-f]/'; // url encoded 16-31
}

$non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127

do
Expand Down
15 changes: 8 additions & 7 deletions system/core/Config.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -23,7 +24,7 @@
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/config.html
*/
class CI_Config {
Expand Down Expand Up @@ -66,11 +67,11 @@ function __construct()
// Set the base_url automatically if none was provided
if ($this->config['base_url'] == '')
{
if (isset($_SERVER['HTTP_HOST']))
if (isset($_SERVER['SERVER_ADDR']))
{
$base_url = isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off' ? 'https' : 'http';
$base_url .= '://'. $_SERVER['HTTP_HOST'];
$base_url .= str_replace(basename($_SERVER['SCRIPT_NAME']), '', $_SERVER['SCRIPT_NAME']);
$base_url = (empty($_SERVER['HTTPS']) OR strtolower($_SERVER['HTTPS']) === 'off') ? 'http' : 'https';
$base_url .= '://'.$_SERVER['SERVER_ADDR'];
$base_url .= substr($_SERVER['SCRIPT_NAME'], 0, strpos($_SERVER['SCRIPT_NAME'], basename($_SERVER['SCRIPT_FILENAME'])));
}

else
Expand Down
9 changes: 5 additions & 4 deletions system/core/Controller.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -24,7 +25,7 @@
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/general/controllers.html
*/
class CI_Controller {
Expand All @@ -37,7 +38,7 @@ class CI_Controller {
public function __construct()
{
self::$instance =& $this;

// Assign all the class objects that were instantiated by the
// bootstrap file (CodeIgniter.php) to local class variables
// so that CI can run as one big super object.
Expand Down
7 changes: 4 additions & 3 deletions system/core/Exceptions.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -21,7 +22,7 @@
* @package CodeIgniter
* @subpackage Libraries
* @category Exceptions
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/exceptions.html
*/
class CI_Exceptions {
Expand Down
7 changes: 4 additions & 3 deletions system/core/Hooks.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -23,7 +24,7 @@
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/encryption.html
*/
class CI_Hooks {
Expand Down
23 changes: 20 additions & 3 deletions system/core/Input.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -23,7 +24,7 @@
* @package CodeIgniter
* @subpackage Libraries
* @category Input
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/input.html
*/
class CI_Input {
Expand Down Expand Up @@ -631,8 +632,24 @@ function _sanitize_globals()
unset($_COOKIE['$Path']);
unset($_COOKIE['$Domain']);

// Work-around for PHP bug #66827 (https://bugs.php.net/bug.php?id=66827)
//
// The session ID sanitizer doesn't check for the value type and blindly does
// an implicit cast to string, which triggers an 'Array to string' E_NOTICE.
$sess_cookie_name = config_item('cookie_prefix').config_item('sess_cookie_name');
if (isset($_COOKIE[$sess_cookie_name]) && ! is_string($_COOKIE[$sess_cookie_name]))
{
unset($_COOKIE[$sess_cookie_name]);
}

foreach ($_COOKIE as $key => $val)
{
// _clean_input_data() has been reported to break encrypted cookies
if ($key === $sess_cookie_name && config_item('sess_encrypt_cookie'))
{
continue;
}

$_COOKIE[$this->_clean_input_keys($key)] = $this->_clean_input_data($val);
}
}
Expand Down
7 changes: 4 additions & 3 deletions system/core/Lang.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -21,7 +22,7 @@
* @package CodeIgniter
* @subpackage Libraries
* @category Language
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/language.html
*/
class CI_Lang {
Expand Down
7 changes: 4 additions & 3 deletions system/core/Loader.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -22,7 +23,7 @@
*
* @package CodeIgniter
* @subpackage Libraries
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @category Loader
* @link http://codeigniter.com/user_guide/libraries/loader.html
*/
Expand Down
7 changes: 4 additions & 3 deletions system/core/Model.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -21,7 +22,7 @@
* @package CodeIgniter
* @subpackage Libraries
* @category Libraries
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/config.html
*/
class CI_Model {
Expand Down
7 changes: 4 additions & 3 deletions system/core/Output.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -23,7 +24,7 @@
* @package CodeIgniter
* @subpackage Libraries
* @category Output
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/output.html
*/
class CI_Output {
Expand Down
7 changes: 4 additions & 3 deletions system/core/Router.php
Expand Up @@ -5,8 +5,9 @@
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://codeigniter.com/user_guide/license.html
* @link http://codeigniter.com
* @since Version 1.0
Expand All @@ -22,7 +23,7 @@
*
* @package CodeIgniter
* @subpackage Libraries
* @author ExpressionEngine Dev Team
* @author EllisLab Dev Team
* @category Libraries
* @link http://codeigniter.com/user_guide/general/routing.html
*/
Expand Down

0 comments on commit 3fba1ff

Please sign in to comment.