Derek Jones avatar Derek Jones committed 4560a12 Merge

hand merged remaining unresolved files following the backout of 648b42a75739, which was a NON-trivial whitespace commit

Comments (0)

Files changed (230)

application/config/autoload.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------
 | AUTO-LOADER
 | In order to keep the framework as light-weight as possible only the
 | absolute minimal resources are loaded by default. For example,
 | the database is not connected to automatically since no assumption
-| is made regarding whether you intend to use it. This file lets
+| is made regarding whether you intend to use it.  This file lets
 | you globally define which systems you would like loaded with every
 | request.
 |
 
 /*
 | -------------------------------------------------------------------
-| Auto-load Packges
+|  Auto-load Packges
 | -------------------------------------------------------------------
 | Prototype:
 |
-| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
+|  $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
 |
 */
 
 
 /*
 | -------------------------------------------------------------------
-| Auto-load Libraries
+|  Auto-load Libraries
 | -------------------------------------------------------------------
 | These are the classes located in the system/libraries folder
 | or in your application/libraries folder.
 
 /*
 | -------------------------------------------------------------------
-| Auto-load Helper Files
+|  Auto-load Helper Files
 | -------------------------------------------------------------------
 | Prototype:
 |
 
 /*
 | -------------------------------------------------------------------
-| Auto-load Config files
+|  Auto-load Config files
 | -------------------------------------------------------------------
 | Prototype:
 |
 |	$autoload['config'] = array('config1', 'config2');
 |
 | NOTE: This item is intended for use ONLY if you have created custom
-| config files. Otherwise, leave it blank.
+| config files.  Otherwise, leave it blank.
 |
 */
 
 
 /*
 | -------------------------------------------------------------------
-| Auto-load Language files
+|  Auto-load Language files
 | -------------------------------------------------------------------
 | Prototype:
 |
 |	$autoload['language'] = array('lang1', 'lang2');
 |
-| NOTE: Do not include the "_lang" part of your file. For example
+| NOTE: Do not include the "_lang" part of your file.  For example
 | "codeigniter_lang.php" would be referenced as array('codeigniter');
 |
 */
 
 /*
 | -------------------------------------------------------------------
-| Auto-load Models
+|  Auto-load Models
 | -------------------------------------------------------------------
 | Prototype:
 |

application/config/config.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
 /*
 |--------------------------------------------------------------------------
 |--------------------------------------------------------------------------
 |
 | This item determines which server global should be used to retrieve the
-| URI string. The default setting of 'AUTO' works for most servers.
+| URI string.  The default setting of 'AUTO' works for most servers.
 | If your links do not seem to work, try one of the other delicious flavors:
 |
 | 'AUTO'			Default - auto detects
 |--------------------------------------------------------------------------
 |
 | If you would like to use the 'hooks' feature you must enable it by
-| setting this variable to TRUE (boolean). See the user guide for details.
+| setting this variable to TRUE (boolean).  See the user guide for details.
 |
 */
 $config['enable_hooks'] = FALSE;
 |--------------------------------------------------------------------------
 |
 | This item allows you to set the filename/classname prefix when extending
-| native libraries. For more information please see the user guide:
+| native libraries.  For more information please see the user guide:
 |
 | http://codeigniter.com/user_guide/general/core_classes.html
 | http://codeigniter.com/user_guide/general/creating_libraries.html
 |--------------------------------------------------------------------------
 |
 | This lets you specify with a regular expression which characters are permitted
-| within your URLs. When someone tries to submit a URL with disallowed
+| within your URLs.  When someone tries to submit a URL with disallowed
 | characters they will get a warning message.
 |
 | As a security measure you are STRONGLY encouraged to restrict URLs to
-| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
+| as few characters as possible.  By default only these are allowed: a-z 0-9~%.:_-
 |
 | Leave blank to allow all characters -- but only if you are insane.
 |
 | By default CodeIgniter uses search-engine friendly segment based URLs:
 | example.com/who/what/where/
 |
-| By default CodeIgniter enables access to the $_GET array. If for some
+| By default CodeIgniter enables access to the $_GET array.  If for some
 | reason you would like to disable it, set 'allow_get_array' to FALSE.
 |
 | You can optionally enable standard query string based URLs:
 |--------------------------------------------------------------------------
 |
 | Leave this BLANK unless you would like to set something other than the default
-| system/cache/ folder. Use a full server path with trailing slash.
+| system/cache/ folder.  Use a full server path with trailing slash.
 |
 */
 $config['cache_path'] = '';
 |--------------------------------------------------------------------------
 |
 | If you use the Encryption class or the Session class you
-| MUST set an encryption key. See the user guide for info.
+| MUST set an encryption key.  See the user guide for info.
 |
 */
 $config['encryption_key'] = '';
 |
 | 'sess_cookie_name'		= the name you want for the cookie
 | 'sess_expiration'			= the number of SECONDS you want the session to last.
-|  by default sessions last 7200 seconds (two hours). Set to zero for no expiration.
+|   by default sessions last 7200 seconds (two hours).  Set to zero for no expiration.
 | 'sess_expire_on_close'	= Whether to cause the session to expire automatically
-|  when the browser window is closed
+|   when the browser window is closed
 | 'sess_encrypt_cookie'		= Whether to encrypt the cookie
 | 'sess_use_database'		= Whether to save the session data to a database
 | 'sess_table_name'			= The name of the session database table
 |
 | 'cookie_prefix' = Set a prefix if you need to avoid collisions
 | 'cookie_domain' = Set to .your-domain.com for site-wide cookies
-| 'cookie_path'  = Typically will be a forward slash
-| 'cookie_secure' = Cookies will only be set if a secure HTTPS connection exists.
+| 'cookie_path'   =  Typically will be a forward slash
+| 'cookie_secure' =  Cookies will only be set if a secure HTTPS connection exists.
 |
 */
 $config['cookie_prefix']	= "";
 | Output Compression
 |--------------------------------------------------------------------------
 |
-| Enables Gzip output compression for faster page loads. When enabled,
+| Enables Gzip output compression for faster page loads.  When enabled,
 | the output class will test whether your server supports Gzip.
 | Even if it does, however, not all browsers support compression
 | so enable only if you are reasonably sure your visitors can handle it.
 |
-| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
+| VERY IMPORTANT:  If you are getting a blank page when compression is enabled it
 | means you are prematurely outputting something to your browser. It could
