From 9b0b7d32a4d7ab6d1bbd0f8ca14be9fbf325f081 Mon Sep 17 00:00:00 2001 From: "GODZilla0480@gmail.com" <> Date: Sun, 16 Oct 2011 17:25:14 +0000 Subject: Fixed Issue#365 introduced in r3030 --- framework/Data/Common/TDbMetaData.php | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'framework') diff --git a/framework/Data/Common/TDbMetaData.php b/framework/Data/Common/TDbMetaData.php index bc29927f..b8872759 100644 --- a/framework/Data/Common/TDbMetaData.php +++ b/framework/Data/Common/TDbMetaData.php @@ -132,10 +132,14 @@ abstract class TDbMetaData extends TComponent * @param string $rgt right delimiter * @return string the properly quoted table name */ - public function quoteTableName($name, $lft='', $rgt='') + public function quoteTableName($name) { $name = str_replace(self::$delimiterIdentifier, '', $name); + $args = func_get_args(); + $rgt = $lft = isset($args[1]) ? $args[1] : ''; + $rgt = isset($args[2]) ? $args[2] : $rgt; + if(strpos($name, '.')===false) return $lft . $name . $rgt; $names=explode('.', $name); @@ -151,8 +155,12 @@ abstract class TDbMetaData extends TComponent * @param string $rgt right delimiter * @return string the properly quoted column name */ - public function quoteColumnName($name, $lft='', $rgt='') + public function quoteColumnName($name) { + $args = func_get_args(); + $rgt = $lft = isset($args[1]) ? $args[1] : ''; + $rgt = isset($args[2]) ? $args[2] : $rgt; + return $lft . str_replace(self::$delimiterIdentifier, '', $name) . $rgt; } @@ -163,8 +171,12 @@ abstract class TDbMetaData extends TComponent * @param string $rgt right delimiter * @return string the properly quoted column alias */ - public function quoteColumnAlias($name, $lft='', $rgt='') + public function quoteColumnAlias($name) { + $args = func_get_args(); + $rgt = $lft = isset($args[1]) ? $args[1] : ''; + $rgt = isset($args[2]) ? $args[2] : $rgt; + return $lft . str_replace(self::$delimiterIdentifier, '', $name) . $rgt; } } -- cgit v1.2.3