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
a2a33ee8
Commit
a2a33ee8
authored
Sep 12, 2013
by
Dorian Villet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add space between if and opening parenthesis.
parent
4fdffc4a
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
9 deletions
+9
-9
library/Solarium/Core/Client/Adapter/Curl.php
library/Solarium/Core/Client/Adapter/Curl.php
+1
-1
library/Solarium/Core/Client/Adapter/Http.php
library/Solarium/Core/Client/Adapter/Http.php
+1
-1
library/Solarium/Core/Client/Adapter/PeclHttp.php
library/Solarium/Core/Client/Adapter/PeclHttp.php
+1
-1
library/Solarium/Core/Query/Helper.php
library/Solarium/Core/Query/Helper.php
+1
-1
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
...olarium/QueryType/Select/Query/Component/MoreLikeThis.php
+2
-2
library/Solarium/QueryType/Select/ResponseParser/Component/Spellcheck.php
.../QueryType/Select/ResponseParser/Component/Spellcheck.php
+1
-1
library/Solarium/QueryType/Terms/ResponseParser.php
library/Solarium/QueryType/Terms/ResponseParser.php
+1
-1
library/Solarium/QueryType/Update/RequestBuilder.php
library/Solarium/QueryType/Update/RequestBuilder.php
+1
-1
No files found.
library/Solarium/Core/Client/Adapter/Curl.php
View file @
a2a33ee8
...
@@ -158,7 +158,7 @@ class Curl extends Configurable implements AdapterInterface
...
@@ -158,7 +158,7 @@ class Curl extends Configurable implements AdapterInterface
// Try endpoint authentication first, fallback to request for backwards compatibility
// Try endpoint authentication first, fallback to request for backwards compatibility
$authData
=
$endpoint
->
getAuthentication
();
$authData
=
$endpoint
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
$authData
=
$request
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
$authData
=
$request
->
getAuthentication
();
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
curl_setopt
(
$handler
,
CURLOPT_USERPWD
,
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
curl_setopt
(
$handler
,
CURLOPT_USERPWD
,
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
...
...
library/Solarium/Core/Client/Adapter/Http.php
View file @
a2a33ee8
...
@@ -129,7 +129,7 @@ class Http extends Configurable implements AdapterInterface
...
@@ -129,7 +129,7 @@ class Http extends Configurable implements AdapterInterface
// Try endpoint authentication first, fallback to request for backwards compatibility
// Try endpoint authentication first, fallback to request for backwards compatibility
$authData
=
$endpoint
->
getAuthentication
();
$authData
=
$endpoint
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
$authData
=
$request
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
$authData
=
$request
->
getAuthentication
();
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
$request
->
addHeader
(
'Authorization: Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
));
$request
->
addHeader
(
'Authorization: Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
));
...
...
library/Solarium/Core/Client/Adapter/PeclHttp.php
View file @
a2a33ee8
...
@@ -153,7 +153,7 @@ class PeclHttp extends Configurable implements AdapterInterface
...
@@ -153,7 +153,7 @@ class PeclHttp extends Configurable implements AdapterInterface
// Try endpoint authentication first, fallback to request for backwards compatibility
// Try endpoint authentication first, fallback to request for backwards compatibility
$authData
=
$endpoint
->
getAuthentication
();
$authData
=
$endpoint
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
$authData
=
$request
->
getAuthentication
();
if
(
empty
(
$authData
[
'username'
]))
$authData
=
$request
->
getAuthentication
();
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
if
(
!
empty
(
$authData
[
'username'
])
&&
!
empty
(
$authData
[
'password'
]))
{
$headers
[
'Authorization'
]
=
'Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
$headers
[
'Authorization'
]
=
'Basic '
.
base64_encode
(
$authData
[
'username'
]
.
':'
.
$authData
[
'password'
]
);
...
...
library/Solarium/Core/Query/Helper.php
View file @
a2a33ee8
...
@@ -464,7 +464,7 @@ class Helper
...
@@ -464,7 +464,7 @@ class Helper
*/
*/
public
function
cacheControl
(
$useCache
,
$cost
=
null
)
public
function
cacheControl
(
$useCache
,
$cost
=
null
)
{
{
if
(
$useCache
===
true
)
{
if
(
$useCache
===
true
)
{
$cache
=
'true'
;
$cache
=
'true'
;
}
else
{
}
else
{
$cache
=
'false'
;
$cache
=
'false'
;
...
...
library/Solarium/QueryType/Select/Query/Component/MoreLikeThis.php
View file @
a2a33ee8
...
@@ -107,7 +107,7 @@ class MoreLikeThis extends Component
...
@@ -107,7 +107,7 @@ class MoreLikeThis extends Component
public
function
getFields
()
public
function
getFields
()
{
{
$fields
=
$this
->
getOption
(
'fields'
);
$fields
=
$this
->
getOption
(
'fields'
);
if
(
$fields
==
null
)
$fields
=
array
();
if
(
$fields
==
null
)
$fields
=
array
();
return
$fields
;
return
$fields
;
}
}
...
@@ -306,7 +306,7 @@ class MoreLikeThis extends Component
...
@@ -306,7 +306,7 @@ class MoreLikeThis extends Component
public
function
getQueryFields
()
public
function
getQueryFields
()
{
{
$queryfields
=
$this
->
getOption
(
'queryfields'
);
$queryfields
=
$this
->
getOption
(
'queryfields'
);
if
(
$queryfields
==
null
)
$queryfields
=
array
();
if
(
$queryfields
==
null
)
$queryfields
=
array
();
return
$queryfields
;
return
$queryfields
;
}
}
...
...
library/Solarium/QueryType/Select/ResponseParser/Component/Spellcheck.php
View file @
a2a33ee8
...
@@ -119,7 +119,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
...
@@ -119,7 +119,7 @@ class Spellcheck extends ResponseParserAbstract implements ComponentParserInterf
}
else
{
}
else
{
if
(
$queryObject
->
getResponseWriter
()
==
$queryObject
::
WT_JSON
)
{
if
(
$queryObject
->
getResponseWriter
()
==
$queryObject
::
WT_JSON
)
{
if
(
is_array
(
current
(
$values
))){
if
(
is_array
(
current
(
$values
))){
foreach
(
$values
as
$key
=>
$value
)
{
foreach
(
$values
as
$key
=>
$value
)
{
$values
[
$key
]
=
$this
->
convertToKeyValueArray
(
$value
);
$values
[
$key
]
=
$this
->
convertToKeyValueArray
(
$value
);
}
}
...
...
library/Solarium/QueryType/Terms/ResponseParser.php
View file @
a2a33ee8
...
@@ -66,7 +66,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
...
@@ -66,7 +66,7 @@ class ResponseParser extends ResponseParserAbstract implements ResponseParserInt
$query
=
$result
->
getQuery
();
$query
=
$result
->
getQuery
();
// Special case to handle Solr 1.4 data
// Special case to handle Solr 1.4 data
if
(
isset
(
$data
[
'terms'
])
&&
count
(
$data
[
'terms'
])
==
count
(
$query
->
getFields
())
*
2
)
{
if
(
isset
(
$data
[
'terms'
])
&&
count
(
$data
[
'terms'
])
==
count
(
$query
->
getFields
())
*
2
)
{
$data
[
'terms'
]
=
$this
->
convertToKeyValueArray
(
$data
[
'terms'
]);
$data
[
'terms'
]
=
$this
->
convertToKeyValueArray
(
$data
[
'terms'
]);
}
}
...
...
library/Solarium/QueryType/Update/RequestBuilder.php
View file @
a2a33ee8
...
@@ -169,7 +169,7 @@ class RequestBuilder extends BaseRequestBuilder
...
@@ -169,7 +169,7 @@ class RequestBuilder extends BaseRequestBuilder
$xml
=
'<field name="'
.
$name
.
'"'
;
$xml
=
'<field name="'
.
$name
.
'"'
;
$xml
.=
$this
->
attrib
(
'boost'
,
$boost
);
$xml
.=
$this
->
attrib
(
'boost'
,
$boost
);
$xml
.=
$this
->
attrib
(
'update'
,
$modifier
);
$xml
.=
$this
->
attrib
(
'update'
,
$modifier
);
if
(
$value
===
null
){
if
(
$value
===
null
){
$xml
.=
$this
->
attrib
(
'null'
,
'true'
);
$xml
.=
$this
->
attrib
(
'null'
,
'true'
);
}
}
$xml
.=
'>'
.
htmlspecialchars
(
$value
,
ENT_NOQUOTES
,
'UTF-8'
);
$xml
.=
'>'
.
htmlspecialchars
(
$value
,
ENT_NOQUOTES
,
'UTF-8'
);
...
...
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