|
12 | 12 |
|
13 | 13 | namespace paybas\quickstyle\event; |
14 | 14 |
|
15 | | -/** |
16 | | - * @ignore |
17 | | - */ |
18 | | -if (!defined('IN_PHPBB')) |
19 | | -{ |
20 | | - exit; |
21 | | -} |
22 | | - |
23 | 15 | use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
24 | 16 |
|
25 | 17 | class listener implements EventSubscriberInterface |
@@ -91,9 +83,11 @@ public function select_style_form() |
91 | 83 | $redirect = 'redirect=' . urlencode(str_replace(array('&', '../'), array('&', ''), build_url('style'))); // Build redirect URL |
92 | 84 | $action = append_sid("{$this->root_path}ucp.$this->phpEx", 'i=prefs&mode=personal&' . $redirect); // Build form submit URL + redirect |
93 | 85 | $action = preg_replace('/(?:&|(\?))style=[^&]*(?(1)&|)?/i', "$1", $action); // Remove style= param if it exists |
94 | | - $this->template->assign_var('S_QUICK_STYLE_ACTION', $action); |
95 | | - $this->template->assign_var('S_QUICK_STYLE_OPTIONS', ($this->config['override_user_style']) ? '' : $style_options); |
96 | | - $this->template->assign_var('S_QUICK_STYLE_DEFAULT_LOC', $this->default_loc); |
| 86 | + $this->template->assign_vars(array( |
| 87 | + 'S_QUICK_STYLE_ACTION' => $action, |
| 88 | + 'S_QUICK_STYLE_OPTIONS' => ($this->config['override_user_style']) ? '' : $style_options, |
| 89 | + 'S_QUICK_STYLE_DEFAULT_LOC' => $this->default_loc, |
| 90 | + )); |
97 | 91 | } |
98 | 92 | } |
99 | 93 | } |
@@ -146,7 +140,7 @@ public function set_guest_style($event) |
146 | 140 |
|
147 | 141 | /** |
148 | 142 | */ |
149 | | - public function request_cookie($name, $default = null) |
| 143 | + private function request_cookie($name, $default = null) |
150 | 144 | { |
151 | 145 | $name = $this->config['cookie_name'] . '_' . $name; |
152 | 146 |
|
|
0 commit comments