-| even be a line of whitespace at the end of one of your scripts. For
+| even be a line of whitespace at the end of one of your scripts.  For
 | compression to work, nothing can be sent before the output buffer is called
-| by the output class. Do not 'echo' any values with compression enabled.
+| by the output class.  Do not 'echo' any values with compression enabled.
 |
 */
 $config['compress_output'] = FALSE;
 | Master Time Reference
 |--------------------------------------------------------------------------
 |
-| Options are 'local' or 'gmt'. This pref tells the system whether to use
+| Options are 'local' or 'gmt'.  This pref tells the system whether to use
 | your server's local time as the master 'now' reference, or convert it to
-| GMT. See the 'date helper' page of the user guide for information
+| GMT.  See the 'date helper' page of the user guide for information
 | regarding date handling.
 |
 */
 |
 | If your PHP installation does not have short tag support enabled CI
 | can rewrite the tags on-the-fly, enabling you to utilize that syntax
-| in your view files. Options are TRUE or FALSE (boolean)
+| in your view files.  Options are TRUE or FALSE (boolean)
 |
 */
 $config['rewrite_short_tags'] = FALSE;

application/config/constants.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 
 /*
 |--------------------------------------------------------------------------
 |--------------------------------------------------------------------------
 |
 | These prefs are used when checking and setting modes when working
-| with the file system. The defaults are fine on servers with proper
+| with the file system.  The defaults are fine on servers with proper
 | security, but you may wish (or even need) to change the values in
 | certain environments (Apache running a separate process for each
-| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
+| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
 | always be used to set the mode correctly.
 |
 */

application/config/database.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------
 | DATABASE CONNECTIVITY SETTINGS
 |	['username'] The username used to connect to the database
 |	['password'] The password used to connect to the database
 |	['database'] The name of the database you want to connect to
-|	['dbdriver'] The database type. ie: mysql. Currently supported:
-|				 mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
+|	['dbdriver'] The database type. ie: mysql.  Currently supported:
+				 mysql, mysqli, postgre, odbc, mssql, sqlite, oci8
 |	['dbprefix'] You can add an optional prefix, which will be added
-|				 to the table name when using the Active Record class
+|				 to the table name when using the  Active Record class
 |	['pconnect'] TRUE/FALSE - Whether to use a persistent connection
 |	['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
 |	['cache_on'] TRUE/FALSE - Enables/disables query caching
 |							- good for ensuring strict SQL while developing
 |
 | The $active_group variable lets you choose which connection group to
-| make active. By default there is only one group (the 'default' group).
+| make active.  By default there is only one group (the 'default' group).
 |
 | The $active_record variables lets you determine whether or not to load
 | the active record class

application/config/foreign_chars.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------
 | Foreign Characters

application/config/hooks.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------------
 | Hooks
 | -------------------------------------------------------------------------
 | This file lets you define "hooks" to extend CI without hacking the core
-| files. Please see the user guide for info:
+| files.  Please see the user guide for info:
 |
 |	http://codeigniter.com/user_guide/general/hooks.html
 |

application/config/mimes.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------
 | MIME TYPES
 | -------------------------------------------------------------------
-| This file contains an array of mime types. It is used by the
+| This file contains an array of mime types.  It is used by the
 | Upload class to help identify allowed file types.
 |
 */
 				'tgz'	=>	array('application/x-tar', 'application/x-gzip-compressed'),
 				'xhtml'	=>	'application/xhtml+xml',
 				'xht'	=>	'application/xhtml+xml',
-				'zip'	=> array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
+				'zip'	=>  array('application/x-zip', 'application/zip', 'application/x-zip-compressed'),
 				'mid'	=>	'audio/midi',
 				'midi'	=>	'audio/midi',
 				'mpga'	=>	'audio/mpeg',
 				'jpeg'	=>	array('image/jpeg', 'image/pjpeg'),
 				'jpg'	=>	array('image/jpeg', 'image/pjpeg'),
 				'jpe'	=>	array('image/jpeg', 'image/pjpeg'),
-				'png'	=>	array('image/png', 'image/x-png'),
+				'png'	=>	array('image/png',  'image/x-png'),
 				'tiff'	=>	'image/tiff',
 				'tif'	=>	'image/tiff',
 				'css'	=>	'text/css',

application/config/profiler.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------------
 | Profiler Sections

application/config/routes.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------------
 | URI ROUTING

application/config/smileys.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------
 | SMILEYS
 | -------------------------------------------------------------------
 | This file contains an array of smileys for use with the emoticon helper.
-| Individual images can be used to replace multiple simileys. For example:
+| Individual images can be used to replace multiple simileys.  For example:
 | :-) and :) use the same image replacement.
 |
 | Please see user guide for more info:

application/config/user_agents.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /*
 | -------------------------------------------------------------------
 | USER AGENT TYPES
 | -------------------------------------------------------------------
-| This file contains four arrays of user agent data. It is used by the
+| This file contains four arrays of user agent data.  It is used by the
 | User Agent Class to help identify browser, platform, robot, and
-| mobile device data. The array keys are used to identify the device
+| 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.
 |
 */

application/controllers/welcome.php

 	 *
 	 * Maps to the following URL
 	 * 		http://example.com/index.php/welcome
-	 *	- or -
+	 *	- or -  
 	 * 		http://example.com/index.php/welcome/index
 	 *	- or -
-	 * Since this controller is set as the default controller in
+	 * Since this controller is set as the default controller in 
 	 * config/routes.php, it's displayed at http://example.com/
 	 *
 	 * So any other public methods not prefixed with an underscore will

application/errors/error_php.php

 <h4>A PHP Error was encountered</h4>
 
 <p>Severity: <?php echo $severity; ?></p>
-<p>Message: <?php echo $message; ?></p>
+<p>Message:  <?php echo $message; ?></p>
 <p>Filename: <?php echo $filepath; ?></p>
 <p>Line Number: <?php echo $line; ?></p>
 
  *
  * This can be set to anything, but default usage is:
  *
- *   development
- *   testing
- *   production
+ *     development
+ *     testing
+ *     production
  *
  * NOTE: If you change these, also change the error_reporting() code below
  *
 		case 'development':
 			error_reporting(E_ALL);
 		break;
