From d416fbe4ed0256c3edd22657e19e7211a6b2008a Mon Sep 17 00:00:00 2001 From: nate Date: Mon, 9 Apr 2007 19:54:07 +0000 Subject: [PATCH] Removing name() method from DBO drivers (Ticket #2372) git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4830 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo/dbo_mysqli.php | 16 ---------------- cake/libs/model/datasources/dbo/dbo_sqlite.php | 16 ---------------- cake/libs/model/datasources/dbo/dbo_sybase.php | 16 ---------------- 3 files changed, 48 deletions(-) diff --git a/cake/libs/model/datasources/dbo/dbo_mysqli.php b/cake/libs/model/datasources/dbo/dbo_mysqli.php index fecc5939c..c2737446c 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysqli.php +++ b/cake/libs/model/datasources/dbo/dbo_mysqli.php @@ -179,22 +179,6 @@ class DboMysqli extends DboSource { $this->__cacheDescription($model->tablePrefix.$model->table, $fields); return $fields; } -/** - * Returns a quoted name of $data for use in an SQL statement. - * - * @param string $data Name (table.field) to be prepared for use in an SQL statement - * @return string Quoted for MySQL - */ - function name($data) { - if ($data == '*') { - return '*'; - } - $pos = strpos($data, '`'); - if ($pos === false) { - $data = '`'. str_replace('.', '`.`', $data) .'`'; - } - return $data; - } /** * Returns a quoted and escaped string of $data for use in an SQL statement. * diff --git a/cake/libs/model/datasources/dbo/dbo_sqlite.php b/cake/libs/model/datasources/dbo/dbo_sqlite.php index d5814d017..a73d97c5c 100644 --- a/cake/libs/model/datasources/dbo/dbo_sqlite.php +++ b/cake/libs/model/datasources/dbo/dbo_sqlite.php @@ -170,22 +170,6 @@ class DboSqlite extends DboSource { $this->__cacheDescription($model->tablePrefix . $model->table, $fields); return $fields; } -/** - * Returns a quoted name of $data for use in an SQL statement. - * - * @param string $data Name (table.field) to be prepared for use in an SQL statement - * @return string Quoted for SQLite - */ - function name ($data) { - if ($data == '*') { - return '*'; - } - $pos = strpos($data, '"'); - if ($pos === false) { - $data = '"'. str_replace('.', '"."', $data) .'"'; - } - return $data; - } /** * Returns a quoted and escaped string of $data for use in an SQL statement. * diff --git a/cake/libs/model/datasources/dbo/dbo_sybase.php b/cake/libs/model/datasources/dbo/dbo_sybase.php index ea467b061..2d10781b3 100644 --- a/cake/libs/model/datasources/dbo/dbo_sybase.php +++ b/cake/libs/model/datasources/dbo/dbo_sybase.php @@ -177,22 +177,6 @@ class DboSybase extends DboSource { $this->__cacheDescription($model->tablePrefix.$model->table, $fields); return $fields; } -/** - * Returns a quoted name of $data for use in an SQL statement. - * - * @param string $data Name (table.field) to be prepared for use in an SQL statement - * @return string Quoted for MySQL - */ - function name($data) { - if ($data == '*') { - return '*'; - } - $pos = strpos($data, '`'); - if ($pos === false) { - $data = '`'. str_replace('.', '`.`', $data) .'`'; - } - return $data; - } /** * Returns a quoted and escaped string of $data for use in an SQL statement. *