| @@ 62-66 (lines=5) @@ | ||
| 59 | */ |
|
| 60 | public function setVar($key, $value, $not_gpc = false) |
|
| 61 | { |
|
| 62 | if ($key === 'field_options' && is_array($value)) { |
|
| 63 | foreach (array_keys($value) as $idx) { |
|
| 64 | $value[$idx] = base64_encode($value[$idx]); |
|
| 65 | } |
|
| 66 | } |
|
| 67 | parent::setVar($key, $value, $not_gpc); |
|
| 68 | } |
|
| 69 | ||
| @@ 79-83 (lines=5) @@ | ||
| 76 | public function getVar($key, $format = 's') |
|
| 77 | { |
|
| 78 | $value = parent::getVar($key, $format); |
|
| 79 | if ($key === 'field_options' && !empty($value)) { |
|
| 80 | foreach (array_keys($value) as $idx) { |
|
| 81 | $value[$idx] = base64_decode($value[$idx]); |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| 85 | return $value; |
|
| 86 | } |
|