Cleanup of stray spaces and tabs
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php
index c08ed2a..ea0583e 100644
--- a/system/database/drivers/sqlite/sqlite_driver.php
+++ b/system/database/drivers/sqlite/sqlite_driver.php
@@ -33,14 +33,14 @@
 class CI_DB_sqlite_driver extends CI_DB {
 
 	var $dbdriver = 'sqlite';
-	
+
 	// The character used to escape with - not needed for SQLite
 	var $_escape_char = '';
 
 	// clause and character used for LIKE escape sequences
- 	var $_like_escape_str = " ESCAPE '%s' ";
+	var $_like_escape_str = " ESCAPE '%s' ";
 	var $_like_escape_chr = '!';
-	
+
 	/**
 	 * The syntax to count rows is slightly different across different
 	 * database engines, so this string appears in each driver and is
@@ -54,24 +54,24 @@
 	 *
 	 * @access	private called by the base class
 	 * @return	resource
-	 */	
+	 */
 	function db_connect()
 	{
 		if ( ! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error))
 		{
 			log_message('error', $error);
-			
+
 			if ($this->db_debug)
 			{
 				$this->display_error($error, '', TRUE);
 			}
-			
+
 			return FALSE;
 		}
-		
+
 		return $conn_id;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -79,24 +79,24 @@
 	 *
 	 * @access	private called by the base class
 	 * @return	resource
-	 */	
+	 */
 	function db_pconnect()
 	{
 		if ( ! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error))
 		{
 			log_message('error', $error);
-			
+
 			if ($this->db_debug)
 			{
 				$this->display_error($error, '', TRUE);
 			}
-			
+
 			return FALSE;
 		}
-		
+
 		return $conn_id;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -120,7 +120,7 @@
 	 *
 	 * @access	private called by the base class
 	 * @return	resource
-	 */	
+	 */
 	function db_select()
 	{
 		return TRUE;
@@ -143,7 +143,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Version number query string
 	 *
@@ -154,7 +154,7 @@
 	{
 		return sqlite_libversion();
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -163,13 +163,13 @@
 	 * @access	private called by the base class
 	 * @param	string	an SQL query
 	 * @return	resource
-	 */	
+	 */
 	function _execute($sql)
 	{
 		$sql = $this->_prep_query($sql);
 		return @sqlite_query($this->conn_id, $sql);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -180,7 +180,7 @@
 	 * @access	private called by execute()
 	 * @param	string	an SQL query
 	 * @return	string
-	 */	
+	 */
 	function _prep_query($sql)
 	{
 		return $sql;
@@ -192,15 +192,15 @@
 	 * Begin Transaction
 	 *
 	 * @access	public
-	 * @return	bool		
-	 */	
+	 * @return	bool
+	 */
 	function trans_begin($test_mode = FALSE)
 	{
 		if ( ! $this->trans_enabled)
 		{
 			return TRUE;
 		}
-		
+
 		// When transactions are nested we only begin/commit/rollback the outermost ones
 		if ($this->_trans_depth > 0)
 		{
@@ -222,8 +222,8 @@
 	 * Commit Transaction
 	 *
 	 * @access	public
-	 * @return	bool		
-	 */	
+	 * @return	bool
+	 */
 	function trans_commit()
 	{
 		if ( ! $this->trans_enabled)
@@ -247,8 +247,8 @@
 	 * Rollback Transaction
 	 *
 	 * @access	public
-	 * @return	bool		
-	 */	
+	 * @return	bool
+	 */
 	function trans_rollback()
 	{
 		if ( ! $this->trans_enabled)
@@ -265,7 +265,7 @@
 		$this->simple_query('ROLLBACK');
 		return TRUE;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -281,15 +281,15 @@
 		if (is_array($str))
 		{
 			foreach($str as $key => $val)
-	   		{
+			{
 				$str[$key] = $this->escape_str($val, $like);
-	   		}
-   		
-	   		return $str;
-	   	}
-	
+			}
+
+			return $str;
+		}
+
 		$str = sqlite_escape_string($str);
-		
+
 		// escape LIKE condition wildcards
 		if ($like === TRUE)
 		{
@@ -297,10 +297,10 @@
 								array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr),
 								$str);
 		}
-		
+
 		return $str;
 	}
-		
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -313,7 +313,7 @@
 	{
 		return sqlite_changes($this->conn_id);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -347,7 +347,7 @@
 		}
 
 		$query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
-		
+
 		if ($query->num_rows() == 0)
 		{
 			return 0;
@@ -424,7 +424,7 @@
 	{
 		return sqlite_error_string(sqlite_last_error($this->conn_id));
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -460,26 +460,26 @@
 		{
 			if (strpos($item, '.'.$id) !== FALSE)
 			{
-				$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);  
-				
+				$str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
+
 				// remove duplicates if the user already included the escape
 				return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
-			}		
+			}
 		}
-	
+
 		if (strpos($item, '.') !== FALSE)
 		{
-			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;			
+			$str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
 		}
 		else
 		{
 			$str = $this->_escape_char.$item.$this->_escape_char;
 		}
-		
+
 		// remove duplicates if the user already included the escape
 		return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
 	}
-			
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -498,12 +498,12 @@
 		{
 			$tables = array($tables);
 		}
-		
+
 		return '('.implode(', ', $tables).')';
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Insert statement
 	 *
@@ -516,10 +516,10 @@
 	 * @return	string
 	 */
 	function _insert($table, $keys, $values)
-	{	
+	{
 		return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -541,21 +541,21 @@
 		{
 			$valstr[] = $key." = ".$val;
 		}
-		
+
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
-		
+
 		$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
-	
+
 		$sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
 
 		$sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
 
 		$sql .= $orderby.$limit;
-		
+
 		return $sql;
 	}
 
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -568,12 +568,12 @@
 	 * @access	public
 	 * @param	string	the table name
 	 * @return	string
-	 */	
+	 */
 	function _truncate($table)
 	{
 		return $this->_delete($table);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -586,7 +586,7 @@
 	 * @param	array	the where clause
 	 * @param	string	the limit clause
 	 * @return	string
-	 */	
+	 */
 	function _delete($table, $where = array(), $like = array(), $limit = FALSE)
 	{
 		$conditions = '';
@@ -604,10 +604,10 @@
 		}
 
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
-	
+
 		return "DELETE FROM ".$table.$conditions.$limit;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -622,7 +622,7 @@
 	 * @return	string
 	 */
 	function _limit($sql, $limit, $offset)
-	{	
+	{
 		if ($offset == 0)
 		{
 			$offset = '';
@@ -631,7 +631,7 @@
 		{
 			$offset .= ", ";
 		}
-		
+
 		return $sql."LIMIT ".$offset.$limit;
 	}
 
diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php
index 53b20a3..7b5c894 100644
--- a/system/database/drivers/sqlite/sqlite_forge.php
+++ b/system/database/drivers/sqlite/sqlite_forge.php
@@ -75,13 +75,13 @@
 	function _create_table($table, $fields, $primary_keys, $keys, $if_not_exists)
 	{
 		$sql = 'CREATE TABLE ';
-		
+
 		// IF NOT EXISTS added to SQLite in 3.3.0
 		if ($if_not_exists === TRUE && version_compare($this->db->_version(), '3.3.0', '>=') === TRUE)
 		{
 			$sql .= 'IF NOT EXISTS ';
 		}
-		
+
 		$sql .= $this->db->_escape_identifiers($table)."(";
 		$current_field_count = 0;
 
@@ -97,41 +97,41 @@
 			else
 			{
 				$attributes = array_change_key_case($attributes, CASE_UPPER);
-				
+
 				$sql .= "\n\t".$this->db->_protect_identifiers($field);
-				
+
 				$sql .=  ' '.$attributes['TYPE'];
-	
+
 				if (array_key_exists('CONSTRAINT', $attributes))
 				{
 					$sql .= '('.$attributes['CONSTRAINT'].')';
 				}
-	
+
 				if (array_key_exists('UNSIGNED', $attributes) && $attributes['UNSIGNED'] === TRUE)
 				{
 					$sql .= ' UNSIGNED';
 				}
-	
+
 				if (array_key_exists('DEFAULT', $attributes))
 				{
 					$sql .= ' DEFAULT \''.$attributes['DEFAULT'].'\'';
 				}
-	
+
 				if (array_key_exists('NULL', $attributes) && $attributes['NULL'] === TRUE)
 				{
 					$sql .= ' NULL';
 				}
 				else
 				{
-					$sql .= ' NOT NULL';			
+					$sql .= ' NOT NULL';
 				}
-	
+
 				if (array_key_exists('AUTO_INCREMENT', $attributes) && $attributes['AUTO_INCREMENT'] === TRUE)
 				{
 					$sql .= ' AUTO_INCREMENT';
 				}
 			}
-			
+
 			// don't add a comma on the end of the last field
 			if (++$current_field_count < count($fields))
 			{
@@ -151,13 +151,13 @@
 			{
 				if (is_array($key))
 				{
-					$key = $this->db->_protect_identifiers($key);	
+					$key = $this->db->_protect_identifiers($key);
 				}
 				else
 				{
 					$key = array($this->db->_protect_identifiers($key));
 				}
-				
+
 				$sql .= ",\n\tUNIQUE (" . implode(', ', $key) . ")";
 			}
 		}
@@ -237,9 +237,9 @@
 		{
 			$sql .= ' AFTER ' . $this->db->_protect_identifiers($after_field);
 		}
-		
+
 		return $sql;
-		
+
 	}
 
 	// --------------------------------------------------------------------
diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php
index 7b06312..fd6d83d 100644
--- a/system/database/drivers/sqlite/sqlite_result.php
+++ b/system/database/drivers/sqlite/sqlite_result.php
@@ -25,7 +25,7 @@
  * @link		http://codeigniter.com/user_guide/database/
  */
 class CI_DB_sqlite_result extends CI_DB_result {
-	
+
 	/**
 	 * Number of rows in the result set
 	 *
@@ -36,7 +36,7 @@
 	{
 		return @sqlite_num_rows($this->result_id);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -67,7 +67,7 @@
 		{
 			$field_names[] = sqlite_field_name($this->result_id, $i);
 		}
-		
+
 		return $field_names;
 	}
 
@@ -86,16 +86,16 @@
 		$retval = array();
 		for ($i = 0; $i < $this->num_fields(); $i++)
 		{
-			$F 				= new stdClass();
-			$F->name 		= sqlite_field_name($this->result_id, $i);
-			$F->type 		= 'varchar';
+			$F				= new stdClass();
+			$F->name		= sqlite_field_name($this->result_id, $i);
+			$F->type		= 'varchar';
 			$F->max_length	= 0;
 			$F->primary_key = 0;
 			$F->default		= '';
 
 			$retval[] = $F;
 		}
-		
+
 		return $retval;
 	}
 
@@ -105,7 +105,7 @@
 	 * Free the result
 	 *
 	 * @return	null
-	 */		
+	 */
 	function free_result()
 	{
 		// Not implemented in SQLite
@@ -142,7 +142,7 @@
 	{
 		return sqlite_fetch_array($this->result_id);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -168,7 +168,7 @@
 				return $obj;
 			} else {
 				return NULL;
-			} 
+			}
 		}
 	}