mirror of
https://github.com/Mibew/mibew.git
synced 2025-02-08 00:34:42 +03:00
Fix problem with not serial keys and JSON response
This commit is contained in:
parent
4e3593375f
commit
06991af115
@ -327,9 +327,12 @@ class UsersProcessor extends ClientSideProcessor
|
|||||||
$dispatcher = EventDispatcher::getInstance();
|
$dispatcher = EventDispatcher::getInstance();
|
||||||
$dispatcher->triggerEvent('usersUpdateThreadsAlter', $arguments);
|
$dispatcher->triggerEvent('usersUpdateThreadsAlter', $arguments);
|
||||||
|
|
||||||
// Send results back to the client
|
// Send results back to the client. "array_values" function should be
|
||||||
|
// used to avoid problems with JSON conversion. If there will be gaps in
|
||||||
|
// keys (the keys are not serial) JSON Object will be produced instead
|
||||||
|
// of an Array.
|
||||||
return array(
|
return array(
|
||||||
'threads' => $arguments['threads'],
|
'threads' => array_values($arguments['threads']),
|
||||||
'lastRevision' => $revision,
|
'lastRevision' => $revision,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -470,8 +473,12 @@ class UsersProcessor extends ClientSideProcessor
|
|||||||
);
|
);
|
||||||
$dispatcher->triggerEvent('usersUpdateVisitorsAlter', $arguments);
|
$dispatcher->triggerEvent('usersUpdateVisitorsAlter', $arguments);
|
||||||
|
|
||||||
|
// Send results back to the client. "array_values" function should be
|
||||||
|
// used to avoid problems with JSON conversion. If there will be gaps in
|
||||||
|
// keys (the keys are not serial) JSON Object will be produced instead
|
||||||
|
// of an Array.
|
||||||
return array(
|
return array(
|
||||||
'visitors' => $arguments['visitors'],
|
'visitors' => array_values($arguments['visitors']),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user