From 8715a2059bce9f8e340b4a596f0e61dfd15d5bcc Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 22 Jan 2011 23:47:07 +1100 Subject: [PATCH] OSB Mod: Update to KH Database for OSB --- .../database/classes/kohana/database/query/builder/select.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/kohana/modules/database/classes/kohana/database/query/builder/select.php b/includes/kohana/modules/database/classes/kohana/database/query/builder/select.php index d26d2c52..9739404c 100644 --- a/includes/kohana/modules/database/classes/kohana/database/query/builder/select.php +++ b/includes/kohana/modules/database/classes/kohana/database/query/builder/select.php @@ -76,6 +76,10 @@ class Kohana_Database_Query_Builder_Select extends Database_Query_Builder_Where { $columns = func_get_args(); + // Ignore our default select of .* if we already have some selected columns. + if (count($columns) == 1 AND is_string($columns[0]) AND preg_match('/\.\*$/',$columns[0]) AND $this->_select) + return $this; + $this->_select = array_merge($this->_select, $columns); return $this;