Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change filters to use $params as array #57

Merged
merged 2 commits into from
Jun 27, 2019

Conversation

MGatner
Copy link
Collaborator

@MGatner MGatner commented Jun 27, 2019

Current implementation expects a single string from $params but is actually being passed an array from CI4's Filters->enableFilter:

list($name, $params) = explode(':', $name);

$params = explode(',', $params);
array_walk($params, function (&$item) {
	$item = trim($item);
});

$this->arguments[$name] = $params;

This PR changes the two parameter-accepting filters to use $params as an array.

NOTE: Current implementation requires all permissions/roles to be fulfilled. Might consider these as any at some point, or additional filters so user may choose.

@lonnieezell lonnieezell merged commit c3ddaec into lonnieezell:develop Jun 27, 2019
@MGatner MGatner deleted the bugfix-filter-arrays branch June 27, 2019 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants