summaryrefslogtreecommitdiffstats
path: root/system/database/DB_driver.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2012-06-13 21:32:22 +0200
committerFlorian Pritz <bluewind@xinu.at>2012-06-13 21:32:22 +0200
commitd9947c840bbce291c1cf3f0cb73f0c343686892e (patch)
tree9789b54cfa98bf440ce5f401e8d2f9eb0df3791d /system/database/DB_driver.php
parent787914f40313e267205ea4a50ed63fc4ba74b8c8 (diff)
Revert "Fix issue #1387"
This reverts commit bc602d8b8e125597bfd557949e846ff5a258b858. This break the session cleanup. References: https://github.com/EllisLab/CodeIgniter/issues/1387#issuecomment-6307876 Conflicts: user_guide/changelog.html Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'system/database/DB_driver.php')
-rwxr-xr-xsystem/database/DB_driver.php22
1 files changed, 10 insertions, 12 deletions
diff --git a/system/database/DB_driver.php b/system/database/DB_driver.php
index c25752824..6161f149b 100755
--- a/system/database/DB_driver.php
+++ b/system/database/DB_driver.php
@@ -1263,20 +1263,15 @@ 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))
+ $alias = '';
+ if (strpos($item, ' ') !== FALSE)
{
- $item = $matches[1];
-
- // Escape the alias
- $alias = ' '.$matches[2].$this->escape_identifiers($matches[3]);
- }
- else
- {
- $alias = '';
+ $alias = strstr($item, " ");
+ $item = substr($item, 0, - strlen($alias));
}
// This is basically a bug fix for queries that use MAX, MIN, etc.
@@ -1392,7 +1387,7 @@ class CI_DB_driver {
return $item.$alias;
}
-
+
// --------------------------------------------------------------------
/**
@@ -1400,13 +1395,16 @@ class CI_DB_driver {
*
* This function is used extensively by every db driver.
*
+ * @access private
* @return void
*/
protected function _reset_select()
{
+
}
}
+
/* End of file DB_driver.php */
-/* Location: ./system/database/DB_driver.php */ \ No newline at end of file
+/* Location: ./system/database/DB_driver.php */