Merge pull request #508 from wooptoo/develop

Added TLS and SSL support to Email library
diff --git a/application/config/doctypes.php b/application/config/doctypes.php
index f7e1d19..c9f16ee 100644
--- a/application/config/doctypes.php
+++ b/application/config/doctypes.php
@@ -5,6 +5,7 @@
 					'xhtml1-strict'	=> '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
 					'xhtml1-trans'	=> '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
 					'xhtml1-frame'	=> '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
+					'xhtml-basic11'	=> '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
 					'html5'			=> '<!DOCTYPE html>',
 					'html4-strict'	=> '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
 					'html4-trans'	=> '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 7162e2a..8351823 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -196,7 +196,7 @@
 			$alias = $this->_create_alias_from_table(trim($select));
 		}
 
-		$sql = $type.'('.$this->_protect_identifiers(trim($select)).') AS '.$this->_protect_identifiers(trim($alias));
+		$sql = $this->_protect_identifiers($type.'('.trim($select).')').' AS '.$this->_protect_identifiers(trim($alias));
 
 		$this->ar_select[] = $sql;
 
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 34fefb0..fef05f7 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -82,6 +82,7 @@
 			<li>Altered form helper - made action on form_open_multipart helper function call optional.  Fixes (#65)</li>
 			<li><samp>url_title()</samp> will now trim extra dashes from beginning and end.</li>
 			<li>Improved speed of <a href="helpers/string_helper.html">String Helper</a>'s <b>random_string()</b> method</li>
+			<li>Added XHTML Basic 1.1 doctype to <a href="helpers/html_helper.html">HTML Helper</a>.</li>
 		</ul>
 	</li>
 	<li>Database
diff --git a/user_guide/general/cli.html b/user_guide/general/cli.html
index 4e9bf87..9091e93 100644
--- a/user_guide/general/cli.html
+++ b/user_guide/general/cli.html
@@ -138,11 +138,11 @@
 
 <div id="footer">
 <p>
-Previous Topic:&nbsp;&nbsp;<a href="urls.html">CodeIgniter URLs</a>
+Previous Topic:&nbsp;&nbsp;<a href="profiling.html">Profiling Your Application</a>
 &nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
 <a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
 <a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
-Next Topic:&nbsp;&nbsp;<a href="reserved_names.html">Reserved Names</a></p>
+Next Topic:&nbsp;&nbsp;<a href="managing_apps.html">Managing Applications</a></p>
 <p><a href="http://codeigniter.com">CodeIgniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 - 2011 &nbsp;&middot;&nbsp; <a href="http://ellislab.com/">EllisLab, Inc.</a></p>
 </div>
 
diff --git a/user_guide/general/managing_apps.html b/user_guide/general/managing_apps.html
index e716d10..93585e2 100644
--- a/user_guide/general/managing_apps.html
+++ b/user_guide/general/managing_apps.html
@@ -120,14 +120,14 @@
 
 <div id="footer">
 <p>
-Previous Topic:&nbsp;&nbsp;<a href="profiling.html">Profiling Your Application</a>
+Previous Topic:&nbsp;&nbsp;<a href="cli.html">Running via the CLI</a>
 &nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
 <a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
 <a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
-Next Topic:&nbsp;&nbsp;<a href="alternative_php.html">Alternative PHP Syntax</a>
+Next Topic:&nbsp;&nbsp;<a href="environments.html">Handling Multiple Environments</a>
 </p>
 <p><a href="http://codeigniter.com">CodeIgniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 - 2011 &nbsp;&middot;&nbsp; <a href="http://ellislab.com/">EllisLab, Inc.</a></p>
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/user_guide/general/profiling.html b/user_guide/general/profiling.html
index 0993da5..c7c4ed3 100644
--- a/user_guide/general/profiling.html
+++ b/user_guide/general/profiling.html
@@ -177,10 +177,10 @@
 &nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
 <a href="#top">Top of Page</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
 <a href="../index.html">User Guide Home</a>&nbsp;&nbsp;&nbsp;&middot;&nbsp;&nbsp;
-Next Topic:&nbsp;&nbsp;<a href="managing_apps.html">Managing Applications</a>
+Next Topic:&nbsp;&nbsp;<a href="cli.html">Running via the CLI</a>
 </p>
 <p><a href="http://codeigniter.com">CodeIgniter</a> &nbsp;&middot;&nbsp; Copyright &#169; 2006 - 2011 &nbsp;&middot;&nbsp; <a href="http://ellislab.com/">EllisLab, Inc.</a></p>
 </div>
 
 </body>
-</html>
\ No newline at end of file
+</html>
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html
index 92bfdfb..4b13427 100644
--- a/user_guide/helpers/html_helper.html
+++ b/user_guide/helpers/html_helper.html
@@ -348,6 +348,11 @@
 	<td class="td">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"&gt;</td>
 	</tr>
 	<tr>
+	<td class="td">XHTML Basic 1.1</td>
+	<td class="td">doctype('xhtml-basic11')</td>
+	<td class="td">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd"&gt;</td>
+	</tr>
+	<tr>
 	<td class="td">HTML 5</td>
 	<td class="td">doctype('html5')</td>
 	<td class="td">&lt;!DOCTYPE html&gt;</td>