Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
d44c23bb
Commit
d44c23bb
authored
Nov 23, 2014
by
Carsten Brandt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ported fix for #6164 to sphinx
was already supported for BETWEEN but not for LIKE fixes #6164
parent
cc8ffe36
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
2 deletions
+12
-2
CHANGELOG.md
extensions/sphinx/CHANGELOG.md
+1
-0
QueryBuilder.php
extensions/sphinx/QueryBuilder.php
+10
-1
CHANGELOG.md
framework/CHANGELOG.md
+1
-1
No files found.
extensions/sphinx/CHANGELOG.md
View file @
d44c23bb
...
...
@@ -6,6 +6,7 @@ Yii Framework 2 sphinx extension Change Log
-
Bug #5601: Simple conditions in Query::where() and ActiveQuery::where() did not allow
`yii\db\Expression`
to be used as the value (cebe, stevekr)
-
Bug #5634: Fixed
`yii\sphinx\QueryBuilder`
does not support comparison operators (>,
<
,
>
= etc) in where specification (klimov-paul)
-
Bug #6164: Added missing support for
`yii\db\Exression`
to QueryBuilder
`LIKE`
conditions (cebe)
-
Enh #5223: Query builder now supports selecting sub-queries as columns (qiangxue)
...
...
extensions/sphinx/QueryBuilder.php
View file @
d44c23bb
...
...
@@ -928,7 +928,9 @@ class QueryBuilder extends Object
list
(
$column
,
$values
)
=
$operands
;
$values
=
(
array
)
$values
;
if
(
!
is_array
(
$values
))
{
$values
=
[
$values
];
}
if
(
empty
(
$values
))
{
return
$operator
===
'LIKE'
||
$operator
===
'OR LIKE'
?
'0=1'
:
''
;
...
...
@@ -947,8 +949,15 @@ class QueryBuilder extends Object
$parts
=
[];
foreach
(
$values
as
$value
)
{
if
(
$value
instanceof
Expression
)
{
foreach
(
$value
->
params
as
$n
=>
$v
)
{
$params
[
$n
]
=
$v
;
}
$phName
=
$value
->
expression
;
}
else
{
$phName
=
self
::
PARAM_PREFIX
.
count
(
$params
);
$params
[
$phName
]
=
empty
(
$escape
)
?
$value
:
(
'%'
.
strtr
(
$value
,
$escape
)
.
'%'
);
}
$parts
[]
=
"
$column
$operator
$phName
"
;
}
...
...
framework/CHANGELOG.md
View file @
d44c23bb
...
...
@@ -31,7 +31,7 @@ Yii Framework 2 Change Log
-
Bug #6107:
`yii message`
was emptying existing translations in .po in case of multiple categories (samdark)
-
Bug #6112:
`yii message`
was incorrectly writing not yet translated strings in .po in case of multiple categories (samdark)
-
Bug #6172:
`yii\rbac\DbManager`
should properly quote table and column names (qiangxue)
-
Bug #6164: Added missing support for
`yii\db\Exression`
QueryBuilder
`BETWEEN`
and
`LIKE`
conditions (cebe)
-
Bug #6164: Added missing support for
`yii\db\Exression`
to
QueryBuilder
`BETWEEN`
and
`LIKE`
conditions (cebe)
-
Bug: Gii console command help information does not contain global options (qiangxue)
-
Bug:
`yii\web\UrlRule`
was unable to create URLs for rules containing unicode characters (samdark)
-
Enh #4181: Added
`yii\bootstrap\Modal::$headerOptions`
and
`yii\bootstrap\Modal::$footerOptions`
(tuxoff, samdark)
...
...
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