Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Commit

Permalink
Upgrade CI to 3.0.6, prep for final 0.7.x release
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhitneysdsu committed May 17, 2016
1 parent 5f298cd commit dfa8db2
Show file tree
Hide file tree
Showing 6 changed files with 119 additions and 79 deletions.
2 changes: 1 addition & 1 deletion application/config/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
// -----------------------------------------------------------------------------
// Bonfire-specific Constants
// -----------------------------------------------------------------------------
defined('BONFIRE_VERSION') || define('BONFIRE_VERSION', 'v0.7.8-dev');
defined('BONFIRE_VERSION') || define('BONFIRE_VERSION', 'v0.7.8');

// -----------------------------------------------------------------------------
// The 'App Area' allows you to specify the base folder used for all of the contexts
Expand Down
14 changes: 7 additions & 7 deletions bonfire/ci3/core/CodeIgniter.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2015, British Columbia Institute of Technology
* Copyright (c) 2014 - 2016, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -28,10 +28,10 @@
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link http://codeigniter.com
* @link https://codeigniter.com
* @since Version 1.0.0
* @filesource
*/
Expand All @@ -46,7 +46,7 @@
* @subpackage CodeIgniter
* @category Front-controller
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/
* @link https://codeigniter.com/user_guide/
*/

/**
Expand All @@ -55,7 +55,7 @@
* @var string
*
*/
define('CI_VERSION', '3.0.3');
define('CI_VERSION', '3.0.6');

