Merge pull request #26 from marcoscoelho/cart_total_items

Count items in the cart based on quantity, not on how many different things are in there.
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 2925d3c..5720a06 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -64,8 +64,8 @@
 
 		$form .= '>';
 
-		// CSRF
-		if ($CI->config->item('csrf_protection') === TRUE)
+		// Add CSRF field if enabled, but leave it out for GET requests and requests to external websites	
+		if ($CI->config->item('csrf_protection') === TRUE AND ! (strpos($action, $CI->config->site_url()) === FALSE OR strpos($form, 'method="get"')))	
 		{
 			$hidden[$CI->security->get_csrf_token_name()] = $CI->security->get_csrf_hash();
 		}
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index a924edc..4c4e670 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -80,6 +80,7 @@
 	<li>Helpers
 		<ul>
 			<li>Added an optional third parameter to <samp>heading()</samp> which allows adding html attributes to the rendered heading tag.</li>
+			<li class="reactor"><kbd>form_open()</kbd> now only adds a hidden (Cross-site Reference Forgery) protection field when the form's action is internal and is set to the post method. (Reactor #165)</li>
 		</ul>
 	</li>
 	<li>Libraries