Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
49574ce9
Commit
49574ce9
authored
May 26, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
adc6c1b2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
Hook.php
lib/Doctrine/Hook.php
+4
-2
Complex.php
lib/Doctrine/Hook/Parser/Complex.php
+2
-2
WordLike.php
lib/Doctrine/Hook/WordLike.php
+1
-1
No files found.
lib/Doctrine/Hook.php
View file @
49574ce9
...
...
@@ -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
);
...
...
lib/Doctrine/Hook/Parser/Complex.php
View file @
49574ce9
...
...
@@ -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
)
{
...
...
lib/Doctrine/Hook/WordLike.php
View file @
49574ce9
...
...
@@ -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
.
'%'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment