summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_active_rec.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 5bf0d8f1d..129eaa7b6 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -336,12 +336,8 @@ class CI_DB_active_record extends CI_DB_driver {
$cond = $match[1].$match[2].$match[3];
}
- // Assemble the JOIN statement: only use ON if a condition was passed
- $join = $type.'JOIN '.$this->_protect_identifiers($table, TRUE, NULL, FALSE);
- if ($cond)
- {
- $join .= ' ON '.$cond;
- }
+ // Assemble the JOIN statement
+ $join = $type.'JOIN '.$this->_protect_identifiers($table, TRUE, NULL, FALSE).' ON '.$cond;
$this->ar_join[] = $join;
if ($this->ar_caching === TRUE)