From f4a4bd8fac188ebc9cda822ffc811c218fd92b45 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Thu, 20 Oct 2011 12:18:42 -0500 Subject: adding new license file (OSL 3.0) and updating readme to ReST added notice of license to all source files. OSL to all except the few files we ship inside of the application folder, those are AFL. Updated license in user guide. incrementing next dev version to 3.0 due to licensing change --- system/helpers/download_helper.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 1145688ae..5f5d1aaf7 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -4,10 +4,22 @@ * * An open source application development framework for PHP 5.1.6 or newer * + * NOTICE OF LICENSE + * + * Licensed under the Open Software License version 3.0 + * + * This source file is subject to the Open Software License (OSL 3.0) that is + * bundled with this package in the files license.txt / license.rst. It is + * also available through the world wide web at this URL: + * http://opensource.org/licenses/OSL-3.0 + * If you did not receive a copy of the license and are unable to obtain it + * through the world wide web, please send an email to + * licensing@ellislab.com so we can send you a copy immediately. + * * @package CodeIgniter - * @author ExpressionEngine Dev Team - * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. - * @license http://codeigniter.com/user_guide/license.html + * @author EllisLab Dev Team + * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. (http://ellislab.com/) + * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 * @filesource @@ -21,7 +33,7 @@ * @package CodeIgniter * @subpackage Helpers * @category Helpers - * @author ExpressionEngine Dev Team + * @author EllisLab Dev Team * @link http://codeigniter.com/user_guide/helpers/download_helper.html */ -- cgit v1.2.3-24-g4f1b From 5c1aa631c5f5ec2f6b75ba1158178418e50ba11a Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Sun, 25 Dec 2011 01:24:29 -0600 Subject: Abstracting the loading of files in the config directory depending on environments. --- system/helpers/download_helper.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 5f5d1aaf7..3173c9840 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -70,14 +70,7 @@ if ( ! function_exists('force_download')) $extension = end($x); // Load the mime types - if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) - { - include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); - } - elseif (is_file(APPPATH.'config/mimes.php')) - { - include(APPPATH.'config/mimes.php'); - } + load_environ_config('mimes'); // Set a default mime if we can't find it if ( ! isset($mimes[$extension])) -- cgit v1.2.3-24-g4f1b From d96f88277c1e9a4c069c2e2ee3d779385549f31a Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Tue, 27 Dec 2011 16:23:47 -0600 Subject: Revert "Abstracting the loading of files in the config directory depending on environments." This reverts commit 5c1aa631c5f5ec2f6b75ba1158178418e50ba11a. --- system/helpers/download_helper.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 3173c9840..5f5d1aaf7 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -70,7 +70,14 @@ if ( ! function_exists('force_download')) $extension = end($x); // Load the mime types - load_environ_config('mimes'); + if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) + { + include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); + } + elseif (is_file(APPPATH.'config/mimes.php')) + { + include(APPPATH.'config/mimes.php'); + } // Set a default mime if we can't find it if ( ! isset($mimes[$extension])) -- cgit v1.2.3-24-g4f1b From 0defe5d33ee2633f377a109519ca818becc60f64 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Sun, 1 Jan 2012 18:46:41 -0600 Subject: Updating copyright date to 2012 --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 5f5d1aaf7..4a1a79cc3 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -18,7 +18,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/) * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 -- cgit v1.2.3-24-g4f1b From 0e4d2b652ec4b0027b188a7aa84a9862b968f780 Mon Sep 17 00:00:00 2001 From: Eric Roberts Date: Mon, 23 Jan 2012 18:19:20 -0600 Subject: Fix bug #195 Fixes bug #195 regarding non-existent user agent strings when using force_download() helper. --- system/helpers/download_helper.php | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 4a1a79cc3..aea948d81 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -88,26 +88,20 @@ if ( ! function_exists('force_download')) { $mime = (is_array($mimes[$extension])) ? $mimes[$extension][0] : $mimes[$extension]; } - + // Generate the server headers - if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") !== FALSE) + header('Content-Type: "'.$mime.'"'); + header('Content-Disposition: attachment; filename="'.$filename.'"'); + header('Expires: 0'); + header("Content-Transfer-Encoding: binary"); + header("Content-Length: ".strlen($data)); + header('Pragma: no-cache'); + + // Internet Explorer-specific headers. + if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") !== FALSE) { - header('Content-Type: "'.$mime.'"'); - header('Content-Disposition: attachment; filename="'.$filename.'"'); - header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header("Content-Transfer-Encoding: binary"); header('Pragma: public'); - header("Content-Length: ".strlen($data)); - } - else - { - header('Content-Type: "'.$mime.'"'); - header('Content-Disposition: attachment; filename="'.$filename.'"'); - header("Content-Transfer-Encoding: binary"); - header('Expires: 0'); - header('Pragma: no-cache'); - header("Content-Length: ".strlen($data)); } exit($data); -- cgit v1.2.3-24-g4f1b From b38c5dd95644ed73166df34084041cee0efd7d23 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 29 Feb 2012 14:07:45 +0200 Subject: Add an optional set_mime parameter to force_download() --- system/helpers/download_helper.php | 80 +++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 39 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index aea948d81..34380cc88 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -1,13 +1,13 @@ - Date: Wed, 29 Feb 2012 19:02:46 +0200 Subject: Change end() usage due to E_STRICT messages --- system/helpers/download_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 34380cc88..a8c59c2c0 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -70,7 +70,8 @@ if ( ! function_exists('force_download')) return FALSE; } - $extension = end(explode('.', $filename)); + $extension = explode('.', $filename); + $extension = end($extension); // Load the mime types if (defined('ENVIRONMENT') && is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) -- cgit v1.2.3-24-g4f1b From 07c1ac830b4e98aa40f48baef3dd05fb68c0a836 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Fri, 9 Mar 2012 17:03:37 +0000 Subject: Bumped CodeIgniter's PHP requirement to 5.2.4. Yes I know PHP 5.4 just came out, and yes I know PHP 5.3 has lovely features, but there are plenty of corporate systems running on CodeIgniter and PHP 5.3 still is not widely supported enough. CodeIgniter is great for distributed applications, and this is the highest we can reasonably go without breaking support. PHP 5.3 will most likely happen in another year or so. Fingers crossed on that one anyway... --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a8c59c2c0..47d55dbf5 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -2,7 +2,7 @@ /** * CodeIgniter * - * An open source application development framework for PHP 5.1.6 or newer + * An open source application development framework for PHP 5.2.4 or newer * * NOTICE OF LICENSE * -- cgit v1.2.3-24-g4f1b From 4da9478ca00a9316c525b71001e0c6260d7d85fa Mon Sep 17 00:00:00 2001 From: dododedodonl Date: Sat, 10 Mar 2012 13:56:17 +0100 Subject: Removed quotes from the Content-Type header to support mime-type detection on android --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 47d55dbf5..f3f0ff2ca 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -91,7 +91,7 @@ if ( ! function_exists('force_download')) } // Generate the server headers - header('Content-Type: "'.$mime.'"'); + header('Content-Type: '.$mime); header('Content-Disposition: attachment; filename="'.$filename.'"'); header('Expires: 0'); header('Content-Transfer-Encoding: binary'); -- cgit v1.2.3-24-g4f1b From fce2ed6d1d3026c485e79ce5bf236effc67981be Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 11 Mar 2012 22:04:48 +0200 Subject: Added an Android <= 2.1 specific check to force_download() --- system/helpers/download_helper.php | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index f3f0ff2ca..34f9bc07d 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -60,19 +60,19 @@ if ( ! function_exists('force_download')) // Set the default MIME type to send $mime = 'application/octet-stream'; + $x = explode('.', $filename); + $extension = end($x); + if ($set_mime === TRUE) { - /* If we're going to detect the MIME type, - * we'll need a file extension. - */ - if (FALSE === strpos($filename, '.')) + if (count($x) === 1 OR $extension === '') { + /* If we're going to detect the MIME type, + * we'll need a file extension. + */ return FALSE; } - $extension = explode('.', $filename); - $extension = end($extension); - // Load the mime types if (defined('ENVIRONMENT') && is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) { @@ -90,6 +90,18 @@ if ( ! function_exists('force_download')) } } + /* It was reported that browsers on Android 2.1 (and possibly older as well) + * need to have the filename extension upper-cased in order to be able to + * download it. + * + * Reference: http://digiblog.de/2011/04/19/android-and-the-download-file-headers/ + */ + if (count($x) !== 1 && isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/Android\s(1|2\.[12])/', $_SERVER['HTTP_USER_AGENT'])) + { + $x[count($x) - 1] = strtoupper($extension); + $filename = implode('.', $x); + } + // Generate the server headers header('Content-Type: '.$mime); header('Content-Disposition: attachment; filename="'.$filename.'"'); -- cgit v1.2.3-24-g4f1b From 3d933b6fad72d4b92f18187dd57f1d3c35f8936a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 11 Mar 2012 22:08:57 +0200 Subject: Fix erroneus regex from previous commit --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 34f9bc07d..96ff29dec 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -96,7 +96,7 @@ if ( ! function_exists('force_download')) * * Reference: http://digiblog.de/2011/04/19/android-and-the-download-file-headers/ */ - if (count($x) !== 1 && isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/Android\s(1|2\.[12])/', $_SERVER['HTTP_USER_AGENT'])) + if (count($x) !== 1 && isset($_SERVER['HTTP_USER_AGENT']) && preg_match('/Android\s(1|2\.[01])/', $_SERVER['HTTP_USER_AGENT'])) { $x[count($x) - 1] = strtoupper($extension); $filename = implode('.', $x); -- cgit v1.2.3-24-g4f1b From 627e172fd3ada0fc2b648a3fff10af4a0022378f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 26 Mar 2012 20:53:47 +0300 Subject: Remove access description lines and cleanup the download, language, number, path & xml helpers --- system/helpers/download_helper.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 96ff29dec..19192a147 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -42,7 +42,6 @@ * * Generates headers that force a download to happen * - * @access public * @param string filename * @param mixed the data to be downloaded * @param bool wether to try and send the actual file MIME type @@ -125,4 +124,4 @@ if ( ! function_exists('force_download')) } /* End of file download_helper.php */ -/* Location: ./system/helpers/download_helper.php */ +/* Location: ./system/helpers/download_helper.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From d52e3b19eb03bcd38f89ccbf5aae68364f715343 Mon Sep 17 00:00:00 2001 From: Sam Li Date: Mon, 23 Apr 2012 23:04:35 +0800 Subject: Added fix for issue: https://github.com/EllisLab/CodeIgniter/issues/1277 --- system/helpers/download_helper.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 19192a147..18fe96223 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -100,6 +100,9 @@ if ( ! function_exists('force_download')) $x[count($x) - 1] = strtoupper($extension); $filename = implode('.', $x); } + + //Clean output buffer + ob_clean(); // Generate the server headers header('Content-Type: '.$mime); -- cgit v1.2.3-24-g4f1b From bbd9dd3df9d373fbac8560db926a9f70a5bde3b7 Mon Sep 17 00:00:00 2001 From: Sam Li Date: Mon, 23 Apr 2012 23:13:46 +0800 Subject: Tweak to comments to conform to style guide. --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 18fe96223..8b87f8179 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -101,7 +101,7 @@ if ( ! function_exists('force_download')) $filename = implode('.', $x); } - //Clean output buffer + // Clean output buffer ob_clean(); // Generate the server headers -- cgit v1.2.3-24-g4f1b From 01b129a42b62fd08cd873f44ded026041b560420 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Fri, 27 Apr 2012 11:36:50 -0400 Subject: Fix docblocks A-H --- system/helpers/download_helper.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 8b87f8179..97e6986b0 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -37,18 +37,18 @@ // ------------------------------------------------------------------------ -/** - * Force Download - * - * Generates headers that force a download to happen - * - * @param string filename - * @param mixed the data to be downloaded - * @param bool wether to try and send the actual file MIME type - * @return void - */ if ( ! function_exists('force_download')) { + /** + * Force Download + * + * Generates headers that force a download to happen + * + * @param string filename + * @param mixed the data to be downloaded + * @param bool wether to try and send the actual file MIME type + * @return void + */ function force_download($filename = '', $data = '', $set_mime = FALSE) { if ($filename == '' OR $data == '') -- cgit v1.2.3-24-g4f1b From ae31eb5e75d914fc3ab622a7ac5c23eb1e6d9f9a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 17 May 2012 14:54:15 +0300 Subject: Clean up the helpers --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 97e6986b0..470b61ede 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -100,7 +100,7 @@ if ( ! function_exists('force_download')) $x[count($x) - 1] = strtoupper($extension); $filename = implode('.', $x); } - + // Clean output buffer ob_clean(); -- cgit v1.2.3-24-g4f1b From 773ccc318f2769c9b7579630569b5d8ba47b114b Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:11:08 +0100 Subject: Replaced `==` with `===` and `!=` with `!==` in /system/helpers --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 470b61ede..9c390a7f7 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -51,7 +51,7 @@ if ( ! function_exists('force_download')) */ function force_download($filename = '', $data = '', $set_mime = FALSE) { - if ($filename == '' OR $data == '') + if ($filename === '' OR $data === '') { return FALSE; } -- cgit v1.2.3-24-g4f1b From 39b1c11f5976104dce30fe83e1d3c6f9ed616122 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Mon, 4 Jun 2012 16:51:14 -0500 Subject: Direct return from mimes config, instead of using global $mimes; Global variables are generally a terrible idea, especially for something as simple as this. The mimes.php now returns an array instead of just injecting a variable name into the global namespace. --- system/helpers/download_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 9c390a7f7..3c677055f 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -75,11 +75,11 @@ if ( ! function_exists('force_download')) // Load the mime types if (defined('ENVIRONMENT') && is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) { - include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); + $mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); } elseif (is_file(APPPATH.'config/mimes.php')) { - include(APPPATH.'config/mimes.php'); + $mimes = include(APPPATH.'config/mimes.php'); } // Only change the default MIME if we can find one -- cgit v1.2.3-24-g4f1b From 6ef498b49946ba74d610b3805fb908b163a7f03a Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 5 Jun 2012 22:01:58 +0300 Subject: Added get_mimes() function to system/core/Commons.php.The MIMEs array from config/mimes.php is used by multiple core classes, libraries and helpers and each of them has implemented an own way of getting it, which is not needed and is hard to maintain. This also fixes issue #1411 --- system/helpers/download_helper.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 3c677055f..5efbc4930 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -73,14 +73,7 @@ if ( ! function_exists('force_download')) } // Load the mime types - if (defined('ENVIRONMENT') && is_file(APPPATH.'config/'.ENVIRONMENT.'/mimes.php')) - { - $mimes = include(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'); - } - elseif (is_file(APPPATH.'config/mimes.php')) - { - $mimes = include(APPPATH.'config/mimes.php'); - } + $mimes =& get_mimes(); // Only change the default MIME if we can find one if (isset($mimes[$extension])) -- cgit v1.2.3-24-g4f1b From f512b73bc78760198a5409f2c4da71fe749b1301 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 16 Jun 2012 11:15:19 +0100 Subject: Spelling fixes - `wether` to `whether` Interestingly `wether` means a castrated ram in old English --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 5efbc4930..09c4de578 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -46,7 +46,7 @@ if ( ! function_exists('force_download')) * * @param string filename * @param mixed the data to be downloaded - * @param bool wether to try and send the actual file MIME type + * @param bool whether to try and send the actual file MIME type * @return void */ function force_download($filename = '', $data = '', $set_mime = FALSE) -- cgit v1.2.3-24-g4f1b From 28ff29272f4ac6815354878534493016ca31582a Mon Sep 17 00:00:00 2001 From: Michiel Vugteveen Date: Tue, 14 Aug 2012 10:55:46 +0200 Subject: fix issue 1706 --- system/helpers/download_helper.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 09c4de578..0232adfe4 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -95,7 +95,10 @@ if ( ! function_exists('force_download')) } // Clean output buffer - ob_clean(); + if (ob_get_level() !== 0) + { + ob_clean(); + } // Generate the server headers header('Content-Type: '.$mime); -- cgit v1.2.3-24-g4f1b From d87f6bf028e4ab5cd787c8915ea39c3946e338ae Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 24 Oct 2012 22:12:53 +0300 Subject: Fix #1146 --- system/helpers/download_helper.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 0232adfe4..2c26a36d5 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -110,14 +110,11 @@ if ( ! function_exists('force_download')) // Internet Explorer-specific headers if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) { - header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); - header('Pragma: public'); - } - else - { - header('Pragma: no-cache'); + header('Cache-Control: no-cache, no-store, must-revalidate'); } + header('Pragma: no-cache'); + exit($data); } } -- cgit v1.2.3-24-g4f1b From c5536aac5752054f7f76e448d58b86407d8f574e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 1 Nov 2012 17:33:58 +0200 Subject: Manually apply PR #1594 (fixing phpdoc page-level generation/warnings) Also partially fixes issue #1295, fixes inconsistencies in some page-level docblocks and adds include checks in language files. --- system/helpers/download_helper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 2c26a36d5..8fe66e222 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -1,4 +1,4 @@ - Date: Thu, 22 Nov 2012 16:57:23 +0200 Subject: Added support for stream-like downloads of existing files to force_download() Based on code/ideas from PR #365, #1254 --- system/helpers/download_helper.php | 41 +++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 8fe66e222..31652d53e 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -56,6 +56,23 @@ if ( ! function_exists('force_download')) { return FALSE; } + elseif ($data === NULL) + { + if (@is_file($filename) && @file_exists($filename) && ($filesize = @filesize($filename)) !== FALSE) + { + $filepath = $filename; + $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); + $filename = end($filename); + } + else + { + return FALSE; + } + } + else + { + $filesize = strlen($data); + } // Set the default MIME type to send $mime = 'application/octet-stream'; @@ -95,8 +112,13 @@ if ( ! function_exists('force_download')) $filename = implode('.', $x); } + if ($data === NULL && ($fp = @fopen($filepath, 'rb')) === FALSE) + { + return FALSE; + } + // Clean output buffer - if (ob_get_level() !== 0) + if (ob_get_level() !== 0 && @ob_end_clean() === FALSE) { ob_clean(); } @@ -106,7 +128,7 @@ if ( ! function_exists('force_download')) header('Content-Disposition: attachment; filename="'.$filename.'"'); header('Expires: 0'); header('Content-Transfer-Encoding: binary'); - header('Content-Length: '.strlen($data)); + header('Content-Length: '.$filesize); // Internet Explorer-specific headers if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) @@ -116,7 +138,20 @@ if ( ! function_exists('force_download')) header('Pragma: no-cache'); - exit($data); + // If we have raw data - just dump it + if ($data !== NULL) + { + exit($data); + } + + // Flush 1MB chunks of data + while ( ! feof($fp) && ($data = fread($fp, 1048576)) !== FALSE) + { + echo $data; + } + + fclose($fp); + exit; } } -- cgit v1.2.3-24-g4f1b From 80500afbd188600212ca913a7bac073009feac73 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 1 Jan 2013 08:16:53 +0200 Subject: [ci skip] Happy new year --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 31652d53e..7294d50c5 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -18,7 +18,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/) * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 -- cgit v1.2.3-24-g4f1b From 0687911229be13e100724dbf8b15b95146b591a9 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 29 Jan 2013 15:05:02 +0200 Subject: Replace is_file() with the faster file_exists() (where it makes sense) Also: - Implemented caching of configuration arrays for smileys, foreign characters and doctypes. - Implemented cascading-style loading of configuration files (except for library configs, DB and constants.php). --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 7294d50c5..4fe6a0e88 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -58,7 +58,7 @@ if ( ! function_exists('force_download')) } elseif ($data === NULL) { - if (@is_file($filename) && @file_exists($filename) && ($filesize = @filesize($filename)) !== FALSE) + if (@is_file($filename) && ($filesize = @filesize($filename)) !== FALSE) { $filepath = $filename; $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); -- cgit v1.2.3-24-g4f1b From 88d16d7b97ebed83d6a1d1bda9c674546c9adc28 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Jan 2014 12:28:42 +0200 Subject: Fix #2845 --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 4fe6a0e88..9a6f684e4 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -120,7 +120,7 @@ if ( ! function_exists('force_download')) // Clean output buffer if (ob_get_level() !== 0 && @ob_end_clean() === FALSE) { - ob_clean(); + @ob_clean(); } // Generate the server headers -- cgit v1.2.3-24-g4f1b From 871754af60251993d640981e107d2def5f2db396 Mon Sep 17 00:00:00 2001 From: darwinel Date: Tue, 11 Feb 2014 17:34:57 +0100 Subject: 2013 > 2014 Update copyright notices from 2013 to 2014. And update one calendar example in user_guide from year 2013/2014 to 2014/2015. --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 9a6f684e4..ffe5ff997 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -18,7 +18,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2013, EllisLab, Inc. (http://ellislab.com/) + * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * @link http://codeigniter.com * @since Version 1.0 -- cgit v1.2.3-24-g4f1b From bdb96ca1b1dbfc1791172fd169d7751cbc4d7d55 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 28 Oct 2014 00:13:31 +0200 Subject: [ci skip] Switch to MIT license; close #3293 --- system/helpers/download_helper.php | 39 ++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index ffe5ff997..76652bb8b 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -4,24 +4,35 @@ * * An open source application development framework for PHP 5.2.4 or newer * - * NOTICE OF LICENSE + * This content is released under the MIT License (MIT) * - * Licensed under the Open Software License version 3.0 + * Copyright (c) 2014, British Columbia Institute of Technology * - * This source file is subject to the Open Software License (OSL 3.0) that is - * bundled with this package in the files license.txt / license.rst. It is - * also available through the world wide web at this URL: - * http://opensource.org/licenses/OSL-3.0 - * If you did not receive a copy of the license and are unable to obtain it - * through the world wide web, please send an email to - * licensing@ellislab.com so we can send you a copy immediately. + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: * - * @package CodeIgniter - * @author EllisLab Dev Team + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + * + * @package CodeIgniter + * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) - * @link http://codeigniter.com - * @since Version 1.0 + * @copyright Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/) + * @license http://opensource.org/licenses/MIT MIT License + * @link http://codeigniter.com + * @since Version 1.0.0 * @filesource */ defined('BASEPATH') OR exit('No direct script access allowed'); -- cgit v1.2.3-24-g4f1b From fe9309d22c1b088f5363954d6dac013c8c955894 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 9 Jan 2015 17:48:58 +0200 Subject: Bulk (mostly documentation) update - Remove PHP version from license notices - Bump year number in copyright notices - Recommend PHP 5.4 or newer to be used - Tell Travis-CI to test on PHP 5.3.0 instead of the latest 5.3 version Related: #3450 --- system/helpers/download_helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 76652bb8b..a781a0c02 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -2,11 +2,11 @@ /** * CodeIgniter * - * An open source application development framework for PHP 5.2.4 or newer + * An open source application development framework for PHP * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014, British Columbia Institute of Technology + * Copyright (c) 2014 - 2015, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) - * @copyright Copyright (c) 2014, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 -- cgit v1.2.3-24-g4f1b From 4cbe463b4c442e0e2dae2f43565e77f7ac5ecb86 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Wed, 21 Jan 2015 22:56:22 +0100 Subject: Remove closing blocks at end of PHP files --- system/helpers/download_helper.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a781a0c02..379120552 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -165,6 +165,3 @@ if ( ! function_exists('force_download')) exit; } } - -/* End of file download_helper.php */ -/* Location: ./system/helpers/download_helper.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 1fb500077784638399be79b32fe354aec257413c Mon Sep 17 00:00:00 2001 From: Gabriel Potkány Date: Wed, 4 Feb 2015 01:45:59 +0100 Subject: Fixed inconsistent return types --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 379120552..2710a4ac7 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -59,7 +59,7 @@ if ( ! function_exists('force_download')) * @param string filename * @param mixed the data to be downloaded * @param bool whether to try and send the actual file MIME type - * @return void + * @return bool */ function force_download($filename = '', $data = '', $set_mime = FALSE) { -- cgit v1.2.3-24-g4f1b From cea5fb713822d00460222deaa1cf66543effccf8 Mon Sep 17 00:00:00 2001 From: Gabriel Potkány Date: Wed, 4 Feb 2015 08:22:06 +0100 Subject: Adjusted returns/return types to suggestions --- system/helpers/download_helper.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 2710a4ac7..95c94a1b8 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -59,13 +59,13 @@ if ( ! function_exists('force_download')) * @param string filename * @param mixed the data to be downloaded * @param bool whether to try and send the actual file MIME type - * @return bool + * @return void */ function force_download($filename = '', $data = '', $set_mime = FALSE) { if ($filename === '' OR $data === '') { - return FALSE; + return; } elseif ($data === NULL) { @@ -77,7 +77,7 @@ if ( ! function_exists('force_download')) } else { - return FALSE; + return; } } else @@ -98,7 +98,7 @@ if ( ! function_exists('force_download')) /* If we're going to detect the MIME type, * we'll need a file extension. */ - return FALSE; + return; } // Load the mime types @@ -125,7 +125,7 @@ if ( ! function_exists('force_download')) if ($data === NULL && ($fp = @fopen($filepath, 'rb')) === FALSE) { - return FALSE; + return; } // Clean output buffer -- cgit v1.2.3-24-g4f1b From 15e2df7424c369ec7ff93676a8b01fa199f04a95 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Fri, 17 Jul 2015 13:56:49 +0300 Subject: [ci skip] Fix #3778 --- system/helpers/download_helper.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 95c94a1b8..73f6456c4 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -69,16 +69,14 @@ if ( ! function_exists('force_download')) } elseif ($data === NULL) { - if (@is_file($filename) && ($filesize = @filesize($filename)) !== FALSE) - { - $filepath = $filename; - $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); - $filename = end($filename); - } - else + if ( ! @is_file($filename) OR ($filesize = @filesize($filename)) === FALSE) { return; } + + $filepath = $filename; + $filename = explode('/', str_replace(DIRECTORY_SEPARATOR, '/', $filename)); + $filename = end($filename); } else { @@ -140,14 +138,7 @@ if ( ! function_exists('force_download')) header('Expires: 0'); header('Content-Transfer-Encoding: binary'); header('Content-Length: '.$filesize); - - // Internet Explorer-specific headers - if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== FALSE) - { - header('Cache-Control: no-cache, no-store, must-revalidate'); - } - - header('Pragma: no-cache'); + header('Cache-Control: private, no-transform, no-store, must-revalidate'); // If we have raw data - just dump it if ($data !== NULL) -- cgit v1.2.3-24-g4f1b From 125ef4751080a2118cb203357d77687699e3eb25 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:33:00 +0200 Subject: [ci skip] Bump year to 2016 --- system/helpers/download_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index 73f6456c4..a005c91ef 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -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 @@ -29,7 +29,7 @@ * @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) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) * @license http://opensource.org/licenses/MIT MIT License * @link http://codeigniter.com * @since Version 1.0.0 -- cgit v1.2.3-24-g4f1b From bd202c91b0e9cf0a8c93bcaa71df9574f5909346 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:50:18 +0200 Subject: [ci skip] Update codeigniter.com links to https --- system/helpers/download_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a005c91ef..c2362540e 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://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 */ @@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Helpers * @category Helpers * @author EllisLab Dev Team - * @link http://codeigniter.com/user_guide/helpers/download_helper.html + * @link https://codeigniter.com/user_guide/helpers/download_helper.html */ // ------------------------------------------------------------------------ -- cgit v1.2.3-24-g4f1b From 1924e879b165fb119847a49a7a5eab2f28295fa2 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 11 Jan 2016 12:55:34 +0200 Subject: [ci skip] Update ellislab.com links to https too --- system/helpers/download_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index c2362540e..a6463dfd7 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -28,7 +28,7 @@ * * @package CodeIgniter * @author EllisLab Dev Team - * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) + * @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 https://codeigniter.com -- cgit v1.2.3-24-g4f1b From da60e9bc66ec90970fbd2dfd08b0a6e66b9f5f5f Mon Sep 17 00:00:00 2001 From: Master Yoda Date: Sat, 31 Dec 2016 08:46:18 -0800 Subject: Update copyright data to 2017 --- system/helpers/download_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system/helpers/download_helper.php') diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php index a6463dfd7..b2a1458de 100644 --- a/system/helpers/download_helper.php +++ b/system/helpers/download_helper.php @@ -6,7 +6,7 @@ * * This content is released under the MIT License (MIT) * - * Copyright (c) 2014 - 2016, British Columbia Institute of Technology + * Copyright (c) 2014 - 2017, 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 @@ -29,7 +29,7 @@ * @package CodeIgniter * @author EllisLab Dev Team * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (https://ellislab.com/) - * @copyright Copyright (c) 2014 - 2016, British Columbia Institute of Technology (http://bcit.ca/) + * @copyright Copyright (c) 2014 - 2017, 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 -- cgit v1.2.3-24-g4f1b