From 15be8fc4f1289e464fc716a7ed4a50f647f70211 Mon Sep 17 00:00:00 2001 From: Dan Horrigan Date: Sun, 21 Aug 2011 09:22:49 -0400 Subject: Changed the 'development' environment default error reporting to included E_STRICT errors. E_ALL does not include these errors. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index f4ac11a72..7555158a5 100644 --- a/index.php +++ b/index.php @@ -33,7 +33,7 @@ if (defined('ENVIRONMENT')) switch (ENVIRONMENT) { case 'development': - error_reporting(E_ALL); + error_reporting(E_ALL | E_STRICT); break; case 'testing': -- cgit v1.2.3-24-g4f1b From 0e95b8b04f40739a26f9c945e61cedc61f4fe6c1 Mon Sep 17 00:00:00 2001 From: Dan Horrigan Date: Sun, 21 Aug 2011 09:34:02 -0400 Subject: Changed error reporting level to -1, which will show ALL PHP errors. This will future-proof the solution. Thanks @ericbarnes for pointing that out. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7555158a5..899f4ce9b 100644 --- a/index.php +++ b/index.php @@ -33,7 +33,7 @@ if (defined('ENVIRONMENT')) switch (ENVIRONMENT) { case 'development': - error_reporting(E_ALL | E_STRICT); + error_reporting(-1); break; case 'testing': -- cgit v1.2.3-24-g4f1b From 8eef9c77512d4fad5357d3cbda83b89f844d7d16 Mon Sep 17 00:00:00 2001 From: Joe Cianflone Date: Sun, 21 Aug 2011 10:39:06 -0400 Subject: Ability to move the view folder out of the Application directory * index.php -- added the $view_folder var and VIEWPATH constant * Loader.php -- changed the private _ci_view_paths var so that it's not hardcoded to the view dir, but looks for the VIEWPATH constant instead --- index.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 899f4ce9b..c50cfed43 100644 --- a/index.php +++ b/index.php @@ -73,6 +73,23 @@ if (defined('ENVIRONMENT')) * */ $application_folder = 'application'; + +/* + *--------------------------------------------------------------- + * VIEW FOLDER NAME + *--------------------------------------------------------------- + * + * If you want to move the view folder out of the application + * folder set the path to the folder here. The folder can be renamed + * and relocated anywhere on your server. If blank, it will default + * to the standard location inside your application folder. If you + * do move this, use the full server path to this folder + * + * NO TRAILING SLASH! + * + */ + $view_folder = ''; + /* * -------------------------------------------------------------------- @@ -190,6 +207,22 @@ if (defined('ENVIRONMENT')) define('APPPATH', BASEPATH.$application_folder.'/'); } + + // The path to the "views" folder + if (is_dir($view_folder)) + { + define ('VIEWPATH', $view_folder .'/'); + } + else + { + if ( ! is_dir(APPPATH.'views/')) + { + exit("Your view folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF); + } + + define ('VIEWPATH', APPPATH.'views/' ); + } + /* * -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b 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 --- index.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index c50cfed43..08e5d6df4 100644 --- a/index.php +++ b/index.php @@ -1,4 +1,29 @@ Date: Sun, 1 Jan 2012 18:46:41 -0600 Subject: Updating copyright date to 2012 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 08e5d6df4..4ae1ceebd 100644 --- a/index.php +++ b/index.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 282592c744b969d5cdebe00673f2bdc8d956261e Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 8 Jan 2012 01:01:55 +0200 Subject: Clear some spaces from index.php --- index.php | 57 +++++++++++++++++++++++---------------------------------- 1 file changed, 23 insertions(+), 34 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 4ae1ceebd..1712a7d66 100644 --- a/index.php +++ b/index.php @@ -5,9 +5,9 @@ * 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: @@ -41,7 +41,6 @@ * production * * NOTE: If you change these, also change the error_reporting() code below - * */ define('ENVIRONMENT', 'development'); /* @@ -60,12 +59,10 @@ if (defined('ENVIRONMENT')) case 'development': error_reporting(-1); break; - case 'testing': case 'production': error_reporting(0); break; - default: exit('The application environment is not set correctly.'); } @@ -79,7 +76,6 @@ if (defined('ENVIRONMENT')) * This variable must contain the name of your "system" folder. * Include the path if the folder is not in the same directory * as this file. - * */ $system_path = 'system'; @@ -90,30 +86,28 @@ if (defined('ENVIRONMENT')) * * If you want this front controller to use a different "application" * folder then the default one you can set its name here. The folder - * can also be renamed or relocated anywhere on your server. If + * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: * http://codeigniter.com/user_guide/general/managing_apps.html * * NO TRAILING SLASH! - * */ $application_folder = 'application'; - + /* *--------------------------------------------------------------- * VIEW FOLDER NAME *--------------------------------------------------------------- - * - * If you want to move the view folder out of the application + * + * If you want to move the view folder out of the application * folder set the path to the folder here. The folder can be renamed - * and relocated anywhere on your server. If blank, it will default - * to the standard location inside your application folder. If you - * do move this, use the full server path to this folder + * and relocated anywhere on your server. If blank, it will default + * to the standard location inside your application folder. If you + * do move this, use the full server path to this folder. * * NO TRAILING SLASH! - * */ - $view_folder = ''; + $view_folder = ''; /* @@ -123,18 +117,17 @@ if (defined('ENVIRONMENT')) * * Normally you will set your default controller in the routes.php file. * You can, however, force a custom routing by hard-coding a - * specific controller class/function here. For most applications, you + * specific controller class/function here. For most applications, you * WILL NOT set your routing here, but it's an option for those * special instances where you might want to override the standard * routing in a specific front controller that shares a common CI installation. * - * IMPORTANT: If you set the routing here, NO OTHER controller will be + * IMPORTANT: If you set the routing here, NO OTHER controller will be * callable. In essence, this preference limits your application to ONE - * specific controller. Leave the function name blank if you need + * specific controller. Leave the function name blank if you need * to call functions dynamically via the URI. * * Un-comment the $routing array below to use this feature - * */ // The directory name, relative to the "controllers" folder. Leave blank // if your controller is not in a sub-folder within the "controllers" folder @@ -160,7 +153,6 @@ if (defined('ENVIRONMENT')) * config values. * * Un-comment the $assign_to_config array below to use this feature - * */ // $assign_to_config['name_of_config_item'] = 'value of config item'; @@ -193,7 +185,7 @@ if (defined('ENVIRONMENT')) // Is the system path correct? if ( ! is_dir($system_path)) { - exit("Your system folder path does not appear to be set correctly. Please open the following file and correct this: ".pathinfo(__FILE__, PATHINFO_BASENAME)); + exit('Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME)); } /* @@ -209,7 +201,7 @@ if (defined('ENVIRONMENT')) define('EXT', '.php'); // Path to the system folder - define('BASEPATH', str_replace("\\", "/", $system_path)); + define('BASEPATH', str_replace('\\', '/', $system_path)); // Path to the front controller (this file) define('FCPATH', str_replace(SELF, '', __FILE__)); @@ -217,7 +209,6 @@ if (defined('ENVIRONMENT')) // Name of the "system folder" define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); - // The path to the "application" folder if (is_dir($application_folder)) { @@ -227,27 +218,26 @@ if (defined('ENVIRONMENT')) { if ( ! is_dir(BASEPATH.$application_folder.'/')) { - exit("Your application folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF); + exit('Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF); } define('APPPATH', BASEPATH.$application_folder.'/'); } - + // The path to the "views" folder - if (is_dir($view_folder)) + if (is_dir($view_folder)) { define ('VIEWPATH', $view_folder .'/'); } - else + else { if ( ! is_dir(APPPATH.'views/')) { - exit("Your view folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF); + exit('Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF); } - - define ('VIEWPATH', APPPATH.'views/' ); + + define ('VIEWPATH', APPPATH.'views/' ); } - /* * -------------------------------------------------------------------- @@ -255,9 +245,8 @@ if (defined('ENVIRONMENT')) * -------------------------------------------------------------------- * * And away we go... - * */ require_once BASEPATH.'core/CodeIgniter.php'; /* End of file index.php */ -/* Location: ./index.php */ \ No newline at end of file +/* Location: ./index.php */ -- cgit v1.2.3-24-g4f1b From d63e40138e675df40f3a17e04972e82e7a748307 Mon Sep 17 00:00:00 2001 From: Kevin Cupp Date: Sun, 5 Feb 2012 14:14:32 -0500 Subject: Adding in a few 503 status codes for common errors in response to this ExpressionEngine bug about errors getting cached by reverse proxies who cache 200 responses: http://expressionengine.com/bug_tracker/bug/17420 --- index.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 1712a7d66..a37826690 100644 --- a/index.php +++ b/index.php @@ -218,6 +218,7 @@ if (defined('ENVIRONMENT')) { if ( ! is_dir(BASEPATH.$application_folder.'/')) { + header('HTTP/1.1 503 Service Unavailable.', TRUE, '503'); exit('Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF); } @@ -233,6 +234,7 @@ if (defined('ENVIRONMENT')) { if ( ! is_dir(APPPATH.'views/')) { + header('HTTP/1.1 503 Service Unavailable.', TRUE, '503'); exit('Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF); } -- 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... --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index a37826690..5a1190112 100644 --- a/index.php +++ b/index.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 35ac46d4aad12fe723229feca403b4dee3efcc27 Mon Sep 17 00:00:00 2001 From: Root Date: Fri, 25 May 2012 18:51:48 -0400 Subject: Changed instead of turning off of the error messaging to hide them --- index.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 5a1190112..6ffe4864e 100644 --- a/index.php +++ b/index.php @@ -52,20 +52,23 @@ * By default development will show errors but testing and live will hide them. */ -if (defined('ENVIRONMENT')) +// By default show all except notifications, deprecated and strict errors +error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); + +// Show or hide errors depending on current environment +switch (ENVIRONMENT) { - switch (ENVIRONMENT) - { - case 'development': - error_reporting(-1); - break; - case 'testing': - case 'production': - error_reporting(0); - break; - default: - exit('The application environment is not set correctly.'); - } + case 'development': + ini_set('display_errors', 1); + break; + + case 'testing': + case 'production': + ini_set('display_errors', 0); + break; + + default: + exit('The application environment is not set correctly.'); } /* -- cgit v1.2.3-24-g4f1b From 3cc8502b48946f7298797393cea0a7183c325244 Mon Sep 17 00:00:00 2001 From: Root Date: Sun, 27 May 2012 20:06:10 -0400 Subject: Changed to show all the errors on dev --- index.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6ffe4864e..c212cac84 100644 --- a/index.php +++ b/index.php @@ -52,18 +52,16 @@ * By default development will show errors but testing and live will hide them. */ -// By default show all except notifications, deprecated and strict errors -error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); - -// Show or hide errors depending on current environment switch (ENVIRONMENT) { case 'development': + error_reporting(E_ALL); ini_set('display_errors', 1); break; case 'testing': case 'production': + error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); ini_set('display_errors', 0); break; -- cgit v1.2.3-24-g4f1b From 8d021e647f6a094b6097d1ea89119a4047efc8dd Mon Sep 17 00:00:00 2001 From: Gints Murans Date: Wed, 30 May 2012 21:15:08 +0300 Subject: E_ALL -> -1 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index c212cac84..a11c5c1f2 100644 --- a/index.php +++ b/index.php @@ -55,7 +55,7 @@ switch (ENVIRONMENT) { case 'development': - error_reporting(E_ALL); + error_reporting(-1); ini_set('display_errors', 1); break; -- cgit v1.2.3-24-g4f1b From dda21f6abc76451997b12c07e6066aa49c2d423d Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Sun, 3 Jun 2012 10:36:36 -0500 Subject: Added support for $_SERVER['CI_ENV'] in index.php Remember this is entirely optional, nothing will change if you do not which to use Multiple Environments just like right now. If you DO set CI_ENV you can manipulate the switch that controls error reporting, etc, so set it to "production" on your live site to hide errors from users. If you don't require this logic you can remove it, or change it entirely to check HTTP_HOST for environment subdomains, or check IP address, etc. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 5a1190112..3b00dd360 100644 --- a/index.php +++ b/index.php @@ -42,7 +42,7 @@ * * NOTE: If you change these, also change the error_reporting() code below */ - define('ENVIRONMENT', 'development'); + define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development'); /* *--------------------------------------------------------------- * ERROR REPORTING -- cgit v1.2.3-24-g4f1b From 079fbfcde095230f304e889217f897031a948f61 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 02:26:58 +0300 Subject: Changed APPPATH, BASEPATH and VIEWPATH to be absolute paths (fixes issue #1321) and removed EXT constant --- index.php | 46 +++++++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 15 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 3b00dd360..680dccfea 100644 --- a/index.php +++ b/index.php @@ -178,9 +178,11 @@ if (defined('ENVIRONMENT')) { $system_path = realpath($system_path).'/'; } - - // ensure there's a trailing slash - $system_path = rtrim($system_path, '/').'/'; + else + { + // Ensure there's a trailing slash + $system_path = rtrim($system_path, '/').'/'; + } // Is the system path correct? if ( ! is_dir($system_path)) @@ -196,10 +198,6 @@ if (defined('ENVIRONMENT')) // The name of THIS file define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); - // The PHP file extension - // this global constant is deprecated. - define('EXT', '.php'); - // Path to the system folder define('BASEPATH', str_replace('\\', '/', $system_path)); @@ -212,6 +210,11 @@ if (defined('ENVIRONMENT')) // The path to the "application" folder if (is_dir($application_folder)) { + if (realpath($system_path) !== FALSE) + { + $application_folder = realpath($application_folder); + } + define('APPPATH', $application_folder.'/'); } else @@ -226,20 +229,33 @@ if (defined('ENVIRONMENT')) } // The path to the "views" folder - if (is_dir($view_folder)) - { - define ('VIEWPATH', $view_folder .'/'); - } - else + if ( ! is_dir($view_folder)) { - if ( ! is_dir(APPPATH.'views/')) + if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.'/')) + { + $view_folder = APPPATH.$view_folder; + } + elseif ( ! is_dir(APPPATH.'views/')) { header('HTTP/1.1 503 Service Unavailable.', TRUE, '503'); exit('Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF); } + else + { + $view_folder = APPPATH.'views'; + } + } - define ('VIEWPATH', APPPATH.'views/' ); + if (realpath($view_folder) !== FALSE) + { + $view_folder = realpath($view_folder).'/'; } + else + { + $view_folder = rtrim($view_folder, '/').'/'; + } + + define ('VIEWPATH', $view_folder); /* * -------------------------------------------------------------------- @@ -251,4 +267,4 @@ if (defined('ENVIRONMENT')) require_once BASEPATH.'core/CodeIgniter.php'; /* End of file index.php */ -/* Location: ./index.php */ +/* Location: ./index.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From 806ca600d3669343ee7ae90a9b5d65be9dfdbefe Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 12:51:27 +0300 Subject: Some more index.php improvements --- index.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 680dccfea..380d1017b 100644 --- a/index.php +++ b/index.php @@ -174,9 +174,9 @@ if (defined('ENVIRONMENT')) chdir(dirname(__FILE__)); } - if (realpath($system_path) !== FALSE) + if (($_temp = realpath($system_path)) !== FALSE) { - $system_path = realpath($system_path).'/'; + $system_path = $_temp.'/'; } else { @@ -187,6 +187,7 @@ if (defined('ENVIRONMENT')) // Is the system path correct? if ( ! is_dir($system_path)) { + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); exit('Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME)); } @@ -210,9 +211,9 @@ if (defined('ENVIRONMENT')) // The path to the "application" folder if (is_dir($application_folder)) { - if (realpath($system_path) !== FALSE) + if (($_temp = realpath($system_path)) !== FALSE) { - $application_folder = realpath($application_folder); + $application_folder = $_temp; } define('APPPATH', $application_folder.'/'); @@ -221,7 +222,7 @@ if (defined('ENVIRONMENT')) { if ( ! is_dir(BASEPATH.$application_folder.'/')) { - header('HTTP/1.1 503 Service Unavailable.', TRUE, '503'); + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); exit('Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF); } @@ -237,7 +238,7 @@ if (defined('ENVIRONMENT')) } elseif ( ! is_dir(APPPATH.'views/')) { - header('HTTP/1.1 503 Service Unavailable.', TRUE, '503'); + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); exit('Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF); } else @@ -246,7 +247,7 @@ if (defined('ENVIRONMENT')) } } - if (realpath($view_folder) !== FALSE) + if (($_temp = realpath($view_folder)) !== FALSE) { $view_folder = realpath($view_folder).'/'; } -- cgit v1.2.3-24-g4f1b From cce918033a99186cd76019d022571a8d9321d899 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jun 2012 13:25:31 +0300 Subject: Fix APPPATH --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 380d1017b..ad98013ca 100644 --- a/index.php +++ b/index.php @@ -211,7 +211,7 @@ if (defined('ENVIRONMENT')) // The path to the "application" folder if (is_dir($application_folder)) { - if (($_temp = realpath($system_path)) !== FALSE) + if (($_temp = realpath($application_folder)) !== FALSE) { $application_folder = $_temp; } @@ -256,7 +256,7 @@ if (defined('ENVIRONMENT')) $view_folder = rtrim($view_folder, '/').'/'; } - define ('VIEWPATH', $view_folder); + define('VIEWPATH', $view_folder); /* * -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From cbb654d9b332b65c5e2ae6f7bf8936b425b709ac Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 10 Jul 2012 11:36:32 +0300 Subject: Follow-up to #1398, #1548 --- index.php | 1 + 1 file changed, 1 insertion(+) (limited to 'index.php') diff --git a/index.php b/index.php index c379f72d0..aa1df441b 100644 --- a/index.php +++ b/index.php @@ -66,6 +66,7 @@ switch (ENVIRONMENT) break; default: + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); exit('The application environment is not set correctly.'); } -- cgit v1.2.3-24-g4f1b From fe8324934f4bd15c86460975d265f72362cbbb3a Mon Sep 17 00:00:00 2001 From: vlakoff Date: Fri, 13 Jul 2012 20:40:06 +0200 Subject: Some adjustments in inline documentation --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index aa1df441b..4955437bf 100644 --- a/index.php +++ b/index.php @@ -43,6 +43,7 @@ * NOTE: If you change these, also change the error_reporting() code below */ define('ENVIRONMENT', isset($_SERVER['CI_ENV']) ? $_SERVER['CI_ENV'] : 'development'); + /* *--------------------------------------------------------------- * ERROR REPORTING @@ -51,7 +52,6 @@ * Different environments will require different levels of error reporting. * By default development will show errors but testing and live will hide them. */ - switch (ENVIRONMENT) { case 'development': -- cgit v1.2.3-24-g4f1b From e40e56f9bc77665b4b55549bd753424b770e3dfd Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sun, 15 Jul 2012 12:57:38 +0200 Subject: Fix in index.php inline documentation $routing['controller'] has to respect the capitalization of the filename, which is in lowercase. Otherwise, the application fails on case-sensitive servers. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 4955437bf..107a2095b 100644 --- a/index.php +++ b/index.php @@ -135,7 +135,7 @@ switch (ENVIRONMENT) // if your controller is not in a sub-folder within the "controllers" folder // $routing['directory'] = ''; - // The controller class file name. Example: Mycontroller + // The controller class file name. Example: mycontroller // $routing['controller'] = ''; // The controller function you wish to be called. -- cgit v1.2.3-24-g4f1b From 2eaeee5aa3971932e58ffac48554e554d799249f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 21 Nov 2012 14:31:26 +0200 Subject: Change fs permissions and add some missing index.html files (#2017) --- index.php | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 index.php (limited to 'index.php') diff --git a/index.php b/index.php old mode 100644 new mode 100755 -- 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 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 107a2095b..1999bbe45 100755 --- a/index.php +++ b/index.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 e90b8305e6fec8b7935fbbbe24f68a62332df886 Mon Sep 17 00:00:00 2001 From: Adam Carmichael Date: Fri, 4 Jan 2013 01:04:29 +1100 Subject: fix a typo in index.php --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 1999bbe45..be0945740 100755 --- a/index.php +++ b/index.php @@ -87,7 +87,7 @@ switch (ENVIRONMENT) *--------------------------------------------------------------- * * If you want this front controller to use a different "application" - * folder then the default one you can set its name here. The folder + * folder than the default one you can set its name here. The folder * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: * http://codeigniter.com/user_guide/general/managing_apps.html -- cgit v1.2.3-24-g4f1b From 3b5b7f48848d098c6190781f8790a1b0dcb0217c Mon Sep 17 00:00:00 2001 From: Daniel Hunsaker Date: Fri, 22 Feb 2013 19:17:56 -0700 Subject: Updated exit codes as constant values Re-allocated exit status codes according to three references, which follow: BSD sysexits.h:http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits GNU recomendations:http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html Bash scripting:http://tldp.org/LDP/abs/html/exitcodes.html The GNU recommendations stem from and expand upon the standard C/C++ library (stdlibc) definitions, while also suggesting some best-practice conventions which happen to prevent exit status code collisions with bash, and probably other shells. The re-allocated codes are now mapped to constant values, set in *application/config/constants.php*, and used throughout the CodeIgniter core. They would additionally be used in *index.php*, but the constants file hasn't been loaded at that point, so the integer values are used instead, and a comment follows each such use with amplifying information on why that particular value was selected. Finally, the errors documentation has been updated accordingly. Signed-off-by: Daniel Hunsaker --- index.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index be0945740..a52a021ec 100755 --- a/index.php +++ b/index.php @@ -67,7 +67,8 @@ switch (ENVIRONMENT) default: header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); - exit('The application environment is not set correctly.'); + echo 'The application environment is not set correctly.'; + exit(1); // EXIT_* constants not yet defined; 1 is EXIT_FAILURE, a generic error. } /* @@ -190,7 +191,8 @@ switch (ENVIRONMENT) if ( ! is_dir($system_path)) { header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); - exit('Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME)); + echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME); + exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG. } /* @@ -225,7 +227,8 @@ switch (ENVIRONMENT) if ( ! is_dir(BASEPATH.$application_folder.'/')) { header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); - exit('Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF); + echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; + exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG. } define('APPPATH', BASEPATH.$application_folder.'/'); @@ -241,7 +244,8 @@ switch (ENVIRONMENT) elseif ( ! is_dir(APPPATH.'views/')) { header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); - exit('Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF); + echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; + exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG. } else { -- cgit v1.2.3-24-g4f1b From 50dfe0175df02fe4aa243757bdf1b42fb9fc3169 Mon Sep 17 00:00:00 2001 From: Daniel Hunsaker Date: Mon, 4 Mar 2013 02:05:20 -0700 Subject: Updated in accordance with feedback from @narfbg - Removed commented lists of constants from the three reference conventions, replacing each with the URLs at which more information can be found. - Renamed a few constants to more closely reflect CodeIgniter conventions. - Modified a couple of lines which were in violation of the CI Style Guide. Signed-off-by: Daniel Hunsaker --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index a52a021ec..c6314da1f 100755 --- a/index.php +++ b/index.php @@ -68,7 +68,7 @@ switch (ENVIRONMENT) default: header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); echo 'The application environment is not set correctly.'; - exit(1); // EXIT_* constants not yet defined; 1 is EXIT_FAILURE, a generic error. + exit(1); // EXIT_* constants not yet defined; 1 is EXIT_ERROR, a generic error. } /* -- cgit v1.2.3-24-g4f1b From 4052c73289803cabb7856620a88ca97bcc7d5ee0 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Fri, 29 Mar 2013 16:21:17 +0100 Subject: index.php: minor improvement in VIEWPATH definition code Fixes an oversight from 806ca600d3669343ee7ae90a9b5d65be9dfdbefe --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index c6314da1f..cfb003eb8 100755 --- a/index.php +++ b/index.php @@ -255,7 +255,7 @@ switch (ENVIRONMENT) if (($_temp = realpath($view_folder)) !== FALSE) { - $view_folder = realpath($view_folder).'/'; + $view_folder = $_temp.'/'; } else { -- cgit v1.2.3-24-g4f1b From 1ff2c5593f0049333edec976d07f9a356d473276 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Sun, 21 Jul 2013 00:27:08 +0200 Subject: Fix too verbose error logging on default production environment issue was present on PHP < 5.4 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index cfb003eb8..e5f570e8b 100755 --- a/index.php +++ b/index.php @@ -61,7 +61,7 @@ switch (ENVIRONMENT) case 'testing': case 'production': - error_reporting(E_ALL ^ E_NOTICE ^ E_DEPRECATED ^ E_STRICT); + error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); ini_set('display_errors', 0); break; -- cgit v1.2.3-24-g4f1b From 20292311636837e120d205e470e41826820feb46 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 22 Jul 2013 14:29:10 +0300 Subject: Change class filenames to Ucfirst --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index e5f570e8b..f93cadb9d 100755 --- a/index.php +++ b/index.php @@ -274,4 +274,4 @@ switch (ENVIRONMENT) require_once BASEPATH.'core/CodeIgniter.php'; /* End of file index.php */ -/* Location: ./index.php */ +/* Location: ./index.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From c941d855dc32ec44107cb863596fa385c7aed015 Mon Sep 17 00:00:00 2001 From: vlakoff Date: Tue, 6 Aug 2013 14:44:40 +0200 Subject: Various typos and tabs adjustments --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index f93cadb9d..3040ef080 100755 --- a/index.php +++ b/index.php @@ -77,7 +77,7 @@ switch (ENVIRONMENT) *--------------------------------------------------------------- * * This variable must contain the name of your "system" folder. - * Include the path if the folder is not in the same directory + * Include the path if the folder is not in the same directory * as this file. */ $system_path = 'system'; -- cgit v1.2.3-24-g4f1b From 9f417d070916e82309a762639cc344445601156b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 14 Oct 2013 12:24:36 +0300 Subject: Fix #2682 --- index.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 3040ef080..72c97c410 100755 --- a/index.php +++ b/index.php @@ -220,28 +220,28 @@ switch (ENVIRONMENT) $application_folder = $_temp; } - define('APPPATH', $application_folder.'/'); + define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); } else { - if ( ! is_dir(BASEPATH.$application_folder.'/')) + if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) { header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG. } - define('APPPATH', BASEPATH.$application_folder.'/'); + define('APPPATH', BASEPATH.$application_folder.DIRECTORY_SEPARATOR); } // The path to the "views" folder if ( ! is_dir($view_folder)) { - if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.'/')) + if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) { $view_folder = APPPATH.$view_folder; } - elseif ( ! is_dir(APPPATH.'views/')) + elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) { header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; @@ -255,11 +255,11 @@ switch (ENVIRONMENT) if (($_temp = realpath($view_folder)) !== FALSE) { - $view_folder = $_temp.'/'; + $view_folder = $_temp.DIRECTORY_SEPARATOR; } else { - $view_folder = rtrim($view_folder, '/').'/'; + $view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR; } define('VIEWPATH', $view_folder); -- 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. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 72c97c410..6a932424e 100755 --- a/index.php +++ b/index.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 7cf682abf46bcaa112b63c500a884ba25c0dd8b3 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 13 Mar 2014 14:55:45 +0200 Subject: Partially revert PR #2190 The core shouldn't depend on constants that are not defined by itself --- index.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6a932424e..80082111e 100755 --- a/index.php +++ b/index.php @@ -68,7 +68,7 @@ switch (ENVIRONMENT) default: header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); echo 'The application environment is not set correctly.'; - exit(1); // EXIT_* constants not yet defined; 1 is EXIT_ERROR, a generic error. + exit(1); // EXIT_ERROR } /* @@ -192,7 +192,7 @@ switch (ENVIRONMENT) { header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); echo 'Your system folder path does not appear to be set correctly. Please open the following file and correct this: '.pathinfo(__FILE__, PATHINFO_BASENAME); - exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG. + exit(3); // EXIT_CONFIG } /* @@ -228,7 +228,7 @@ switch (ENVIRONMENT) { header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; - exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG. + exit(3); // EXIT_CONFIG } define('APPPATH', BASEPATH.$application_folder.DIRECTORY_SEPARATOR); @@ -245,7 +245,7 @@ switch (ENVIRONMENT) { header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; - exit(3); // EXIT_* constants not yet defined; 3 is EXIT_CONFIG. + exit(3); // EXIT_CONFIG } else { -- cgit v1.2.3-24-g4f1b From d40d94ca5f304d8a084accd3162163026617a606 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 6 Oct 2014 03:19:17 +0300 Subject: E_DEPRECATED is not available in PHP 5.2 --- index.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 80082111e..236c740c6 100755 --- a/index.php +++ b/index.php @@ -61,8 +61,15 @@ switch (ENVIRONMENT) case 'testing': case 'production': - error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT); ini_set('display_errors', 0); + if (version_compare(PHP_VERSION, '5.3', '>=')) + { + error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED); + } + else + { + error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE); + } break; default: -- 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 --- index.php | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 236c740c6..92c92c0c3 100755 --- a/index.php +++ b/index.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 */ -- 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 --- index.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 92c92c0c3..ba0ba67f5 100755 --- a/index.php +++ b/index.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 --- index.php | 3 --- 1 file changed, 3 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index ba0ba67f5..34addf8c3 100755 --- a/index.php +++ b/index.php @@ -290,6 +290,3 @@ switch (ENVIRONMENT) * And away we go... */ require_once BASEPATH.'core/CodeIgniter.php'; - -/* End of file index.php */ -/* Location: ./index.php */ \ No newline at end of file -- cgit v1.2.3-24-g4f1b From e65038d04ddd17a8d77db02e5cd73feac7ae3ba1 Mon Sep 17 00:00:00 2001 From: Charly Faille Date: Thu, 5 Feb 2015 14:56:33 +0100 Subject: Fix incorrect FCPATH when a folder is named SELF If code igniter is located inside a folder named like SELF (eg. index.php), the FCPATH constant will have an incorrect value. --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 34addf8c3..b32723913 100755 --- a/index.php +++ b/index.php @@ -225,7 +225,7 @@ switch (ENVIRONMENT) define('BASEPATH', str_replace('\\', '/', $system_path)); // Path to the front controller (this file) - define('FCPATH', str_replace(SELF, '', __FILE__)); + define('FCPATH', dirname(__FILE__) . '/'); // Name of the "system folder" define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); -- cgit v1.2.3-24-g4f1b From 514896e1b0df12bc82dac785fa7c9ed4f62585e6 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Thu, 5 Feb 2015 16:03:25 +0200 Subject: [ci skip] Again, remove whitespace --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index b32723913..4dbc12a5a 100755 --- a/index.php +++ b/index.php @@ -225,7 +225,7 @@ switch (ENVIRONMENT) define('BASEPATH', str_replace('\\', '/', $system_path)); // Path to the front controller (this file) - define('FCPATH', dirname(__FILE__) . '/'); + define('FCPATH', dirname(__FILE__).'/'); // Name of the "system folder" define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); -- 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 --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 4dbc12a5a..a5f5df819 100755 --- a/index.php +++ b/index.php @@ -31,7 +31,7 @@ * @copyright Copyright (c) 2008 - 2014, EllisLab, Inc. (http://ellislab.com/) * @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 + * @link https://codeigniter.com * @since Version 1.0.0 * @filesource */ @@ -109,7 +109,7 @@ switch (ENVIRONMENT) * folder than the default one you can set its name here. The folder * can also be renamed or relocated anywhere on your server. If * you do, use a full server path. For more info please see the user guide: - * http://codeigniter.com/user_guide/general/managing_apps.html + * https://codeigniter.com/user_guide/general/managing_apps.html * * NO TRAILING SLASH! */ -- 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 --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index a5f5df819..13fcd5996 100755 --- a/index.php +++ b/index.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 - 2015, 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 363d56a6fafb1ff7c8dd8ac8d88abe854df26868 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 12 Jan 2016 16:15:50 +0200 Subject: [ci skip] 2016 in index.php --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 13fcd5996..5cc37108a 100755 --- a/index.php +++ b/index.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. (https://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 https://codeigniter.com * @since Version 1.0.0 -- cgit v1.2.3-24-g4f1b From 2961883c06ba963a67a68c34ef90a57ff5c38646 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 20:01:57 +0200 Subject: [ci skip] Update the index.php file - Use DIRECTORY_SEPARATOR instead of a hard-coded forward-slash - Use more proper terminology in comment descriptions - Small tweaks to directory detection logic --- index.php | 125 +++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 74 insertions(+), 51 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index 5cc37108a..6986e1e5d 100755 --- a/index.php +++ b/index.php @@ -91,24 +91,25 @@ switch (ENVIRONMENT) /* *--------------------------------------------------------------- - * SYSTEM FOLDER NAME + * SYSTEM DIRCTORY NAME *--------------------------------------------------------------- * - * This variable must contain the name of your "system" folder. - * Include the path if the folder is not in the same directory - * as this file. + * This variable must contain the name of your "system" directory. + * Set the path if it is not in the same directory as this file. */ $system_path = 'system'; /* *--------------------------------------------------------------- - * APPLICATION FOLDER NAME + * APPLICATION DIRECTORY NAME *--------------------------------------------------------------- * * If you want this front controller to use a different "application" - * folder than the default one you can set its name here. The folder - * can also be renamed or relocated anywhere on your server. If - * you do, use a full server path. For more info please see the user guide: + * directory than the default one you can set its name here. The directory + * can also be renamed or relocated anywhere on your server. If you do, + * use an absolute (full) server path. + * For more info please see the user guide: + * * https://codeigniter.com/user_guide/general/managing_apps.html * * NO TRAILING SLASH! @@ -117,14 +118,14 @@ switch (ENVIRONMENT) /* *--------------------------------------------------------------- - * VIEW FOLDER NAME + * VIEW DIRECTORY NAME *--------------------------------------------------------------- * - * If you want to move the view folder out of the application - * folder set the path to the folder here. The folder can be renamed + * If you want to move the view directory out of the application + * directory, set the path to it here. The directory can be renamed * and relocated anywhere on your server. If blank, it will default - * to the standard location inside your application folder. If you - * do move this, use the full server path to this folder. + * to the standard location inside your application directory. + * If you do move this, use an absolute (full) server path. * * NO TRAILING SLASH! */ @@ -150,8 +151,8 @@ switch (ENVIRONMENT) * * Un-comment the $routing array below to use this feature */ - // The directory name, relative to the "controllers" folder. Leave blank - // if your controller is not in a sub-folder within the "controllers" folder + // The directory name, relative to the "controllers" directory. Leave blank + // if your controller is not in a sub-directory within the "controllers" one // $routing['directory'] = ''; // The controller class file name. Example: mycontroller @@ -197,12 +198,16 @@ switch (ENVIRONMENT) if (($_temp = realpath($system_path)) !== FALSE) { - $system_path = $_temp.'/'; + $system_path = $_temp.DIRECTORY_SEPARATOR; } else { // Ensure there's a trailing slash - $system_path = rtrim($system_path, '/').'/'; + $system_path = strtr( + rtrim($system_path, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ).DIRECTORY_SEPARATOR; } // Is the system path correct? @@ -221,66 +226,84 @@ switch (ENVIRONMENT) // The name of THIS file define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME)); - // Path to the system folder - define('BASEPATH', str_replace('\\', '/', $system_path)); + // Path to the system directory + define('BASEPATH', $system_path); - // Path to the front controller (this file) - define('FCPATH', dirname(__FILE__).'/'); + // Path to the front controller (this file) directory + define('FCPATH', dirname(__FILE__).DIRECTORY_SEPARATOR); - // Name of the "system folder" - define('SYSDIR', trim(strrchr(trim(BASEPATH, '/'), '/'), '/')); + // Name of the "system" directory + define('SYSDIR', basename(BASEPATH)); - // The path to the "application" folder + // The path to the "application" directory if (is_dir($application_folder)) { if (($_temp = realpath($application_folder)) !== FALSE) { - $application_folder = $_temp; + $application_folder = $_temp.DIRECTORY_SEPARATOR; + } + else + { + $application_folder = strtr( + rtrim($application_folder, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ); } - - define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); + } + elseif (is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) + { + $application_folder = BASEPATH.strtr( + trim($application_folder, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ); } else { - if ( ! is_dir(BASEPATH.$application_folder.DIRECTORY_SEPARATOR)) - { - header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); - echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; - exit(3); // EXIT_CONFIG - } - - define('APPPATH', BASEPATH.$application_folder.DIRECTORY_SEPARATOR); + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); + echo 'Your application folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; + exit(3); // EXIT_CONFIG } - // The path to the "views" folder - if ( ! is_dir($view_folder)) + define('APPPATH', $application_folder.DIRECTORY_SEPARATOR); + + // The path to the "views" directory + if ( ! isset($view_folder[0]) && is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) { - if ( ! empty($view_folder) && is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) - { - $view_folder = APPPATH.$view_folder; - } - elseif ( ! is_dir(APPPATH.'views'.DIRECTORY_SEPARATOR)) + $view_folder = APPPATH.'views'; + } + elseif (is_dir($view_folder)) + { + if (($_temp = realpath($view_folder)) !== FALSE) { - header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); - echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; - exit(3); // EXIT_CONFIG + $view_folder = $_temp; } else { - $view_folder = APPPATH.'views'; + $view_folder = strtr( + rtrim($view_folder, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ); } } - - if (($_temp = realpath($view_folder)) !== FALSE) + elseif (is_dir(APPPATH.$view_folder.DIRECTORY_SEPARATOR)) { - $view_folder = $_temp.DIRECTORY_SEPARATOR; + $view_folder = APPPATH.strtr( + trim($view_folder, '/\\'), + '/\\', + DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR + ); } else { - $view_folder = rtrim($view_folder, '/\\').DIRECTORY_SEPARATOR; + header('HTTP/1.1 503 Service Unavailable.', TRUE, 503); + echo 'Your view folder path does not appear to be set correctly. Please open the following file and correct this: '.SELF; + exit(3); // EXIT_CONFIG } - define('VIEWPATH', $view_folder); + define('VIEWPATH', $view_folder.DIRECTORY_SEPARATOR); /* * -------------------------------------------------------------------- -- cgit v1.2.3-24-g4f1b From ca956162f5793527d7151bddd1fb223edbfed46b Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 12 Mar 2016 20:04:08 +0200 Subject: [ci skip] Revert an unnecessary change from last commit --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 6986e1e5d..7f9a777b5 100755 --- a/index.php +++ b/index.php @@ -240,7 +240,7 @@ switch (ENVIRONMENT) { if (($_temp = realpath($application_folder)) !== FALSE) { - $application_folder = $_temp.DIRECTORY_SEPARATOR; + $application_folder = $_temp; } else { -- cgit v1.2.3-24-g4f1b From a990a8d195a13dd38bdd1620391a4e1b40770952 Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sun, 13 Mar 2016 15:44:01 +0200 Subject: [ci skip] Fix a comment typo --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'index.php') diff --git a/index.php b/index.php index 7f9a777b5..d02b6bb38 100755 --- a/index.php +++ b/index.php @@ -91,7 +91,7 @@ switch (ENVIRONMENT) /* *--------------------------------------------------------------- - * SYSTEM DIRCTORY NAME + * SYSTEM DIRECTORY NAME *--------------------------------------------------------------- * * This variable must contain the name of your "system" directory. -- 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 --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'index.php') diff --git a/index.php b/index.php index d02b6bb38..c27a78ea5 100755 --- a/index.php +++ b/index.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