Cleanup of stray spaces and tabs
diff --git a/system/database/drivers/mysqli/mysqli_driver.php b/system/database/drivers/mysqli/mysqli_driver.php
index d0e2def..69e0928 100644
--- a/system/database/drivers/mysqli/mysqli_driver.php
+++ b/system/database/drivers/mysqli/mysqli_driver.php
@@ -31,7 +31,7 @@
 class CI_DB_mysqli_driver extends CI_DB {
 
 	var $dbdriver = 'mysqli';
-	
+
 	// The character used for escaping
 	var $_escape_char = '`';
 
@@ -51,7 +51,7 @@
 	 * Whether to use the MySQL "delete hack" which allows the number
 	 * of affected rows to be shown. Uses a preg_replace when enabled,
 	 * adding a bit more processing to all queries.
-	 */	
+	 */
 	var $delete_hack = TRUE;
 
 	// --------------------------------------------------------------------
@@ -61,12 +61,12 @@
 	 *
 	 * @access	private called by the base class
 	 * @return	resource
-	 */	
+	 */
 	function db_connect()
 	{
 		if ($this->port != '')
 		{
-			return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database, $this->port);			
+			return @mysqli_connect($this->hostname, $this->username, $this->password, $this->database, $this->port);
 		}
 		else
 		{
@@ -82,12 +82,12 @@
 	 *
 	 * @access	private called by the base class
 	 * @return	resource
-	 */	
+	 */
 	function db_pconnect()
 	{
 		return $this->db_connect();
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -114,7 +114,7 @@
 	 *
 	 * @access	private called by the base class
 	 * @return	resource
-	 */	
+	 */
 	function db_select()
 	{
 		return @mysqli_select_db($this->conn_id, $this->database);
@@ -136,7 +136,7 @@
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Version number query string
 	 *
@@ -156,14 +156,14 @@
 	 * @access	private called by the base class
 	 * @param	string	an SQL query
 	 * @return	resource
-	 */	
+	 */
 	function _execute($sql)
 	{
-		$sql = $this->_prep_query($sql);	
+		$sql = $this->_prep_query($sql);
 		$result = @mysqli_query($this->conn_id, $sql);
 		return $result;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -174,7 +174,7 @@
 	 * @access	private called by execute()
 	 * @param	string	an SQL query
 	 * @return	string
-	 */	
+	 */
 	function _prep_query($sql)
 	{
 		// "DELETE FROM TABLE" returns 0 affected rows This hack modifies
@@ -186,7 +186,7 @@
 				$sql = preg_replace("/^\s*DELETE\s+FROM\s+(\S+)\s*$/", "DELETE FROM \\1 WHERE 1=1", $sql);
 			}
 		}
-		
+
 		return $sql;
 	}
 
@@ -196,15 +196,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)
 		{
@@ -227,8 +227,8 @@
 	 * Commit Transaction
 	 *
 	 * @access	public
-	 * @return	bool		
-	 */	
+	 * @return	bool
+	 */
 	function trans_commit()
 	{
 		if ( ! $this->trans_enabled)
@@ -253,8 +253,8 @@
 	 * Rollback Transaction
 	 *
 	 * @access	public
-	 * @return	bool		
-	 */	
+	 * @return	bool
+	 */
 	function trans_rollback()
 	{
 		if ( ! $this->trans_enabled)
@@ -283,17 +283,17 @@
 	 * @param	bool	whether or not the string will be used in a LIKE condition
 	 * @return	string
 	 */
-	function escape_str($str, $like = FALSE)	
+	function escape_str($str, $like = FALSE)
 	{
 		if (is_array($str))
 		{
 			foreach($str as $key => $val)
-	   		{
+			{
 				$str[$key] = $this->escape_str($val, $like);
-	   		}
-   		
-	   		return $str;
-	   	}
+			}
+
+			return $str;
+		}
 
 		if (function_exists('mysqli_real_escape_string') AND is_object($this->conn_id))
 		{
@@ -307,16 +307,16 @@
 		{
 			$str = addslashes($str);
 		}
-		
+
 		// escape LIKE condition wildcards
 		if ($like === TRUE)
 		{
 			$str = str_replace(array('%', '_'), array('\\%', '\\_'), $str);
 		}
-		
+
 		return $str;
 	}
-		
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -329,7 +329,7 @@
 	{
 		return @mysqli_affected_rows($this->conn_id);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -386,13 +386,13 @@
 	 */
 	function _list_tables($prefix_limit = FALSE)
 	{
-		$sql = "SHOW TABLES FROM ".$this->_escape_char.$this->database.$this->_escape_char;	
-		
+		$sql = "SHOW TABLES FROM ".$this->_escape_char.$this->database.$this->_escape_char;
+
 		if ($prefix_limit !== FALSE AND $this->dbprefix != '')
 		{
 			$sql .= " LIKE '".$this->escape_like_str($this->dbprefix)."%'";
 		}
-		
+
 		return $sql;
 	}
 
@@ -440,7 +440,7 @@
 	{
 		return mysqli_error($this->conn_id);
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -471,31 +471,31 @@
 		{
 			return $item;
 		}
-		
+
 		foreach ($this->_reserved_identifiers as $id)
 		{
 			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);
 	}
-			
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -514,12 +514,12 @@
 		{
 			$tables = array($tables);
 		}
-		
+
 		return '('.implode(', ', $tables).')';
 	}
 
 	// --------------------------------------------------------------------
-	
+
 	/**
 	 * Insert statement
 	 *
@@ -532,10 +532,10 @@
 	 * @return	string
 	 */
 	function _insert($table, $keys, $values)
-	{	
+	{
 		return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -557,21 +557,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;
 	}
 
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -584,12 +584,12 @@
 	 * @access	public
 	 * @param	string	the table name
 	 * @return	string
-	 */	
+	 */
 	function _truncate($table)
 	{
 		return "TRUNCATE ".$table;
 	}
-	
+
 	// --------------------------------------------------------------------
 
 	/**
@@ -602,7 +602,7 @@
 	 * @param	array	the where clause
 	 * @param	string	the limit clause
 	 * @return	string
-	 */	
+	 */
 	function _delete($table, $where = array(), $like = array(), $limit = FALSE)
 	{
 		$conditions = '';
@@ -620,7 +620,7 @@
 		}
 
 		$limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
-	
+
 		return "DELETE FROM ".$table.$conditions.$limit;
 	}
 
@@ -638,14 +638,14 @@
 	 * @return	string
 	 */
 	function _limit($sql, $limit, $offset)
-	{	
+	{
 		$sql .= "LIMIT ".$limit;
-	
+
 		if ($offset > 0)
 		{
 			$sql .= " OFFSET ".$offset;
 		}
-		
+
 		return $sql;
 	}