This commit is contained in:
parent
adc6c1b22a
commit
49574ce956
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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 . '%';
|
||||
|
Loading…
x
Reference in New Issue
Block a user