summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2012-06-14 01:04:25 +0200
committerDerek Jones <derek.jones@ellislab.com>2012-06-14 01:04:25 +0200
commitf11d2a01d4000fe1596b584f96839f60b3ac665d (patch)
tree0c421792282b1e3bede1e3d7f85728506eb6d9ba
parent686ff126762c0923556036a3cf73abb9390a7e67 (diff)
parentea6cbe026b73be13dd853d710b9609e3faf50f44 (diff)
Merge branch 'refs/heads/2.1-stable'
-rw-r--r--system/database/DB_driver.php10
-rw-r--r--user_guide/changelog.html3
2 files changed, 5 insertions, 8 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index 858ec356d..775fd3354 100644
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1263,16 +1263,14 @@ class CI_DB_driver {
}
// Convert tabs or multiple spaces into single spaces
- $item = preg_replace('/\s+/', ' ', $item);
+ $item = preg_replace('/[\t ]+/', ' ', $item);
// If the item has an alias declaration we remove it and set it aside.
// Basically we remove everything to the right of the first space
- if (preg_match('/^([^\s]+) (AS )*(.+)$/i', $item, $matches))
+ if (strpos($item, ' ') !== FALSE)
{
- $item = $matches[1];
-
- // Escape the alias
- $alias = ' '.$matches[2].$this->_escape_identifiers($matches[3]);
+ $alias = strstr($item, ' ');
+ $item = substr($item, 0, - strlen($alias));
}
else
{
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index e033864be..56fdba68a 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -58,7 +58,7 @@ Change Log
<h1>Change Log</h1>
<h2>Version 2.1.1</h2>
-<p>Release Date: May 18, 2012</p>
+<p>Release Date: June 12, 2012</p>
<ul>
<li>General Changes
@@ -91,7 +91,6 @@ Change Log
<li>Fixed a bug (#726) - PDO put a 'dbname' argument in it's connection string regardless of the database platform in use, which made it impossible to use SQLite.</li>
<li>Fixed a bug - CI_DB_pdo_result::num_rows() was not returning properly value with SELECT queries, cause it was relying on PDOStatement::rowCount().</li>
<li>Fixed a bug (#1059) - CI_Image_lib::clear() was not correctly clearing all necessary object properties, namely width and height.</li>
- <li>Fixed a bug (#1387) - Active Record's <samp>from()</samp> method didn't escape table aliases.</li>
</ul>