From c67bcd5598424f70a555d52fcc7df83b6814ca05 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 13 Jun 2009 19:05:23 +0000 Subject: [PATCH] - DibiDataSource: added escaping --- dibi/libs/DibiDataSource.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dibi/libs/DibiDataSource.php b/dibi/libs/DibiDataSource.php index 29d33ea0..a95696e3 100644 --- a/dibi/libs/DibiDataSource.php +++ b/dibi/libs/DibiDataSource.php @@ -62,13 +62,13 @@ class DibiDataSource extends DibiObject implements IDataSource /** - * @param string SQL command or table name, as data source + * @param string SQL command or table or view name, as data source * @param DibiConnection connection */ public function __construct($sql, DibiConnection $connection) { if (strpos($sql, ' ') === FALSE) { - $this->sql = $sql; // table name + $this->sql = $connection->getDriver()->escape($sql, dibi::IDENTIFIER); // table name } else { $this->sql = '(' . $sql . ') t'; // SQL command }