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
3b82c6a7
authored
2019-09-02 15:42:59 +0800
by
Jonille Arreglo
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
update pci fix
1 parent
9b45ff0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletions
src/BTFlags/FlagManager.php
src/BTFlags/FlagManager.php
View file @
3b82c6a
...
...
@@ -153,10 +153,21 @@ class FlagManager {
public
function
register
(){
$this
->
checkDir
();
$flags
=
$this
->
all
();
$cookies
=
array
(
'theme'
,
'cta'
,
'source'
,
'feedback'
);
if
(
!
$flags
)
return
[];
foreach
(
$flags
as
$flag
){
$value
=
$this
->
checkFlag
(
$flag
,
!
empty
(
$flag
[
'default'
])
?
$flag
[
'default'
]
:
null
);
if
(
isset
(
$_GET
[
$flag
[
'name'
]])){
if
(
in_array
(
$flag
[
'name'
],
$cookies
)){
if
(
isset
(
$_GET
[
$flag
[
'name'
]]))
{
setcookie
(
$flag
[
'name'
],
null
,
time
()
+
(
86400
*
30
),
"/"
);
setcookie
(
$flag
[
'encrypted_name'
],
$value
[
'cookie_value'
],
time
()
+
(
86400
*
30
),
"/"
);
}
}
else
{
setcookie
(
$flag
[
'name'
],
null
,
time
()
+
(
86400
*
30
),
"/"
);
setcookie
(
$flag
[
'encrypted_name'
],
$value
[
'cookie_value'
],
time
()
+
(
86400
*
30
),
"/"
);
}
...
...
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