Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
solarium
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
solarium
Commits
80accb1a
Commit
80accb1a
authored
Feb 16, 2011
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
style fixes
parent
07703a78
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
9 deletions
+17
-9
library/Solarium/Client/Request.php
library/Solarium/Client/Request.php
+1
-1
library/Solarium/Client/Request/Select.php
library/Solarium/Client/Request/Select.php
+1
-1
library/Solarium/Client/Response/Select.php
library/Solarium/Client/Response/Select.php
+15
-7
No files found.
library/Solarium/Client/Request.php
View file @
80accb1a
...
...
@@ -135,7 +135,7 @@ class Solarium_Client_Request
if
(
empty
(
$paramValue
))
continue
;
if
(
is_array
(
$paramValue
))
{
$paramValue
=
implode
(
$paramValue
,
','
);
$paramValue
=
implode
(
$paramValue
,
','
);
}
$params
.=
$paramName
.
'='
.
$paramValue
.
' '
;
...
...
library/Solarium/Client/Request/Select.php
View file @
80accb1a
...
...
@@ -50,7 +50,7 @@ class Solarium_Client_Request_Select extends Solarium_Client_Request
$sort
[]
=
$field
.
' '
.
$order
;
}
if
(
count
(
$sort
)
!==
0
)
{
$this
->
addParam
(
'sort'
,
implode
(
','
,
$sort
));
$this
->
addParam
(
'sort'
,
implode
(
','
,
$sort
));
}
$filterQueries
=
$this
->
_query
->
getFilterQueries
();
...
...
library/Solarium/Client/Response/Select.php
View file @
80accb1a
...
...
@@ -47,7 +47,7 @@ class Solarium_Client_Response_Select extends Solarium_Client_Response
}
}
foreach
(
$this
->
_query
->
getFacets
()
AS
$facet
)
foreach
(
$this
->
_query
->
getFacets
()
AS
$facet
)
{
switch
(
$facet
->
getType
())
{
case
Solarium_Query_Select_Facet
::
FIELD
:
...
...
@@ -69,24 +69,32 @@ class Solarium_Client_Response_Select extends Solarium_Client_Response
protected
function
_addFacetField
(
$facet
)
{
if
(
isset
(
$this
->
_data
[
'facet_counts'
][
'facet_fields'
][
$facet
->
getKey
()]))
{
$values
=
array_chunk
(
$this
->
_data
[
'facet_counts'
][
'facet_fields'
][
$facet
->
getKey
()],
2
);
$key
=
$facet
->
getKey
();
if
(
isset
(
$this
->
_data
[
'facet_counts'
][
'facet_fields'
][
$key
]))
{
$values
=
array_chunk
(
$this
->
_data
[
'facet_counts'
][
'facet_fields'
][
$key
],
2
);
$facetValues
=
array
();
foreach
(
$values
AS
$value
)
{
$facetValues
[
$value
[
0
]]
=
$value
[
1
];
}
$this
->
_facets
[
$facet
->
getKey
()]
=
new
Solarium_Result_Select_Facet_Field
(
$facetValues
);
$this
->
_facets
[
$key
]
=
new
Solarium_Result_Select_Facet_Field
(
$facetValues
);
}
}
protected
function
_addFacetQuery
(
$facet
)
{
if
(
isset
(
$this
->
_data
[
'facet_counts'
][
'facet_queries'
][
$facet
->
getKey
()]))
{
$key
=
$facet
->
getKey
();
if
(
isset
(
$this
->
_data
[
'facet_counts'
][
'facet_queries'
][
$key
]))
{
$value
=
$this
->
_data
[
'facet_counts'
][
'facet_queries'
][
$facet
->
getKey
()];
$this
->
_facets
[
$facet
->
getKey
()]
=
new
Solarium_Result_Select_Facet_Query
(
$value
);
$value
=
$this
->
_data
[
'facet_counts'
][
'facet_queries'
][
$key
];
$this
->
_facets
[
$key
]
=
new
Solarium_Result_Select_Facet_Query
(
$value
);
}
}
}
\ No newline at end of file
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