From e3bfa19f3d902594620633832cf709ff0fd7ce00 Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 1 Aug 2016 21:34:13 +1000 Subject: [PATCH] Revert "Improvements to on() processing for upstream to review" This reverts commit c570b45e49d42deefe8d498449cd0e6f9af5a172. Breaks on() statements that have an aliased table name --- .../Kohana/Database/Query/Builder/Join.php | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/modules/database/classes/Kohana/Database/Query/Builder/Join.php b/modules/database/classes/Kohana/Database/Query/Builder/Join.php index fefa5d8..10402f6 100644 --- a/modules/database/classes/Kohana/Database/Query/Builder/Join.php +++ b/modules/database/classes/Kohana/Database/Query/Builder/Join.php @@ -127,21 +127,8 @@ class Kohana_Database_Query_Builder_Join extends Database_Query_Builder { $op = ' '.strtoupper($op); } - // In case C2 is prefixed with table - $c2table = FALSE; - $parts = explode('.', $c2); - - // If there are parts, we'll check that first one is the table name. - if (count($parts) == 2) - { - if ($db->list_columns($parts[0],$parts[1])) - { - $c2table = TRUE; - } - } - // Quote each of the columns used for the condition - $conditions[] = $db->quote_column($c1).$op.' '.($c2table ? $db->quote_column($c2) : $db->quote($c2)); + $conditions[] = $db->quote_column($c1).$op.' '.$db->quote_column($c2); } // Concat the conditions "... AND ..."