From 10cba784a8556c8e2f254037876f4f0824b1bf36 Mon Sep 17 00:00:00 2001 From: mwhitneysdsu Date: Mon, 10 Aug 2015 09:50:01 -0700 Subject: [PATCH] Config updates for CI 3.0.1 --- application/config/application.php | 15 +- application/config/autoload.php | 21 +-- application/config/config.php | 46 +++--- application/config/constants.php | 4 +- application/config/database.php | 3 +- application/config/events.php | 2 +- application/config/foreign_chars.php | 1 + application/config/hooks.php | 28 ++-- application/config/migration.php | 6 +- application/config/mimes.php | 9 +- application/config/smileys.php | 1 - application/config/user_agents.php | 233 ++++++++++++++------------- bonfire/docs/upgrade/083.md | 14 ++ 13 files changed, 203 insertions(+), 180 deletions(-) diff --git a/application/config/application.php b/application/config/application.php index dea0c54cf..02137e066 100644 --- a/application/config/application.php +++ b/application/config/application.php @@ -3,11 +3,11 @@ * Bonfire * * An open source project to allow developers to jumpstart their development of - * CodeIgniter applications + * CodeIgniter applications. * * @package Bonfire * @author Bonfire Dev Team - * @copyright Copyright (c) 2011 - 2014, Bonfire Dev Team + * @copyright Copyright (c) 2011 - 2015, Bonfire Dev Team * @license http://opensource.org/licenses/MIT The MIT License * @link http://cibonfire.com * @since Version 1.0 @@ -19,16 +19,15 @@ */ $config['site.default_user_timezone'] = 'UM8'; -//-------------------------------------------------------------------- +//------------------------------------------------------------------------------ // Module Locations -//-------------------------------------------------------------------- -// These paths are checked in the order listed whenever a module is -// attempting to be located, whether it's loading a library, helper, -// or routes file. +//------------------------------------------------------------------------------ +// These paths are checked in the order listed when attempting to locate a module, +// whether loading a library, helper, or routes file. // $config['modules_locations'] = array( realpath(APPPATH) . '/modules/' => '../../application/modules/', - realpath(APPPATH . '../bonfire') . '/modules/' => '../../bonfire/modules/', + realpath(BFPATH) . '/modules/' => '../../bonfire/modules/', ); //------------------------------------------------------------------------------ diff --git a/application/config/autoload.php b/application/config/autoload.php index 562be354e..a75a6be84 100644 --- a/application/config/autoload.php +++ b/application/config/autoload.php @@ -1,5 +1,5 @@ 'ua'); */ - $autoload['libraries'] = array('database'); @@ -69,15 +68,15 @@ | ------------------------------------------------------------------- | Auto-load Drivers | ------------------------------------------------------------------- -| These classes are located in the system/libraries folder or in your -| application/libraries folder within their own subdirectory. They +| These classes are located in system/libraries/ or in your +| application/libraries/ directory, but are also placed inside their +| own subdirectory and they extend the CI_Driver_Library class. They | offer multiple interchangeable driver options. | | Prototype: | | $autoload['drivers'] = array('cache'); */ - $autoload['drivers'] = array(); /* @@ -88,7 +87,6 @@ | | $autoload['helper'] = array('url', 'file'); */ - $autoload['helper'] = array('url', 'language'); /* @@ -103,7 +101,6 @@ | config files. Otherwise, leave it blank. | */ - $autoload['config'] = array('application'); /* @@ -118,7 +115,6 @@ | "codeigniter_lang.php" would be referenced as array('codeigniter'); | */ - $autoload['language'] = array(); /* @@ -127,12 +123,11 @@ | ------------------------------------------------------------------- | Prototype: | -| $autoload['model'] = array('model1', 'model2'); +| $autoload['model'] = array('first_model', 'second_model'); | | You can also supply an alternative model name to be assigned | in the controller: | | $autoload['model'] = array('first_model' => 'first'); */ - $autoload['model'] = array(); diff --git a/application/config/config.php b/application/config/config.php index 42dfe396f..f4b55cc37 100644 --- a/application/config/config.php +++ b/application/config/config.php @@ -1,5 +1,5 @@ '', - 'hostname' => 'localhost', + 'hostname' => '127.0.0.1', 'username' => '', 'password' => '', 'database' => '', @@ -107,7 +107,6 @@ 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', - 'autoinit' => true, 'encrypt' => false, 'compress' => false, 'stricton' => true, diff --git a/application/config/events.php b/application/config/events.php index f1f6fd581..c11894eaa 100644 --- a/application/config/events.php +++ b/application/config/events.php @@ -1,4 +1,4 @@ - 's', '/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T', '/ț|ţ|ť|ŧ|т/' => 't', + '/Þ|þ/' => 'th', '/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U', '/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u', '/Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y', diff --git a/application/config/hooks.php b/application/config/hooks.php index 8af6c5a31..918c8acdc 100644 --- a/application/config/hooks.php +++ b/application/config/hooks.php @@ -3,16 +3,16 @@ * Define "hooks" to extend CI without hacking the core files. Please see the * user guide for info: * - * @link https://ellislab.com/codeigniter/user-guide/general/hooks.html + * @link http://www.codeigniter.com/user_guide/general/hooks.html */ // Store the requested URL, which will sometimes be different from previous URL. $hook['pre_controller'][] = array( - 'class' => 'App_hooks', + 'class' => 'App_hooks', 'function' => 'saveRequested', - 'filename' => 'App_hooks.php', - 'filepath' => 'hooks', - 'params' => '' + 'filename' => 'App_hooks.php', + 'filepath' => 'hooks', + 'params' => '' ); // Check whether the Composer Autoloader should be used. @@ -26,20 +26,20 @@ // Allow performance of good redirects to previous pages. $hook['post_controller'][] = array( - 'class' => 'App_hooks', + 'class' => 'App_hooks', 'function' => 'prepRedirect', - 'filename' => 'App_hooks.php', - 'filepath' => 'hooks', - 'params' => '' + 'filename' => 'App_hooks.php', + 'filepath' => 'hooks', + 'params' => '' ); - + // Check whether the site is in maintenance mode. $hook['post_controller_constructor'][] = array( - 'class' => 'App_hooks', + 'class' => 'App_hooks', 'function' => 'checkSiteStatus', - 'filename' => 'App_hooks.php', - 'filepath' => 'hooks', - 'params' => '' + 'filename' => 'App_hooks.php', + 'filepath' => 'hooks', + 'params' => '' ); /* End of file /application/config/hooks.php */ diff --git a/application/config/migration.php b/application/config/migration.php index f47548157..c87bd484a 100644 --- a/application/config/migration.php +++ b/application/config/migration.php @@ -25,12 +25,12 @@ | Migration file names may be based on a sequential identifier or on | a timestamp. Options are: | -| 'sequential' = Default migration naming (001_add_blog.php) +| 'sequential' = Sequential migration naming (001_add_blog.php) | 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php) | Use timestamp format YYYYMMDDHHIISS. | -| If this configuration value is missing the Migration library defaults -| to 'sequential' for backward compatibility. +| Note: If this configuration value is missing the Migration library +| defaults to 'sequential' for backward compatibility with CI2. | */ $config['migration_type'] = 'timestamp'; diff --git a/application/config/mimes.php b/application/config/mimes.php index c18312ff3..a35d48940 100644 --- a/application/config/mimes.php +++ b/application/config/mimes.php @@ -1,4 +1,6 @@ - 'application/x-pkcs7', 'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'), '3g2' => 'video/3gpp2', - '3gp' => 'video/3gp', + '3gp' => array('video/3gp', 'video/3gpp'), 'mp4' => 'video/mp4', 'm4a' => 'audio/x-m4a', 'f4v' => 'video/mp4', @@ -151,6 +153,9 @@ 'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'), 'svg' => array('image/svg+xml', 'application/xml', 'text/xml'), 'vcf' => 'text/x-vcard', + 'srt' => array('text/srt', 'text/plain'), + 'vtt' => array('text/vtt', 'text/plain'), + 'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon') ); if (defined('CI_VERSION') && substr(CI_VERSION, 0, 1) != '2') { diff --git a/application/config/smileys.php b/application/config/smileys.php index 1428d68bc..1eeba4776 100644 --- a/application/config/smileys.php +++ b/application/config/smileys.php @@ -13,7 +13,6 @@ | http://codeigniter.com/user_guide/helpers/smiley_helper.html | */ - $smileys = array( // smiley image name width height alt diff --git a/application/config/user_agents.php b/application/config/user_agents.php index 73592c2a4..ac277374d 100644 --- a/application/config/user_agents.php +++ b/application/config/user_agents.php @@ -10,49 +10,49 @@ | mobile device data. The array keys are used to identify the device | and the array values are used to set the actual name of the item. */ - $platforms = array ( - 'windows nt 6.3' => 'Windows 8.1', - 'windows nt 6.2' => 'Windows 8', - 'windows nt 6.1' => 'Windows 7', - 'windows nt 6.0' => 'Windows Vista', - 'windows nt 5.2' => 'Windows 2003', - 'windows nt 5.1' => 'Windows XP', - 'windows nt 5.0' => 'Windows 2000', - 'windows nt 4.0' => 'Windows NT 4.0', - 'winnt4.0' => 'Windows NT 4.0', - 'winnt 4.0' => 'Windows NT', - 'winnt' => 'Windows NT', - 'windows 98' => 'Windows 98', - 'win98' => 'Windows 98', - 'windows 95' => 'Windows 95', - 'win95' => 'Windows 95', - 'windows phone' => 'Windows Phone', - 'windows' => 'Unknown Windows OS', - 'android' => 'Android', - 'blackberry' => 'BlackBerry', - 'iphone' => 'iOS', - 'ipad' => 'iOS', - 'ipod' => 'iOS', - 'os x' => 'Mac OS X', - 'ppc mac' => 'Power PC Mac', - 'freebsd' => 'FreeBSD', - 'ppc' => 'Macintosh', - 'linux' => 'Linux', - 'debian' => 'Debian', - 'sunos' => 'Sun Solaris', - 'beos' => 'BeOS', - 'apachebench' => 'ApacheBench', - 'aix' => 'AIX', - 'irix' => 'Irix', - 'osf' => 'DEC OSF', - 'hp-ux' => 'HP-UX', - 'netbsd' => 'NetBSD', - 'bsdi' => 'BSDi', - 'openbsd' => 'OpenBSD', - 'gnu' => 'GNU/Linux', - 'unix' => 'Unknown Unix OS', - 'symbian' => 'Symbian OS', + 'windows nt 10.0' => 'Windows 10', + 'windows nt 6.3' => 'Windows 8.1', + 'windows nt 6.2' => 'Windows 8', + 'windows nt 6.1' => 'Windows 7', + 'windows nt 6.0' => 'Windows Vista', + 'windows nt 5.2' => 'Windows 2003', + 'windows nt 5.1' => 'Windows XP', + 'windows nt 5.0' => 'Windows 2000', + 'windows nt 4.0' => 'Windows NT 4.0', + 'winnt4.0' => 'Windows NT 4.0', + 'winnt 4.0' => 'Windows NT', + 'winnt' => 'Windows NT', + 'windows 98' => 'Windows 98', + 'win98' => 'Windows 98', + 'windows 95' => 'Windows 95', + 'win95' => 'Windows 95', + 'windows phone' => 'Windows Phone', + 'windows' => 'Unknown Windows OS', + 'android' => 'Android', + 'blackberry' => 'BlackBerry', + 'iphone' => 'iOS', + 'ipad' => 'iOS', + 'ipod' => 'iOS', + 'os x' => 'Mac OS X', + 'ppc mac' => 'Power PC Mac', + 'freebsd' => 'FreeBSD', + 'ppc' => 'Macintosh', + 'linux' => 'Linux', + 'debian' => 'Debian', + 'sunos' => 'Sun Solaris', + 'beos' => 'BeOS', + 'apachebench' => 'ApacheBench', + 'aix' => 'AIX', + 'irix' => 'Irix', + 'osf' => 'DEC OSF', + 'hp-ux' => 'HP-UX', + 'netbsd' => 'NetBSD', + 'bsdi' => 'BSDi', + 'openbsd' => 'OpenBSD', + 'gnu' => 'GNU/Linux', + 'unix' => 'Unknown Unix OS', + 'symbian' => 'Symbian OS', ); @@ -61,6 +61,7 @@ $browsers = array( 'OPR' => 'Opera', 'Flock' => 'Flock', + 'Edge' => 'Spartan', 'RockMelt' => 'RockMelt', 'Chrome' => 'Chrome', // Opera 10+ always reports Opera/9.80 and appends Version/ to the user agent string @@ -93,57 +94,57 @@ $mobiles = array( // legacy array, old values commented out 'mobileexplorer' => 'Mobile Explorer', - // 'openwave' => 'Open Wave', - // 'opera mini' => 'Opera Mini', - // 'operamini' => 'Opera Mini', - // 'elaine' => 'Palm', + // 'openwave' => 'Open Wave', + // 'opera mini' => 'Opera Mini', + // 'operamini' => 'Opera Mini', + // 'elaine' => 'Palm', 'palmsource' => 'Palm', - // 'digital paths' => 'Palm', - // 'avantgo' => 'Avantgo', - // 'xiino' => 'Xiino', + // 'digital paths' => 'Palm', + // 'avantgo' => 'Avantgo', + // 'xiino' => 'Xiino', 'palmscape' => 'Palmscape', - // 'nokia' => 'Nokia', - // 'ericsson' => 'Ericsson', - // 'blackberry' => 'BlackBerry', - // 'motorola' => 'Motorola', + // 'nokia' => 'Nokia', + // 'ericsson' => 'Ericsson', + // 'blackberry' => 'BlackBerry', + // 'motorola' => 'Motorola', // Phones and Manufacturers - 'motorola' => 'Motorola', - 'nokia' => 'Nokia', - 'palm' => 'Palm', - 'iphone' => 'Apple iPhone', - 'ipad' => 'iPad', - 'ipod' => 'Apple iPod Touch', - 'sony' => 'Sony Ericsson', - 'ericsson' => 'Sony Ericsson', - 'blackberry' => 'BlackBerry', - 'cocoon' => 'O2 Cocoon', - 'blazer' => 'Treo', - 'lg' => 'LG', - 'amoi' => 'Amoi', - 'xda' => 'XDA', - 'mda' => 'MDA', - 'vario' => 'Vario', - 'htc' => 'HTC', - 'samsung' => 'Samsung', - 'sharp' => 'Sharp', - 'sie-' => 'Siemens', - 'alcatel' => 'Alcatel', - 'benq' => 'BenQ', - 'ipaq' => 'HP iPaq', - 'mot-' => 'Motorola', - 'playstation portable' => 'PlayStation Portable', + 'motorola' => 'Motorola', + 'nokia' => 'Nokia', + 'palm' => 'Palm', + 'iphone' => 'Apple iPhone', + 'ipad' => 'iPad', + 'ipod' => 'Apple iPod Touch', + 'sony' => 'Sony Ericsson', + 'ericsson' => 'Sony Ericsson', + 'blackberry' => 'BlackBerry', + 'cocoon' => 'O2 Cocoon', + 'blazer' => 'Treo', + 'lg' => 'LG', + 'amoi' => 'Amoi', + 'xda' => 'XDA', + 'mda' => 'MDA', + 'vario' => 'Vario', + 'htc' => 'HTC', + 'samsung' => 'Samsung', + 'sharp' => 'Sharp', + 'sie-' => 'Siemens', + 'alcatel' => 'Alcatel', + 'benq' => 'BenQ', + 'ipaq' => 'HP iPaq', + 'mot-' => 'Motorola', + 'playstation portable' => 'PlayStation Portable', 'playstation 3' => 'PlayStation 3', 'playstation vita' => 'PlayStation Vita', - 'hiptop' => 'Danger Hiptop', - 'nec-' => 'NEC', - 'panasonic' => 'Panasonic', - 'philips' => 'Philips', - 'sagem' => 'Sagem', - 'sanyo' => 'Sanyo', - 'spv' => 'SPV', - 'zte' => 'ZTE', - 'sendo' => 'Sendo', + 'hiptop' => 'Danger Hiptop', + 'nec-' => 'NEC', + 'panasonic' => 'Panasonic', + 'philips' => 'Philips', + 'sagem' => 'Sagem', + 'sanyo' => 'Sanyo', + 'spv' => 'SPV', + 'zte' => 'ZTE', + 'sendo' => 'Sendo', 'nintendo dsi' => 'Nintendo DSi', 'nintendo ds' => 'Nintendo DS', 'nintendo 3ds' => 'Nintendo 3DS', @@ -152,42 +153,42 @@ 'openweb' => 'OpenWeb', // Operating Systems - 'android' => 'Android', - 'symbian' => 'Symbian', - 'SymbianOS' => 'SymbianOS', - 'elaine' => 'Palm', - 'series60' => 'Symbian S60', - 'windows ce' => 'Windows CE', + 'android' => 'Android', + 'symbian' => 'Symbian', + 'SymbianOS' => 'SymbianOS', + 'elaine' => 'Palm', + 'series60' => 'Symbian S60', + 'windows ce' => 'Windows CE', // Browsers - 'obigo' => 'Obigo', - 'netfront' => 'Netfront Browser', - 'openwave' => 'Openwave Browser', - 'mobilexplorer' => 'Mobile Explorer', - 'operamini' => 'Opera Mini', - 'opera mini' => 'Opera Mini', + 'obigo' => 'Obigo', + 'netfront' => 'Netfront Browser', + 'openwave' => 'Openwave Browser', + 'mobilexplorer' => 'Mobile Explorer', + 'operamini' => 'Opera Mini', + 'opera mini' => 'Opera Mini', 'opera mobi' => 'Opera Mobile', - 'fennec' => 'Firefox Mobile', + 'fennec' => 'Firefox Mobile', // Other - 'digital paths' => 'Digital Paths', - 'avantgo' => 'AvantGo', - 'xiino' => 'Xiino', - 'novarra' => 'Novarra Transcoder', - 'vodafone' => 'Vodafone', - 'docomo' => 'NTT DoCoMo', - 'o2' => 'O2', + 'digital paths' => 'Digital Paths', + 'avantgo' => 'AvantGo', + 'xiino' => 'Xiino', + 'novarra' => 'Novarra Transcoder', + 'vodafone' => 'Vodafone', + 'docomo' => 'NTT DoCoMo', + 'o2' => 'O2', // Fallback - 'mobile' => 'Generic Mobile', - 'wireless' => 'Generic Mobile', - 'j2me' => 'Generic Mobile', - 'midp' => 'Generic Mobile', - 'cldc' => 'Generic Mobile', - 'up.link' => 'Generic Mobile', - 'up.browser' => 'Generic Mobile', - 'smartphone' => 'Generic Mobile', - 'cellphone' => 'Generic Mobile', + 'mobile' => 'Generic Mobile', + 'wireless' => 'Generic Mobile', + 'j2me' => 'Generic Mobile', + 'midp' => 'Generic Mobile', + 'cldc' => 'Generic Mobile', + 'up.link' => 'Generic Mobile', + 'up.browser' => 'Generic Mobile', + 'smartphone' => 'Generic Mobile', + 'cellphone' => 'Generic Mobile', ); // There are hundreds of bots but these are the most common. diff --git a/bonfire/docs/upgrade/083.md b/bonfire/docs/upgrade/083.md index f7e7442d8..09d437ab3 100644 --- a/bonfire/docs/upgrade/083.md +++ b/bonfire/docs/upgrade/083.md @@ -2,6 +2,20 @@ ## 0.8.2 to 0.8.3 +* Update `/application/config/application.php` +* Update `/application/config/autoload.php` +* Update `/application/config/config.php` +* Update `/application/config/constants.php` +* Update `/application/config/database.php` +* Update `/application/config/events.php` +* Update `/application/config/foreign_chars.php` +* Update `/application/config/hooks.php` +* Update `/application/config/migration.php` +* Update `/application/config/mimes.php` +* Update `/application/config/smileys.php` +* Update `/application/config/user_agents.php` +* Where relevant, update any of the config files above in environment directories. + * Update `/application/views/errors/cli/error_exception.php` * Update `/application/views/errors/cli/error_php.php`