-
+	
 		case 'testing':
 		case 'production':
 			error_reporting(0);
  *---------------------------------------------------------------
  *
  * 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.
  *
  */
  *
  * 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
  *
  *
  * 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
+	// The directory name, relative to the "controllers" folder.  Leave blank
 	// 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.
 
 /*
  * -------------------------------------------------------------------
- * CUSTOM CONFIG VALUES
+ *  CUSTOM CONFIG VALUES
  * -------------------------------------------------------------------
  *
  * The $assign_to_config array below will be passed dynamically to the
 
 
 // --------------------------------------------------------------------
-// END OF USER CONFIGURABLE SETTINGS. DO NOT EDIT BELOW THIS LINE
+// END OF USER CONFIGURABLE SETTINGS.  DO NOT EDIT BELOW THIS LINE
 // --------------------------------------------------------------------
 
 /*
  * ---------------------------------------------------------------
- * Resolve the system path for increased reliability
+ *  Resolve the system path for increased reliability
  * ---------------------------------------------------------------
  */
 
 
 /*
  * -------------------------------------------------------------------
- * Now that we know the path, set the main path constants
+ *  Now that we know the path, set the main path constants
  * -------------------------------------------------------------------
  */
 	// The name of THIS file
 All rights reserved.
 
 This license is a legal agreement between you and EllisLab Inc. for the use
-of CodeIgniter Software (the "Software"). By obtaining the Software you
+of CodeIgniter Software (the "Software").  By obtaining the Software you
 agree to comply with the terms and conditions of this license.
 
 PERMITTED USE
 WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE
 APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING
 BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF
-DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS.
+DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS.

system/core/Benchmark.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
  * CodeIgniter Benchmark Class
  *
  * This class enables you to mark points and calculate the time difference
- * between them. Memory consumption can also be displayed.
+ * between them.  Memory consumption can also be displayed.
  *
  * @package		CodeIgniter
  * @subpackage	Libraries

system/core/CodeIgniter.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
 
 /*
  * ------------------------------------------------------
- * Define the CodeIgniter Version
+ *  Define the CodeIgniter Version
  * ------------------------------------------------------
  */
 	define('CI_VERSION', '2.0.2');
 
 /*
  * ------------------------------------------------------
- * Define the CodeIgniter Branch (Core = TRUE, Reactor = FALSE)
+ *  Define the CodeIgniter Branch (Core = TRUE, Reactor = FALSE)
  * ------------------------------------------------------
  */
 	define('CI_CORE', FALSE);
 
 /*
  * ------------------------------------------------------
- * Load the global functions
+ *  Load the global functions
  * ------------------------------------------------------
  */
 	require(BASEPATH.'core/Common.php');
 
 /*
  * ------------------------------------------------------
- * Load the framework constants
+ *  Load the framework constants
  * ------------------------------------------------------
  */
 	if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/constants.php'))
 
 /*
  * ------------------------------------------------------
- * Define a custom error handler so we can log PHP errors
+ *  Define a custom error handler so we can log PHP errors
  * ------------------------------------------------------
  */
 	set_error_handler('_exception_handler');
 
 /*
  * ------------------------------------------------------
- * Set the subclass_prefix
+ *  Set the subclass_prefix
  * ------------------------------------------------------
  *
  * Normally the "subclass_prefix" is set in the config file.
  * "libraries" folder. Since CI allows config items to be
  * overriden via data set in the main index. php file,
  * before proceeding we need to know if a subclass_prefix
- * override exists. If so, we will set this value now,
+ * override exists.  If so, we will set this value now,
  * before any classes are loaded
  * Note: Since the config file data is cached it doesn't
  * hurt to load it here.
 
 /*
  * ------------------------------------------------------
- * Set a liberal script execution time limit
+ *  Set a liberal script execution time limit
  * ------------------------------------------------------
  */
 	if (function_exists("set_time_limit") == TRUE AND @ini_get("safe_mode") == 0)
 
 /*
  * ------------------------------------------------------
- * Start the timer... tick tock tick tock...
+ *  Start the timer... tick tock tick tock...
  * ------------------------------------------------------
  */
 	$BM =& load_class('Benchmark', 'core');
 
 /*
  * ------------------------------------------------------
- * Instantiate the hooks class
+ *  Instantiate the hooks class
  * ------------------------------------------------------
  */
 	$EXT =& load_class('Hooks', 'core');
 
 /*
  * ------------------------------------------------------
- * Is there a "pre_system" hook?
+ *  Is there a "pre_system" hook?
  * ------------------------------------------------------
  */
 	$EXT->_call_hook('pre_system');
 
 /*
  * ------------------------------------------------------
- * Instantiate the config class
+ *  Instantiate the config class
  * ------------------------------------------------------
  */
 	$CFG =& load_class('Config', 'core');
 
 /*
  * ------------------------------------------------------
- * Instantiate the UTF-8 class
+ *  Instantiate the UTF-8 class
  * ------------------------------------------------------
  *
  * Note: Order here is rather important as the UTF-8
 
 /*
  * ------------------------------------------------------
- * Instantiate the URI class
+ *  Instantiate the URI class
  * ------------------------------------------------------
  */
 	$URI =& load_class('URI', 'core');
 
 /*
  * ------------------------------------------------------
- * Instantiate the routing class and set the routing
+ *  Instantiate the routing class and set the routing
  * ------------------------------------------------------
  */
 	$RTR =& load_class('Router', 'core');
 
 /*
  * ------------------------------------------------------
- * Instantiate the output class
+ *  Instantiate the output class
  * ------------------------------------------------------
  */
 	$OUT =& load_class('Output', 'core');
 
 /*
  * ------------------------------------------------------
- *	Is there a valid cache file? If so, we're done...
+ *	Is there a valid cache file?  If so, we're done...
  * ------------------------------------------------------
  */
 	if ($EXT->_call_hook('cache_override') === FALSE)
 
 /*
  * ------------------------------------------------------
- * Load the Input class and sanitize globals
+ *  Load the Input class and sanitize globals
  * ------------------------------------------------------
  */
 	$IN	=& load_class('Input', 'core');
 
 /*
  * ------------------------------------------------------
- * Load the Language class
+ *  Load the Language class
  * ------------------------------------------------------
  */
 	$LANG =& load_class('Lang', 'core');
 
 /*
  * ------------------------------------------------------
- * Load the app controller and local controller
+ *  Load the app controller and local controller
  * ------------------------------------------------------
  *
  */
 
 /*
  * ------------------------------------------------------
- * Security check
+ *  Security check
  * ------------------------------------------------------
  *
- * None of the functions in the app controller or the
- * loader class can be called via the URI, nor can
- * controller functions that begin with an underscore
+ *  None of the functions in the app controller or the
+ *  loader class can be called via the URI, nor can
+ *  controller functions that begin with an underscore
  */
-	$class = $RTR->fetch_class();
+	$class  = $RTR->fetch_class();
 	$method = $RTR->fetch_method();
 
 	if ( ! class_exists($class)
 
 /*
  * ------------------------------------------------------
- * Is there a "pre_controller" hook?
+ *  Is there a "pre_controller" hook?
  * ------------------------------------------------------
  */
 	$EXT->_call_hook('pre_controller');
 
 /*
  * ------------------------------------------------------
- * Instantiate the requested controller
+ *  Instantiate the requested controller
  * ------------------------------------------------------
  */
 	// Mark a start point so we can benchmark the controller
 
 /*
  * ------------------------------------------------------
- * Is there a "post_controller_constructor" hook?
+ *  Is there a "post_controller_constructor" hook?
  * ------------------------------------------------------
  */
 	$EXT->_call_hook('post_controller_constructor');
 
 /*
  * ------------------------------------------------------
- * Call the requested method
+ *  Call the requested method
  * ------------------------------------------------------
  */
 	// Is there a "remap" function? If so, we call it instead
 
 /*
  * ------------------------------------------------------
- * Is there a "post_controller" hook?
+ *  Is there a "post_controller" hook?
  * ------------------------------------------------------
  */
 	$EXT->_call_hook('post_controller');
 
 /*
  * ------------------------------------------------------
- * Send the final rendered output to the browser
+ *  Send the final rendered output to the browser
  * ------------------------------------------------------
  */
 	if ($EXT->_call_hook('display_override') === FALSE)
 
 /*
  * ------------------------------------------------------
- * Is there a "post_system" hook?
+ *  Is there a "post_system" hook?
  * ------------------------------------------------------
  */
 	$EXT->_call_hook('post_system');
 
 /*
  * ------------------------------------------------------
- * Close the DB connection if one exists
+ *  Close the DB connection if one exists
  * ------------------------------------------------------
  */
 	if (class_exists('CI_DB') AND isset($CI->db))

system/core/Common.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
  * Tests for file writability
  *
  * is_writable() returns TRUE on Windows servers when you really can't write to
- * the file, based on the read-only attribute. is_writable() is also unreliable
+ * the file, based on the read-only attribute.  is_writable() is also unreliable
  * on Unix servers if safe_mode is on.
  *
  * @access	private
 		}
 
 		// For windows servers and safe_mode "on" installations we'll actually
