<commit_before><?php

function Streams_participant_response_participants()
{
	if (isset(Streams::$cache['participant'])) {
		$participant = Streams::$cache['participant'];
		return Db::exportArray(array($participant->userId => $participant));
	}

	$publisherId = Streams::requestedPublisherId(true);
	$streamName = Streams::requestedName(true);
	$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : 10;
	$offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : -1;
	$state = isset($_REQUEST['state']) ? $_REQUEST['state'] : null;

	$user = Users::loggedInUser();
	$userId = $user ? $user->id : "";
	$stream = Streams::fetchOne($userId, $publisherId, $streamName);
	if (empty($stream)) {
		throw new Q_Exception_MissingRow(array(
			'table' => 'Stream', 
			'criteria' => "{publisherId: '$publisherId', name: '$streamName'}"
		));
	}

	if (!$stream->testReadLevel('participants')) {
		throw new Users_Exception_NotAuthorized();
	}

	$participants = $stream->getParticipants(compact('limit', 'offset', 'state'));
	Db::exportArray($participants);
}<commit_msg>Bug fixed in Streams/participant/response/participants. Forgot 'return' result.<commit_after><?php

function Streams_participant_response_participants()
{
	if (isset(Streams::$cache['participant'])) {
		$participant = Streams::$cache['participant'];
		return Db::exportArray(array($participant->userId => $participant));
	}

	$publisherId = Streams::requestedPublisherId(true);
	$streamName = Streams::requestedName(true);
	$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : 10;
	$offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : -1;
	$state = isset($_REQUEST['state']) ? $_REQUEST['state'] : null;

	$user = Users::loggedInUser();
	$userId = $user ? $user->id : "";
	$stream = Streams::fetchOne($userId, $publisherId, $streamName);
	if (empty($stream)) {
		throw new Q_Exception_MissingRow(array(
			'table' => 'Stream', 
			'criteria' => "{publisherId: '$publisherId', name: '$streamName'}"
		));
	}

	if (!$stream->testReadLevel('participants')) {
		throw new Users_Exception_NotAuthorized();
	}

	$participants = $stream->getParticipants(compact('limit', 'offset', 'state'));
	return Db::exportArray($participants);
}
{'fraction_non_alphanumeric': 0.19909297052154196, 'fraction_numerical': 0.0027210884353741495, 'mean_word_length': 7.08058608058608, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7153759', 'n_tokens_mistral': 771, 'n_tokens_neox': 723, 'n_words': 121}