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
ea5bb5c3
Commit
ea5bb5c3
authored
Jan 04, 2013
by
Bas de Nooijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some issues based om GitHub comments
parent
558d81ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
library/Solarium/QueryType/Select/Query/Component/Facet/Pivot.php
...Solarium/QueryType/Select/Query/Component/Facet/Pivot.php
+5
-9
No files found.
library/Solarium/QueryType/Select/Query/Component/Facet/Pivot.php
View file @
ea5bb5c3
...
@@ -61,12 +61,8 @@ class Pivot extends Facet
...
@@ -61,12 +61,8 @@ class Pivot extends Facet
*/
*/
protected
function
init
()
protected
function
init
()
{
{
foreach
(
$this
->
options
as
$name
=>
$value
)
{
if
(
isset
(
$this
->
options
[
'fields'
]))
{
switch
(
$name
)
{
$this
->
addFields
(
$this
->
options
[
'fields'
]);
case
'fields'
:
$this
->
addFields
(
$value
);
break
;
}
}
}
}
}
...
@@ -110,9 +106,10 @@ class Pivot extends Facet
...
@@ -110,9 +106,10 @@ class Pivot extends Facet
*/
*/
public
function
addField
(
$field
)
public
function
addField
(
$field
)
{
{
$this
->
fields
[
$field
]
=
true
;
$field
=
trim
(
$field
);
$this
->
fields
[
$field
]
=
true
;
return
$this
;
return
$this
;
}
}
/**
/**
...
@@ -127,7 +124,6 @@ class Pivot extends Facet
...
@@ -127,7 +124,6 @@ class Pivot extends Facet
{
{
if
(
is_string
(
$fields
))
{
if
(
is_string
(
$fields
))
{
$fields
=
explode
(
','
,
$fields
);
$fields
=
explode
(
','
,
$fields
);
$fields
=
array_map
(
'trim'
,
$fields
);
}
}
foreach
(
$fields
as
$field
)
{
foreach
(
$fields
as
$field
)
{
...
...
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