-		// write a file then read it. Bah...
+		// write a file then read it.  Bah...
 		if (is_dir($file))
 		{
 			$file = rtrim($file, '/').'/'.md5(mt_rand(1,100).mt_rand(1,100));
 /**
 * Class registry
 *
-* This function acts as a singleton. If the requested class does not
-* exist it is instantiated and set to a static variable. If it has
+* This function acts as a singleton.  If the requested class does not
+* exist it is instantiated and set to a static variable.  If it has
 * previously been instantiated the variable is returned.
 *
 * @access	public
 	{
 		static $_classes = array();
 
-		// Does the class exist? If so, we're done...
+		// Does the class exist?  If so, we're done...
 		if (isset($_classes[$class]))
 		{
 			return $_classes[$class];
 			}
 		}
 
-		// Is the request a class extension? If so we load it too
+		// Is the request a class extension?  If so we load it too
 		if (file_exists(APPPATH.$directory.'/'.config_item('subclass_prefix').$class.'.php'))
 		{
 			$name = config_item('subclass_prefix').$class;
 // --------------------------------------------------------------------
 
 /**
-* Keeps track of which libraries have been loaded. This function is
+* Keeps track of which libraries have been loaded.  This function is
 * called by the load_class() function above
 *
 * @access	public
 
 		if ($text == '')
 		{
-			show_error('No status text available. Please check your status code number or supply your own message text.', 500);
+			show_error('No status text available.  Please check your status code number or supply your own message text.', 500);
 		}
 
 		$server_protocol = (isset($_SERVER['SERVER_PROTOCOL'])) ? $_SERVER['SERVER_PROTOCOL'] : FALSE;
 * Exception Handler
 *
 * This is the custom exception handler that is declaired at the top
-* of Codeigniter.php. The main reason we use this is to permit
+* of Codeigniter.php.  The main reason we use this is to permit
 * PHP errors to be logged in our own log files since the user may
 * not have access to server logs. Since this function
 * effectively intercepts PHP errors, however, we also need
 			$_error->show_php_error($severity, $message, $filepath, $line);
 		}
 
-		// Should we log the error? No? We're done...
+		// Should we log the error?  No?  We're done...
 		if (config_item('log_threshold') == 0)
 		{
 			return;
 	function remove_invisible_characters($str, $url_encoded = TRUE)
 	{
 		$non_displayables = array();
-
+		
 		// every control character except newline (dec 10)
 		// carriage return (dec 13), and horizontal tab (dec 09)
-
+		
 		if ($url_encoded)
 		{
 			$non_displayables[] = '/%0[0-8bcef]/';	// url encoded 00-08, 11, 12, 14, 15
 			$non_displayables[] = '/%1[0-9a-f]/';	// url encoded 16-31
 		}
-
+		
 		$non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S';	// 00-08, 11, 12, 14-31, 127
 
 		do

system/core/Config.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
 	 *
 	 * Sets the $config data from the primary config.php file as a class variable
 	 *
-	 * @access  public
-	 * @param  string	the config file name
-	 * @param  boolean if configuration values should be loaded into their own section
-	 * @param  boolean true if errors should just return false, false if an error message should be displayed
-	 * @return boolean if the file was successfully loaded or not
+	 * @access   public
+	 * @param   string	the config file name
+	 * @param   boolean  if configuration values should be loaded into their own section
+	 * @param   boolean  true if errors should just return false, false if an error message should be displayed
+	 * @return  boolean  if the file was successfully loaded or not
 	 */
 	function __construct()
 	{
 	 *
 	 * @access	public
 	 * @param	string	the config file name
-	 * @param  boolean if configuration values should be loaded into their own section
-	 * @param  boolean true if errors should just return false, false if an error message should be displayed
+	 * @param   boolean  if configuration values should be loaded into their own section
+	 * @param   boolean  true if errors should just return false, false if an error message should be displayed
 	 * @return	boolean	if the file was loaded correctly
 	 */
 	function load($file = '', $use_sections = FALSE, $fail_gracefully = FALSE)
 	 * Assign to Config
 	 *
 	 * This function is called by the front controller (CodeIgniter.php)
-	 * after the Config class is instantiated. It permits config items
+	 * after the Config class is instantiated.  It permits config items
 	 * to be assigned or overriden by variables contained in the index.php file
 	 *
 	 * @access	private

system/core/Controller.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
 	public function __construct()
 	{
 		self::$instance =& $this;
-
+		
 		// Assign all the class objects that were instantiated by the
 		// bootstrap file (CodeIgniter.php) to local class variables
 		// so that CI can run as one big super object.
 		$this->load =& load_class('Loader', 'core');
 
 		$this->load->set_base_classes()->ci_autoloader();
-
+		
 		log_message('debug', "Controller Class Initialized");
 	}
 

system/core/Exceptions.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
 	public function __construct()
 	{
 		$this->ob_level = ob_get_level();
-		// Note: Do not log messages from this constructor.
+		// Note:  Do not log messages from this constructor.
 	}
 
 	// --------------------------------------------------------------------
 	{
 		$severity = ( ! isset($this->levels[$severity])) ? $severity : $this->levels[$severity];
 
-		log_message('error', 'Severity: '.$severity.' --> '.$message. ' '.$filepath.' '.$line, TRUE);
+		log_message('error', 'Severity: '.$severity.'  --> '.$message. ' '.$filepath.' '.$line, TRUE);
 	}
 
 	// --------------------------------------------------------------------

system/core/Hooks.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
 
 		if (defined('ENVIRONMENT') AND is_file(APPPATH.'config/'.ENVIRONMENT.'/hooks.php'))
 		{
-		  include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
+		    include(APPPATH.'config/'.ENVIRONMENT.'/hooks.php');
 		}
 		elseif (is_file(APPPATH.'config/hooks.php'))
 		{

system/core/Input.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
 	var $_enable_csrf			= FALSE; // Set automatically based on config setting
 
 	protected $headers			= array();
-
+	
 
 	/**
 	 * Constructor
 			}
 			return $post;
 		}
-
+		
 		return $this->_fetch_from_array($_POST, $index, $xss_clean);
 	}
 
 	* @param	mixed
 	* @param	string	the value of the cookie
 	* @param	string	the number of seconds until expiration
-	* @param	string	the cookie domain. Usually: .yourdomain.com
+	* @param	string	the cookie domain.  Usually:  .yourdomain.com
 	* @param	string	the cookie path
 	* @param	string	the cookie prefix
 	* @param	bool	true makes the cookie secure
 	function _sanitize_globals()
 	{
 		// It would be "wrong" to unset any of these GLOBALS.
-		$protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST',
+		$protected = array('_SERVER', '_GET', '_POST', '_FILES', '_REQUEST', 
 							'_SESSION', '_ENV', 'GLOBALS', 'HTTP_RAW_POST_DATA',
-							'system_folder', 'application_folder', 'BM', 'EXT',
+							'system_folder', 'application_folder', 'BM', 'EXT', 
 							'CFG', 'URI', 'RTR', 'OUT', 'IN');
 
 		// Unset globals for securiy.
 		{
 			$str = $this->uni->clean_string($str);
 		}
-
+		
 		// Remove control characters
 		$str = remove_invisible_characters($str);
 
 	/**
 	 * Request Headers
 	 *
-	 * In Apache, you can simply call apache_request_headers(), however for
+	 * In Apache, you can simply call apache_request_headers(), however for 
 	 * people running other webservers the function is undefined.
 	 *
 	 * @return array
 		{
 			$key = str_replace('_', ' ', strtolower($key));
 			$key = str_replace(' ', '-', ucwords($key));
-
+			
 			$this->headers[$key] = $val;
 		}
-
+		
 		return $this->headers;
 	}
 
 		{
 			$this->request_headers();
 		}
-
+		
 		if ( ! isset($this->headers[$index]))
 		{
 			return FALSE;
 			return $this->security->xss_clean($this->headers[$index]);
 		}
 
-		return $this->headers[$index];
+		return $this->headers[$index];		
 	}
 
 	// --------------------------------------------------------------------

system/core/Lang.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *

system/core/Loader.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
 	protected $_ci_loaded_files		= array();
 	protected $_ci_models			= array();
 	protected $_ci_helpers			= array();
-	protected $_ci_varmap			= array('unit_test' => 'unit',
+	protected $_ci_varmap			= array('unit_test' => 'unit', 
 											'user_agent' => 'agent');
 
 	/**
 	 */
 	public function __construct()
 	{
-		$this->_ci_ob_level = ob_get_level();
+		$this->_ci_ob_level  = ob_get_level();
 		$this->_ci_library_paths = array(APPPATH, BASEPATH);
 		$this->_ci_helper_paths = array(APPPATH, BASEPATH);
 		$this->_ci_model_paths = array(APPPATH);
 		$this->_ci_view_paths = array(APPPATH.'views/'	=> TRUE);
-
+		
 		log_message('debug', "Loader Class Initialized");
 	}
 
 	// --------------------------------------------------------------------
-
+	
 	/**
 	 * Set _base_classes variable
 	 *
 	 * This method is called once in CI_Controller.
 	 *
-	 * @param 	array
+	 * @param 	array 	
 	 * @return 	object
 	 */
 	public function set_base_classes()
 	{
 		$this->_base_classes =& is_loaded();
-
+		
 		return $this;
 	}
 
 		{
 			return $this->_ci_classes[$class];
 		}
-
+				
 		return FALSE;
 	}
 
 			return DB($params, $active_record);
 		}
 
-		// Initialize the db variable. Needed to prevent
+		// Initialize the db variable.  Needed to prevent
 		// reference errors with some configurations
 		$CI->db = '';
 
 	/**
 	 * Load View
 	 *
-	 * This function is used to load a "view" file. It has three parameters:
+	 * This function is used to load a "view" file.  It has three parameters:
 	 *
 	 * 1. The name of the "view" file to be included.
 	 * 2. An associative array of data to be extracted for use in the view.
-	 * 3. TRUE/FALSE - whether to return the data or load it. In
+	 * 3. TRUE/FALSE - whether to return the data or load it.  In
 	 * some cases it's advantageous to be able to return data so that
 	 * a developer can process it in some way.
 	 *
 	 * Prepends a parent path to the library, model, helper, and config path arrays
 	 *
 	 * @param	string
-	 * @param 	boolean
+	 * @param 	boolean 	
 	 * @return	void
 	 */
 	public function add_package_path($path, $view_cascade=TRUE)
 	{
 		$path = rtrim($path, '/').'/';
-
+		
 		array_unshift($this->_ci_library_paths, $path);
 		array_unshift($this->_ci_model_paths, $path);
 		array_unshift($this->_ci_helper_paths, $path);
 					unset($this->{$var}[$key]);
 				}
 			}
