fb425b13 by Joshua Tundag

Merge branch '11515_encrypted_flag' into 'master'

update FlagManager

See merge request !3
2 parents 0c8ae3b7 a29f221c
...@@ -191,7 +191,7 @@ class FlagManager { ...@@ -191,7 +191,7 @@ class FlagManager {
191 if(!empty($_COOKIE[$flag['encrypted_name']])) return $this->filterFlag($flag, $_COOKIE[$flag['encrypted_name']], $defaultValue); 191 if(!empty($_COOKIE[$flag['encrypted_name']])) return $this->filterFlag($flag, $_COOKIE[$flag['encrypted_name']], $defaultValue);
192 } 192 }
193 $flagName = $flag['is_encrypted'] ? $flag['encrypted_name'] : $flag['name']; 193 $flagName = $flag['is_encrypted'] ? $flag['encrypted_name'] : $flag['name'];
194 return !empty($_GET[$flagName]) ? $this->filterFlag($flag, $_GET[$flagName], $defaultValue) : (!empty($_COOKIE[$flag['encrypted_name']]) ? $this->filterFlag($flag, $_COOKIE[$flag['encrypted_name']], $defaultValue) : $defaultValue); 194 return !empty($_GET[$flagName]) ? $this->filterFlag($flag, $_GET[$flagName], $defaultValue) : (!empty($_COOKIE[$flag['encrypted_name']]) ? $this->filterFlag($flag, $_COOKIE[$flag['encrypted_name']], $defaultValue) : array('value' => $defaultValue, 'cookie_value' => $defaultValue ));
195 } 195 }
196 196
197 public function getFlag($flag, $encrypted){ 197 public function getFlag($flag, $encrypted){
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!