Skip to content

Commit

Permalink
Merge pull request lonnieezell#1300 from Reconix/develop
Browse files Browse the repository at this point in the history
CI3 core Updates & Fixes 3.1.9
  • Loading branch information
lonnieezell authored Jul 13, 2018
2 parents 54f1dda + 3a2b221 commit 154aa0d
Show file tree
Hide file tree
Showing 172 changed files with 653 additions and 504 deletions.
4 changes: 2 additions & 2 deletions bonfire/ci3/core/Benchmark.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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down
27 changes: 14 additions & 13 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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand All @@ -55,7 +55,7 @@
* @var string
*
*/
const CI_VERSION = '3.1.6';
const CI_VERSION = '3.1.9';

/*
* ------------------------------------------------------
Expand Down Expand Up @@ -402,22 +402,23 @@ function &get_instance()
$class = ucfirst($RTR->class);
$method = $RTR->method;

if (empty($class) OR (! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php')
if (empty($class) OR (! file_exists(APPPATH.'controllers/'.$RTR->directory.$class.'.php')
&& ! file_exists(BFPATH.'controllers/'.$RTR->directory.$class.'.php'))
)
)
{
$e404 = TRUE;
}
else
{
if (file_exists(APPPATH . 'controllers/' . $RTR->directory . $class . '.php'))
{
require_once(APPPATH . 'controllers/' . $RTR->directory . $class . '.php');
}
elseif (file_exists(BFPATH . 'controllers/' . $RTR->directory . $class . '.php'))
{
require_once(BFPATH . 'controllers/' . $RTR->directory . $class . '.php');
}

if (file_exists(APPPATH . 'controllers/' . $RTR->directory . $class . '.php'))
{
require_once(APPPATH . 'controllers/' . $RTR->directory . $class . '.php');
}
elseif (file_exists(BFPATH . 'controllers/' . $RTR->directory . $class . '.php'))
{
require_once(BFPATH . 'controllers/' . $RTR->directory . $class . '.php');
}

if ( ! class_exists($class, FALSE) OR $method[0] === '_' OR method_exists('CI_Controller', $method))
{
Expand Down
29 changes: 12 additions & 17 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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down Expand Up @@ -168,18 +168,18 @@ function &load_class($class, $directory = 'libraries', $param = NULL)
}
}

// Search in the Bonfire folder first for class extensions.
// Note that these classes will have a BF_ prefix, instead of the subclass
// prefix (MY_) to allow for graceful extending of child classes in the
// application.
if (file_exists(BFPATH . $directory . '/BF_' . $class . '.php'))
// Search in the Bonfire folder first for class extensions.
// Note that these classes will have a BF_ prefix, instead of the subclass
// prefix (MY_) to allow for graceful extending of child classes in the
// application.
if (file_exists(BFPATH . $directory . '/BF_' . $class . '.php'))
{
$name = 'BF_' . $class;
if (class_exists($name, FALSE) === FALSE)
{
$name = 'BF_' . $class;
if (class_exists($name, FALSE) === FALSE)
{
require_once(BFPATH . $directory . '/BF_' . $class . '.php');
}
require_once(BFPATH . $directory . '/BF_' . $class . '.php');
}
}

// Is the request a class extension? If so we load it too
if (file_exists(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php'))
Expand Down Expand Up @@ -420,11 +420,6 @@ function show_error($message, $status_code = 500, $heading = 'An Error Was Encou
if ($status_code < 100)
{
$exit_status = $status_code + 9; // 9 is EXIT__AUTO_MIN
if ($exit_status > 125) // 125 is EXIT__AUTO_MAX
{
$exit_status = 1; // EXIT_ERROR
}

$status_code = 500;
}
else
Expand Down
4 changes: 2 additions & 2 deletions bonfire/ci3/core/Config.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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions bonfire/ci3/core/Controller.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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions bonfire/ci3/core/Exceptions.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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down
4 changes: 2 additions & 2 deletions bonfire/ci3/core/Hooks.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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down
6 changes: 3 additions & 3 deletions bonfire/ci3/core/Input.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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down Expand Up @@ -137,7 +137,7 @@ class CI_Input {
*/
public function __construct()
{
$this->_allow_get_array = (config_item('allow_get_array') === TRUE);
$this->_allow_get_array = (config_item('allow_get_array') !== FALSE);
$this->_enable_xss = (config_item('global_xss_filtering') === TRUE);
$this->_enable_csrf = (config_item('csrf_protection') === TRUE);
$this->_standardize_newlines = (bool) config_item('standardize_newlines');
Expand Down
4 changes: 2 additions & 2 deletions bonfire/ci3/core/Lang.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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down
26 changes: 16 additions & 10 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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down Expand Up @@ -226,7 +226,7 @@ public function library($library, $params = NULL, $object_name = NULL)
*
* Loads and instantiates models.
*
* @param string $model Model name
* @param mixed $model Model name
* @param string $name An optional object name to assign to
* @param bool $db_conn An optional database connection configuration to initialize
* @return object
Expand Down Expand Up @@ -303,6 +303,8 @@ public function model($model, $name = '', $db_conn = FALSE)
{
throw new RuntimeException($app_path."Model.php exists, but doesn't declare class CI_Model");
}

log_message('info', 'CI_Model class loaded');
}
elseif ( ! class_exists('CI_Model', FALSE))
{
Expand All @@ -317,6 +319,8 @@ public function model($model, $name = '', $db_conn = FALSE)
{
throw new RuntimeException($app_path.$class.".php exists, but doesn't declare class ".$class);
}

log_message('info', config_item('subclass_prefix').'Model class loaded');
}
}

Expand Down Expand Up @@ -350,7 +354,9 @@ public function model($model, $name = '', $db_conn = FALSE)
}

$this->_ci_models[] = $name;
$CI->$name = new $model();
$model = new $model();
$CI->$name = $model;
log_message('info', 'Model "'.get_class($model).'" initialized');
return $this;
}

Expand Down Expand Up @@ -610,12 +616,12 @@ public function helper($helpers = array())
}
}

// Look for Bonfire helper extension.
if (file_exists(BFPATH . "helpers/BF_{$helper}.php"))
{
include_once(BFPATH . "helpers/BF_{$helper}.php");
$ext_loaded = TRUE;
}
// Look for Bonfire helper extension.
if (file_exists(BFPATH . "helpers/BF_{$helper}.php"))
{
include_once(BFPATH . "helpers/BF_{$helper}.php");
$ext_loaded = TRUE;
}

// If we have loaded extensions - check if the base one is here
if ($ext_loaded === TRUE)
Expand Down
4 changes: 2 additions & 2 deletions bonfire/ci3/core/Log.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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand Down
12 changes: 4 additions & 8 deletions bonfire/ci3/core/Model.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 - 2017, British Columbia Institute of Technology
* Copyright (c) 2014 - 2018, 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 @@ -29,7 +29,7 @@
* @package CodeIgniter
* @author EllisLab Dev Team
* @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/)
* @copyright Copyright (c) 2014 - 2017, British Columbia Institute of Technology (http://bcit.ca/)
* @copyright Copyright (c) 2014 - 2018, British Columbia Institute of Technology (http://bcit.ca/)
* @license http://opensource.org/licenses/MIT MIT License
* @link https://codeigniter.com
* @since Version 1.0.0
Expand All @@ -51,14 +51,10 @@ class CI_Model {
/**
* Class constructor
*
* @link https://github.com/bcit-ci/CodeIgniter/issues/5332
* @return void
*/
public function __construct()
{
log_message('info', 'Model Class Initialized');
}

// --------------------------------------------------------------------
public function __construct() {}

/**
* __get magic
Expand Down
Loading

0 comments on commit 154aa0d

Please sign in to comment.