-
+			
 			if (isset($this->_ci_view_paths[$path.'views/']))
 			{
 				unset($this->_ci_view_paths[$path.'views/']);
 		{
 			$$_ci_val = ( ! isset($_ci_data[$_ci_val])) ? FALSE : $_ci_data[$_ci_val];
 		}
-
+		
 		$file_exists = FALSE;
 
 		// Set the path to the requested file
 					$file_exists = TRUE;
 					break;
 				}
-
+				
 				if ( ! $cascade)
 				{
 					break;
-				}
+				}				
 			}
 		}
 
 		 * We buffer the output for two reasons:
 		 * 1. Speed. You get a significant speed boost.
 		 * 2. So that the final rendered template can be
-		 * post-processed by the output class. Why do we
-		 * need post processing? For one thing, in order to
-		 * show the elapsed page load time. Unless we
+		 * post-processed by the output class.  Why do we
+		 * need post processing?  For one thing, in order to
+		 * show the elapsed page load time.  Unless we
 		 * can intercept the content right before it's sent to
 		 * the browser and then stop the timer it won't be accurate.
 		 */
 					show_error("Unable to load the requested class: ".$class);
 				}
 
-				// Safety: Was the class already loaded by a previous call?
+				// Safety:  Was the class already loaded by a previous call?
 				if (in_array($subclass, $this->_ci_loaded_files))
 				{
 					// Before we deem this to be a duplicate request, let's see
-					// if a custom object name is being supplied. If so, we'll
+					// if a custom object name is being supplied.  If so, we'll
 					// return a new instance of the object
 					if ( ! is_null($object_name))
 					{
 			{
 				$filepath = $path.'libraries/'.$subdir.$class.'.php';
 
-				// Does the file exist? No? Bummer...
+				// Does the file exist?  No?  Bummer...
 				if ( ! file_exists($filepath))
 				{
 					continue;
 				}
 
-				// Safety: Was the class already loaded by a previous call?
+				// Safety:  Was the class already loaded by a previous call?
 				if (in_array($filepath, $this->_ci_loaded_files))
 				{
 					// Before we deem this to be a duplicate request, let's see
-					// if a custom object name is being supplied. If so, we'll
+					// if a custom object name is being supplied.  If so, we'll
 					// return a new instance of the object
 					if ( ! is_null($object_name))
 					{
 
 		} // END FOREACH
 
-		// One last attempt. Maybe the library is in a subdirectory, but it wasn't specified?
+		// One last attempt.  Maybe the library is in a subdirectory, but it wasn't specified?
 		if ($subdir == '')
 		{
 			$path = strtolower($class).'/'.$class;
 	 */
 	protected function _ci_init_class($class, $prefix = '', $config = FALSE, $object_name = NULL)
 	{
-		// Is there an associated config file for this class? Note: these should always be lowercase
+		// Is there an associated config file for this class?  Note: these should always be lowercase
 		if ($config === NULL)
 		{
 			// Fetch the config paths containing any package paths
 		}
 
 		// Set the variable name we will assign the class to
-		// Was a custom class name supplied? If so we'll use it
+		// Was a custom class name supplied?  If so we'll use it
 		$class = strtolower($class);
 
 		if (is_null($object_name))
 	 * The config/autoload.php file contains an array that permits sub-systems,
 	 * libraries, and helpers to be loaded automatically.
 	 *
-	 * This function is public, as it's used in the CI_Controller class.
+	 * This function is public, as it's used in the CI_Controller class.  
 	 * However, there is no reason you should ever needs to use it.
 	 *
 	 * @param	array
 		{
 			include_once(APPPATH.'config/autoload.php');
 		}
-
+		
 
 		if ( ! isset($autoload))
 		{

system/core/Model.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *

system/core/Output.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
 		// Get mime types for later
 		if (defined('ENVIRONMENT') AND file_exists(APPPATH.'config/'.ENVIRONMENT.'/mimes.php'))
 		{
-		  include APPPATH.'config/'.ENVIRONMENT.'/mimes.php';
+		    include APPPATH.'config/'.ENVIRONMENT.'/mimes.php';
 		}
 		else
 		{
 	 *
 	 * Lets you set a server header which will be outputted with the final display.
 	 *
-	 * Note: If a file is cached, headers will not be sent. We need to figure out
+	 * Note:  If a file is cached, headers will not be sent.  We need to figure out
 	 * how to permit header data to be saved with the cache data...
 	 *
 	 * @access	public
 	 * $this->final_output
 	 *
 	 * This function sends the finalized output data to the browser along
-	 * with any server headers and profile data. It also stops the
+	 * with any server headers and profile data.  It also stops the
 	 * benchmark timer so the page rendering speed and memory usage can be shown.
 	 *
 	 * @access	public
 	 */
 	function _display($output = '')
 	{
-		// Note: We use globals because we can't use $CI =& get_instance()
+		// Note:  We use globals because we can't use $CI =& get_instance()
 		// since this function is sometimes called by the caching mechanism,
 		// which happens before the CI super object is available.
 		global $BM, $CFG;
 
 		// --------------------------------------------------------------------
 
-		// Do we need to write a cache file? Only if the controller does not have its
+		// Do we need to write a cache file?  Only if the controller does not have its
 		// own _output() method and we are not dealing with a cache file, which we
 		// can determine by the existence of the $CI object above
 		if ($this->cache_expiration > 0 && isset($CI) && ! method_exists($CI, '_output'))
 			// we will remove them and add them back after we insert the profile data
 			if (preg_match("|</body>.*?</html>|is", $output))
 			{
-				$output = preg_replace("|</body>.*?</html>|is", '', $output);
+				$output  = preg_replace("|</body>.*?</html>|is", '', $output);
 				$output .= $CI->profiler->run();
 				$output .= '</body></html>';
 			}
 		// --------------------------------------------------------------------
 
 		// Does the controller contain a function named _output()?
-		// If so send the output there. Otherwise, echo it.
+		// If so send the output there.  Otherwise, echo it.
 		if (method_exists($CI, '_output'))
 		{
 			$CI->_output($output);
 		}
 		else
 		{
-			echo $output; // Send it to the browser!
+			echo $output;  // Send it to the browser!
 		}
 
 		log_message('debug', "Final output sent to browser");
 	{
 		$cache_path = ($CFG->item('cache_path') == '') ? APPPATH.'cache/' : $CFG->item('cache_path');
 
-		// Build the file path. The file name is an MD5 hash of the full URI
+		// Build the file path.  The file name is an MD5 hash of the full URI
 		$uri =	$CFG->item('base_url').
 				$CFG->item('index_page').
 				$URI->uri_string;

system/core/Router.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
 	 */
 	function _set_routing()
 	{
-		// Are query strings enabled in the config file? Normally CI doesn't utilize query strings
+		// Are query strings enabled in the config file?  Normally CI doesn't utilize query strings
 		// since URI segments are more search-engine friendly, but they can optionally be used.
 		// If this feature is enabled, we will gather the directory/class/method a little differently
 		$segments = array();
 		{
 			include(APPPATH.'config/routes.php');
 		}
-
+		
 		$this->routes = ( ! isset($route) OR ! is_array($route)) ? array() : $route;
 		unset($route);
 
 		// the URI doesn't correlated to a valid controller.
 		$this->default_controller = ( ! isset($this->routes['default_controller']) OR $this->routes['default_controller'] == '') ? FALSE : strtolower($this->routes['default_controller']);
 
-		// Were there any query string segments? If so, we'll validate them and bail out since we're done.
+		// Were there any query string segments?  If so, we'll validate them and bail out since we're done.
 		if (count($segments) > 0)
 		{
 			return $this->_validate_request($segments);
 	// --------------------------------------------------------------------
 
 	/**
-	 * Validates the supplied segments. Attempts to determine the path to
+	 * Validates the supplied segments.  Attempts to determine the path to
 	 * the controller.
 	 *
 	 * @access	private
 
 
 		// If we've gotten this far it means that the URI does not correlate to a valid
-		// controller class. We will now see if there is an override
+		// controller class.  We will now see if there is an override
 		if ( ! empty($this->routes['404_override']))
 		{
 			$x = explode('/', $this->routes['404_override']);
 	// --------------------------------------------------------------------
 
 	/**
-	 * Parse Routes
+	 *  Parse Routes
 	 *
 	 * This function matches any routes that may exist in
 	 * the config/routes.php file against the URI to
 		// Turn the segment array into a URI string
 		$uri = implode('/', $this->uri->segments);
 
-		// Is there a literal match? If so we're done
+		// Is there a literal match?  If so we're done
 		if (isset($this->routes[$uri]))
 		{
 			return $this->_set_request(explode('/', $this->routes[$uri]));
 	// --------------------------------------------------------------------
 
 	/**
-	 * Set the method name
+	 *  Set the method name
 	 *
 	 * @access	public
 	 * @param	string
 	// --------------------------------------------------------------------
 
 	/**
-	 * Fetch the current method
+	 *  Fetch the current method
 	 *
 	 * @access	public
 	 * @return	string
 	// --------------------------------------------------------------------
 
 	/**
-	 * Set the directory name
+	 *  Set the directory name
 	 *
 	 * @access	public
 	 * @param	string
 	// --------------------------------------------------------------------
 
 	/**
-	 * Fetch the sub-directory (if any) that contains the requested controller class
+	 *  Fetch the sub-directory (if any) that contains the requested controller class
 	 *
 	 * @access	public
 	 * @return	string
 	// --------------------------------------------------------------------
 
 	/**
-	 * Set the controller overrides
+	 *  Set the controller overrides
 	 *
 	 * @access	public
 	 * @param	array

system/core/Security.php

-<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
+<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
 /**
  * CodeIgniter
  *
  * @link		http://codeigniter.com/user_guide/libraries/security.html
  */
 class CI_Security {
-
+	
 	protected $_xss_hash			= '';
 	protected $_csrf_hash			= '';
-	protected $_csrf_expire			= 7200; // Two hours (in seconds)
+	protected $_csrf_expire			= 7200;  // Two hours (in seconds)
 	protected $_csrf_token_name		= 'ci_csrf_token';
 	protected $_csrf_cookie_name	= 'ci_csrf_token';
 
 					"vbscript\s*:"				=> '[removed]', // IE, surprise!
 					"Redirect\s+302"			=> '[removed]'
 	);
-
+	
 	/**
 	 * Constructor
 	 */
 		}
 
 		// Do the tokens exist in both the _POST and _COOKIE arrays?
-		if ( ! isset($_POST[$this->_csrf_token_name]) OR
+		if ( ! isset($_POST[$this->_csrf_token_name]) OR 
 			 ! isset($_COOKIE[$this->_csrf_cookie_name]))
 		{
 			$this->csrf_show_error();
 			$this->csrf_show_error();
 		}
 
-		// We kill this since we're done and we don't want to
+		// We kill this since we're done and we don't want to 
 		// polute the _POST array
 		unset($_POST[$this->_csrf_token_name]);
 
 		$this->csrf_set_cookie();
 
 		log_message('debug', "CSRF token verified ");
-
+		
 		return $this;
 	}
 
 		setcookie($this->_csrf_cookie_name, $this->_csrf_hash, $expire, config_item('cookie_path'), config_item('cookie_domain'), $secure_cookie);
 
 		log_message('debug', "CRSF cookie Set");
-
+		
 		return $this;
 	}
 
 	// --------------------------------------------------------------------
 
 	/**
-	 * Get CSRF Hash
+	 * Get CSRF Hash 
 	 *
-	 * Getter Method
+	 * Getter Method 
 	 *
 	 * @return 	string 	self::_csrf_hash
 	 */
 	 * XSS Clean
 	 *
 	 * Sanitizes data so that Cross Site Scripting Hacks can be
-	 * prevented. This function does a fair amount of work but
+	 * prevented.  This function does a fair amount of work but
 	 * it is extremely thorough, designed to prevent even the
-	 * most obscure XSS attempts. Nothing is ever 100% foolproof,
+	 * most obscure XSS attempts.  Nothing is ever 100% foolproof,
 	 * of course, but I haven't been able to get anything passed
 	 * the filter.
 	 *
 	 * Note: This function should only be used to deal with data
-	 * upon submission. It's not something that should
+	 * upon submission.  It's not something that should
 	 * be used for general runtime processing.
 	 *
 	 * This function was based in part on some code and ideas I
 		 */
 
 		$str = preg_replace_callback("/[a-z]+=([\'\"]).*?\\1/si", array($this, '_convert_attribute'), $str);
-
+	
 		$str = preg_replace_callback("/<\w+.*?(?=>|<|$)/si", array($this, '_decode_entity'), $str);
 
 		/*
 		 *
 		 * This prevents strings like this: ja	vascript
 		 * NOTE: we deal with spaces between characters later.
-		 * NOTE: preg_replace was found to be amazingly slow here on
+		 * NOTE: preg_replace was found to be amazingly slow here on 
 		 * large blocks of data, so we use str_replace.
 		 */
 
 		 */
 		if ($is_image === TRUE)
 		{
-			// Images have a tendency to have the PHP short opening and
-			// closing tags every so often so we skip those and only
+			// Images have a tendency to have the PHP short opening and 
+			// closing tags every so often so we skip those and only 
 			// do the long opening tags.
 			$str = preg_replace('/<\?(php)/i', "&lt;?\\1", $str);
 		}
 		else
 		{
-			$str = str_replace(array('<?', '?'.'>'), array('&lt;?', '?&gt;'), $str);
+			$str = str_replace(array('<?', '?'.'>'),  array('&lt;?', '?&gt;'), $str);
 		}
 
 		/*
 		 * Compact any exploded words
 		 *
-		 * This corrects words like: j a v a s c r i p t
+		 * This corrects words like:  j a v a s c r i p t
 		 * These words are compacted back to their correct state.
 		 */
 		$words = array(
-				'javascript', 'expression', 'vbscript', 'script',
+				'javascript', 'expression', 'vbscript', 'script', 
 				'applet', 'alert', 'document', 'write', 'cookie', 'window'
 			);
-
+			
 		foreach ($words as $word)
 		{
 			$temp = '';
 
 		/*
 		 * Remove disallowed Javascript in links or img tags
-		 * We used to do some version comparisons and use of stripos for PHP5,
-		 * but it is dog slow compared to these simplified non-capturing
+		 * We used to do some version comparisons and use of stripos for PHP5, 
+		 * but it is dog slow compared to these simplified non-capturing 
 		 * preg_match(), especially if the pattern exists in the string
 		 */
 		do
 		 *
 		 * Similar to above, only instead of looking for
 		 * tags it looks for PHP and JavaScript commands
-		 * that are disallowed. Rather than removing the
+		 * that are disallowed.  Rather than removing the
 		 * code, it simply converts the parenthesis to entities
 		 * rendering the code un-executable.
 		 *
 
 		/*
 		 * Images are Handled in a Special Way
-		 * - Essentially, we want to know that after all of the character
-		 * conversion is done whether any unwanted, likely XSS, code was found.
+		 * - Essentially, we want to know that after all of the character 
+		 * conversion is done whether any unwanted, likely XSS, code was found.  
 		 * If not, we return TRUE, as the image is clean.
-		 * However, if the string post-conversion does not matched the
-		 * string post-removal of XSS, then it fails, as there was unwanted XSS
+		 * However, if the string post-conversion does not matched the 
+		 * string post-removal of XSS, then it fails, as there was unwanted XSS 
 		 * code found and removed/changed during processing.
 		 */
 
 	 *
 	 * In some versions of PHP the native function does not work
 	 * when UTF-8 is the specified character set, so this gives us
-	 * a work-around. More info here:
+	 * a work-around.  More info here:
 	 * http://bugs.php.net/bug.php?id=25670
 	 *
 	 * NOTE: html_entity_decode() has a bug in some PHP versions when UTF-8 is the
 		// The reason we are not using html_entity_decode() by itself is because
 		// while it is not technically correct to leave out the semicolon
 		// at the end of an entity most browsers will still interpret the entity
-		// correctly. html_entity_decode() does not convert entities without
+		// correctly.  html_entity_decode() does not convert entities without
 		// semicolons, so we are left with our own little solution here. Bummer.
 
-		if (function_exists('html_entity_decode') &&
+		if (function_exists('html_entity_decode') && 
 			(strtolower($charset) != 'utf-8'))
 		{
 			$str = html_entity_decode($str, ENT_COMPAT, $charset);
 						"%3b",		// ;
 						"%3d"		// =
 					);
-
+		
 		if ( ! $relative_path)
 		{
 			$bad[] = './';
 	}
 
 	// --------------------------------------------------------------------
-
+	
 	/*
 	 * Remove Evil HTML Attributes (like evenhandlers and style)
 	 *
 	 * 	- Everything up until a space
 	 *		For example, everything between the pipes:
 	 *		<a |style=document.write('hello');alert('world');| class=link>
-	 * 	- Everything inside the quotes
+	 * 	- Everything inside the quotes 
 	 *		For example, everything between the pipes:
 	 *		<a |style="document.write('hello'); alert('world');"| class="link">
 	 *
 		if ($is_image === TRUE)
 		{
 			/*
-			 * Adobe Photoshop puts XML metadata into JFIF images,
+			 * Adobe Photoshop puts XML metadata into JFIF images, 
 			 * including namespacing, so we have to allow this for images.
 			 */
 			unset($evil_attributes[array_search('xmlns', $evil_attributes)]);
 		}
-
+		
 		do {
 			$str = preg_replace(
 				"#<(/?[^><]+?)([^A-Za-z\-])(".implode('|', $evil_attributes).")(\s*=\s*)([\"][^>]*?[\"]|[\'][^>]*?[\']|[^>]*?)([\s><])([><]*)#i",
 				$str, -1, $count
 			);