diff --git a/lib/Doctrine/Hook.php b/lib/Doctrine/Hook.php index c1dbf00c9..843fe5c5a 100644 --- a/lib/Doctrine/Hook.php +++ b/lib/Doctrine/Hook.php @@ -132,7 +132,8 @@ class Doctrine_Hook list($alias, $column) = $e; $tableAlias = $this->query->getTableAlias($alias); - $table = $this->query->getTable($tableAlias); + $map = $this->query->getAliasDeclaration($alias); + $table = $map['table']; if ( ! $table) { throw new Doctrine_Exception('Unknown table alias ' . $tableAlias); @@ -181,7 +182,8 @@ class Doctrine_Hook list($alias, $column) = $e; $tableAlias = $this->query->getTableAlias($alias); - $table = $this->query->getTable($tableAlias); + $map = $this->query->getAliasDeclaration($alias); + $table = $map['table']; if ($def = $table->getDefinitionOf($column)) { $this->query->addOrderBy($alias . '.' . $column . ' ' . $order); diff --git a/lib/Doctrine/Hook/Parser/Complex.php b/lib/Doctrine/Hook/Parser/Complex.php index 239148498..e196ad430 100644 --- a/lib/Doctrine/Hook/Parser/Complex.php +++ b/lib/Doctrine/Hook/Parser/Complex.php @@ -58,7 +58,7 @@ abstract class Doctrine_Hook_Parser_Complex extends Doctrine_Hook_Parser */ public function parseClause($alias, $field, $value) { - $parts = Doctrine_Query::quoteExplode($value, ' AND '); + $parts = Doctrine_Tokenizer::quoteExplode($value, ' AND '); if (count($parts) > 1) { $ret = array(); @@ -68,7 +68,7 @@ abstract class Doctrine_Hook_Parser_Complex extends Doctrine_Hook_Parser $r = implode(' AND ', $ret); } else { - $parts = Doctrine_Query::quoteExplode($value, ' OR '); + $parts = Doctrine_Tokenizer::quoteExplode($value, ' OR '); if (count($parts) > 1) { $ret = array(); foreach ($parts as $part) { diff --git a/lib/Doctrine/Hook/WordLike.php b/lib/Doctrine/Hook/WordLike.php index 4446d0ebc..946ec1976 100644 --- a/lib/Doctrine/Hook/WordLike.php +++ b/lib/Doctrine/Hook/WordLike.php @@ -47,7 +47,7 @@ class Doctrine_Hook_WordLike extends Doctrine_Hook_Parser_Complex public function parseSingle($alias, $field, $value) { if (strpos($value, "'") !== false) { - $value = Doctrine_Query::bracketTrim($value, "'", "'"); + $value = Doctrine_Tokenizer::bracketTrim($value, "'", "'"); $a[] = $alias . '.' . $field . ' LIKE ?'; $this->params[] = $value . '%';