/*
* ------------------------------------------------------
Expand Down Expand Up @@ -359,7 +359,7 @@
*
* Returns current CI instance object
*
* @return object
* @return CI_Controller
*/
function &get_instance()
{
Expand Down
104 changes: 52 additions & 52 deletions bonfire/ci3/core/Common.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2015, British Columbia Institute of Technology
* Copyright (c) 2014 - 2016, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -28,10 +28,10 @@
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link http://codeigniter.com
* @link https://codeigniter.com
* @since Version 1.0.0
* @filesource
*/
Expand All @@ -46,7 +46,7 @@
* @subpackage CodeIgniter
* @category Common Functions
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/
* @link https://codeigniter.com/user_guide/
*/

// ------------------------------------------------------------------------
Expand Down Expand Up @@ -519,53 +519,53 @@ function set_status_header($code = 200, $text = '')
if (empty($text))
{
is_int($code) OR $code = (int) $code;
$stati = array(
$stati = array(
100 => 'Continue',
101 => 'Switching Protocols',

200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
206 => 'Partial Content',

300 => 'Multiple Choices',
301 => 'Moved Permanently',
302 => 'Found',
303 => 'See Other',
304 => 'Not Modified',
305 => 'Use Proxy',
307 => 'Temporary Redirect',

400 => 'Bad Request',
401 => 'Unauthorized',
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
203 => 'Non-Authoritative Information',
204 => 'No Content',
205 => 'Reset Content',
206 => 'Partial Content',

300 => 'Multiple Choices',
301 => 'Moved Permanently',
302 => 'Found',
303 => 'See Other',
304 => 'Not Modified',
305 => 'Use Proxy',
307 => 'Temporary Redirect',

400 => 'Bad Request',
401 => 'Unauthorized',
402 => 'Payment Required',
403 => 'Forbidden',
404 => 'Not Found',
405 => 'Method Not Allowed',
406 => 'Not Acceptable',
407 => 'Proxy Authentication Required',
408 => 'Request Timeout',
409 => 'Conflict',
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed',
413 => 'Request Entity Too Large',
414 => 'Request-URI Too Long',
415 => 'Unsupported Media Type',
416 => 'Requested Range Not Satisfiable',
417 => 'Expectation Failed',
422 => 'Unprocessable Entity',

500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
503 => 'Service Unavailable',
504 => 'Gateway Timeout',
505 => 'HTTP Version Not Supported'
);
403 => 'Forbidden',
404 => 'Not Found',
405 => 'Method Not Allowed',
406 => 'Not Acceptable',
407 => 'Proxy Authentication Required',
408 => 'Request Timeout',
409 => 'Conflict',
410 => 'Gone',
411 => 'Length Required',
412 => 'Precondition Failed',
413 => 'Request Entity Too Large',
414 => 'Request-URI Too Long',
415 => 'Unsupported Media Type',
416 => 'Requested Range Not Satisfiable',
417 => 'Expectation Failed',
422 => 'Unprocessable Entity',

500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
503 => 'Service Unavailable',
504 => 'Gateway Timeout',
505 => 'HTTP Version Not Supported'
);

if (isset($stati[$code]))
{
Expand Down Expand Up @@ -759,10 +759,10 @@ function remove_invisible_characters($str, $url_encoded = TRUE)
*/
function html_escape($var, $double_encode = TRUE)
{
if (empty($var))
{
return $var;
}
if (empty($var))
{
return $var;
}

if (is_array($var))
{
Expand Down
68 changes: 55 additions & 13 deletions bonfire/ci3/core/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2015, British Columbia Institute of Technology
* Copyright (c) 2014 - 2016, British Columbia Institute of Technology
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand All @@ -28,10 +28,10 @@
*
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/)
* @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link http://codeigniter.com
* @link https://codeigniter.com
* @since Version 1.0.0
* @filesource
*/
Expand All @@ -46,7 +46,7 @@
* @subpackage Libraries
* @category Loader
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/libraries/loader.html
* @link https://codeigniter.com/user_guide/libraries/loader.html
*/
class CI_Loader {

Expand Down Expand Up @@ -285,13 +285,43 @@ public function model($model, $name = '', $db_conn = FALSE)
$this->database($db_conn, FALSE, TRUE);
}

// Note: All of the code under this condition used to be just:
//
// load_class('Model', 'core');
//
// However, load_class() instantiates classes
// to cache them for later use and that prevents
// MY_Model from being an abstract class and is
// sub-optimal otherwise anyway.
if ( ! class_exists('CI_Model', FALSE))
{
load_class('Model', 'core');
$app_path = APPPATH.'core'.DIRECTORY_SEPARATOR;
if (file_exists($app_path.'Model.php'))
{
require_once($app_path.'Model.php');
if ( ! class_exists('CI_Model', FALSE))
{
throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
}
}
elseif ( ! class_exists('CI_Model', FALSE))
{
require_once(BASEPATH.'core'.DIRECTORY_SEPARATOR.'Model.php');
}

$class = config_item('subclass_prefix').'Model';
if (file_exists($app_path.$class.'.php'))
{
require_once($app_path.$class.'.php');
if ( ! class_exists($class, FALSE))
{
throw new RuntimeException($app_path.$class.".php exists, but doesn't declare class ".$class);
}
}
}

$model = ucfirst($model);
if ( ! class_exists($model))
if ( ! class_exists($model, FALSE))
{
foreach ($this->_ci_model_paths as $mod_path)
{
Expand Down Expand Up @@ -696,9 +726,16 @@ public function driver($library, $params = NULL, $object_name = NULL)
{
if (is_array($library))
{
foreach ($library as $driver)
foreach ($library as $key => $value)
{
$this->driver($driver);
if (is_int($key))
{
$this->driver($value, $params);
}
else
{
$this->driver($key, $params, $value);
}
}

return $this;
Expand Down Expand Up @@ -907,6 +944,14 @@ protected function _ci_load($_ci_data)
*/
if (is_array($_ci_vars))
{
foreach (array_keys($_ci_vars) as $key)
{
if (strncmp($key, '_ci_', 4) === 0)
{
unset($_ci_vars[$key]);
}
}

$this->_ci_cached_vars = array_merge($this->_ci_cached_vars, $_ci_vars);
}
extract($this->_ci_cached_vars);
Expand Down Expand Up @@ -1312,10 +1357,7 @@ protected function _ci_autoloader()
// Autoload drivers
if (isset($autoload['drivers']))
{
foreach ($autoload['drivers'] as $item)
{
$this->driver($item);
}
$this->driver($autoload['drivers']);
}

// Load libraries
Expand Down
8 changes: 3 additions & 5 deletions bonfire/docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Change Log

## Under development
## Released versions

### 0.7.8
Upgraded CodeIgniter 2 to 2.2.6 (see the [2.2.6 Upgrade Notes](http://www.codeigniter.com/userguide2/installation/upgrade_226.html))
Upgraded CodeIgniter 3 to 3.0.3 (see the [3.0.3 Upgrade Notes](http://www.codeigniter.com/user_guide/installation/upgrade_303.html))
Upgraded CodeIgniter 2 to 2.2.6 (see the [2.2.6 Upgrade Notes](https://codeigniter.com/userguide2/installation/upgrade_226.html))
Upgraded CodeIgniter 3 to 3.0.6 (see the [3.0.6 Upgrade Notes](https://codeigniter.com/user_guide/installation/upgrade_306.html))

#### New Features:

Expand All @@ -17,8 +17,6 @@ Upgraded CodeIgniter 3 to 3.0.3 (see the [3.0.3 Upgrade Notes](http://www.codeig

#### Known Issues:

## Released versions

### 0.7.7
* Upgraded CodeIgniter 3 to 3.0.1
* Upgraded CodeIgniter 2 to 2.2.4
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ci-bonfire/bonfire",
"description": "Kickstart your CodeIgniter-based web application development.",
"version": "0.7.8-dev",
"version": "0.7.8",
"type": "project",
"homepage": "http://cibonfire.com",
"license": "MIT",
Expand Down

0 comments on commit dfa8db2

Please sign in to comment.