trim project_ids
This commit is contained in:
parent
3139ec0fee
commit
7328b3893d
1 changed files with 6 additions and 1 deletions
|
@ -65,7 +65,12 @@ class CRM_Twingle_Profile {
|
||||||
*/
|
*/
|
||||||
public function matches($project_id) {
|
public function matches($project_id) {
|
||||||
$selector = $this->getAttribute('selector');
|
$selector = $this->getAttribute('selector');
|
||||||
$project_ids = explode(',', $selector);
|
$project_ids = array_map(
|
||||||
|
function($project_id) {
|
||||||
|
return trim($project_id);
|
||||||
|
},
|
||||||
|
explode(',', $selector)
|
||||||
|
);
|
||||||
return in_array($project_id, $project_ids);
|
return in_array($project_id, $project_ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue