Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Janis
/
btflags
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0adf9d88
authored
2018-11-20 05:48:38 +0000
by
Joshua Tundag
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch '11515_encrypted_flag' into 'master'
11515_encrypted_flag See merge request
!1
2 parents
ff07060e
43fd0d88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
src/BTFlags/FlagManager.php
src/BTFlags/FlagManager.php
View file @
0adf9d8
...
...
@@ -165,6 +165,13 @@ class FlagManager {
if
(
!
$flag
[
'is_filtered'
])
return
$needle
;
$acceptedValues
=
$flag
[
'accepted_values'
];
if
(
isset
(
$flag
[
'both_usable'
])){
if
(
$flag
[
'both_usable'
]){
return
count
(
array_filter
(
$acceptedValues
,
function
(
$value
)
use
(
$needle
)
{
return
$value
[
'encrypted_value'
]
==
$needle
||
$value
[
'value'
]
==
$needle
;
}))
?
$needle
:
$defaultValue
;
}
}
return
count
(
array_filter
(
$acceptedValues
,
function
(
$value
)
use
(
$needle
)
{
return
$value
[
'encrypted_value'
]
==
$needle
;
}))
?
$needle
:
$defaultValue
;
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment