Automated merge with http://hg.ellislab.com/CodeIgniter-Reactor
diff --git a/system/core/URI.php b/system/core/URI.php
index 1b479e9..c43cde0 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -173,6 +173,12 @@
 			$_SERVER['QUERY_STRING'] = '';
 			$_GET = array();
 		}
+		
+		if ($uri == '/' || empty($uri))
+		{
+			return '/';
+		}
+				
 		$uri = parse_url($uri, PHP_URL_PATH);
 
 		// Do some final cleaning of the URI and return it
diff --git a/system/libraries/User_agent.php b/system/libraries/User_agent.php
index c621748..3774fc2 100644
--- a/system/libraries/User_agent.php
+++ b/system/libraries/User_agent.php
@@ -375,7 +375,11 @@
 	 */
 	public function is_referral()
 	{
-		return ( ! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '');
+		if ( ! isset($_SERVER['HTTP_REFERER']) OR $_SERVER['HTTP_REFERER'] == '')
+		{
+			return FALSE;
+		}
+		return TRUE;
 	}
 
 	// --------------------------------------------------------------------
diff --git a/user_guide/database/configuration.html b/user_guide/database/configuration.html
index e9db5fc..d71cd34 100644
--- a/user_guide/database/configuration.html
+++ b/user_guide/database/configuration.html
@@ -134,7 +134,7 @@
 <li><strong>char_set</strong> - The character set used in communicating with the database.</li>
 <li><strong>dbcollat</strong> - The character collation used in communicating with the database.</li>
 <li><strong>swap_pre</strong> - A default table prefix that should be swapped with <var>dbprefix</var>.  This is useful for distributed applications where you might run manually written queries, and need the prefix to still be customizable by the end user.</li>
-<li><strong>autoinit</strong> - Whether or not to automatically initialize the database.</li>
+<li><strong>autoinit</strong> - Whether or not to automatically connect to the database when the library loads. If set to false, the connection will take place prior to executing the first query.</li>
 <li><strong>stricton</strong> - TRUE/FALSE (boolean) - Whether to force "Strict Mode" connections, good for ensuring strict SQL while developing an application.</li>
 <li><strong>port</strong> - The database port number.  To use this value you have to add a line to the database config array.<code>$db['default']['port'] =  5432;</code>
 </ul>
diff --git a/user_guide/database/results.html b/user_guide/database/results.html
index 75cb190..e9a5cb4 100644
--- a/user_guide/database/results.html
+++ b/user_guide/database/results.html
@@ -98,6 +98,18 @@
 	}
 	</code>
 
+	<p>You can also pass a string to result() which represents a class to instantiate for each result object (note: this class must be loaded)</p>
+
+	<code>
+	$query = $this->db->query("SELECT * FROM users;");<br />
+	<br />
+	foreach ($query->result('User') as $user)<br />
+	{<br />
+	&nbsp;&nbsp;&nbsp;echo $row->name; // call attributes<br />
+	&nbsp;&nbsp;&nbsp;echo $row->reverse_name(); // or methods defined on the 'User' class<br />
+	}
+	</code>
+
 	<h2>result_array()</h2>
 
 	<p>This function returns the query result as a pure array, or an empty array when no result is produced.  Typically you'll use this in a foreach loop, like this:</p>
@@ -133,6 +145,15 @@
 
 	<code>$row = $query->row(<dfn>5</dfn>);</code>
 
+	<p>You can also add a second String parameter, which is the name of a class to instantiate the row with:</p>
+
+	<code>
+	$query = $this->db->query("SELECT * FROM users LIMIT 1;");<br />
+	<br />
+	$query->row(0, 'User')<br />
+	echo $row->name; // call attributes<br />
+	echo $row->reverse_name(); // or methods defined on the 'User' class<br />
+	</code>
 
 	<h2>row_array()</h2>
 
@@ -235,4 +256,4 @@
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>