mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Retaining case in PjaxResponseNegotiator, in order to pass back to client correctly
This commit is contained in:
parent
5178954311
commit
b3d99d5418
@ -40,16 +40,12 @@ class PjaxResponseNegotiator {
|
||||
*/
|
||||
public function respond(SS_HTTPRequest $request, $extraCallbacks = array()) {
|
||||
// Prepare the default options and combine with the others
|
||||
$callbacks = array_merge(
|
||||
array_change_key_case($this->callbacks, CASE_LOWER),
|
||||
array_change_key_case($extraCallbacks, CASE_LOWER)
|
||||
);
|
||||
|
||||
$callbacks = array_merge($this->callbacks, $extraCallbacks);
|
||||
$response = new SS_HTTPResponse();
|
||||
|
||||
$responseParts = array();
|
||||
if($fragmentStr = $request->getHeader('X-Pjax')) {
|
||||
$fragments = explode(',', strtolower($fragmentStr));
|
||||
$fragments = explode(',', $fragmentStr);
|
||||
foreach($fragments as $fragment) {
|
||||
if(isset($callbacks[$fragment])) {
|
||||
$responseParts[$fragment] = call_user_func($callbacks[$fragment]);
|
||||
|
Loading…
Reference in New Issue
Block a user