@@ -35,12 +35,12 @@ discard block |
||
| 35 | 35 | public function build_multi_select(array $option_ary, $selected_items, $field) |
| 36 | 36 | { |
| 37 | 37 | $selected_items = $this->ensure_array($selected_items); |
| 38 | - $html = '<select id="' . $field . '" name="config[' . $field . '][]" multiple="multiple">'; |
|
| 38 | + $html = '<select id="'.$field.'" name="config['.$field.'][]" multiple="multiple">'; |
|
| 39 | 39 | foreach ($option_ary as $value => $title) |
| 40 | 40 | { |
| 41 | 41 | $title = $this->user->lang($title); |
| 42 | 42 | $selected = $this->get_selected_option($value, $selected_items); |
| 43 | - $html .= '<option value="' . $value . '"' . $selected . '>' . $title . '</option>'; |
|
| 43 | + $html .= '<option value="'.$value.'"'.$selected.'>'.$title.'</option>'; |
|
| 44 | 44 | } |
| 45 | 45 | $html .= '</select>'; |
| 46 | 46 | |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | { |
| 101 | 101 | $title = $this->user->lang($title); |
| 102 | 102 | $selected = $this->get_selected_option($value, $selected_item, 'checked'); |
| 103 | - $html .= '<label><input type="radio" name="config[' . $key . ']" value="' . $value . '"' . $selected . ' class="radio" /> ' . $title . '</label><br />'; |
|
| 103 | + $html .= '<label><input type="radio" name="config['.$key.']" value="'.$value.'"'.$selected.' class="radio" /> '.$title.'</label><br />'; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | return $html; |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | public function build_hidden($value, $field) |
| 117 | 117 | { |
| 118 | - return '<input type="hidden" name="config[' . $field . ']" value="' . $value . '" />'; |
|
| 118 | + return '<input type="hidden" name="config['.$field.']" value="'.$value.'" />'; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /** |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | */ |
| 156 | 156 | protected function get_selected_option($needle, array $haystack, $type = 'selected') |
| 157 | 157 | { |
| 158 | - return (in_array($needle, $haystack)) ? ' ' . $type . '="' . $type . '"' : ''; |
|
| 158 | + return (in_array($needle, $haystack)) ? ' '.$type.'="'.$type.'"' : ''; |
|
| 159 | 159 | } |
| 160 | 160 | |
| 161 | 161 | /** |
@@ -169,12 +169,12 @@ discard block |
||
| 169 | 169 | */ |
| 170 | 170 | protected function get_checkbox_column(array $row, array $selected_items, $field, $column_class, $column_count, &$index) |
| 171 | 171 | { |
| 172 | - $column = '<div class="' . $column_class . $field . '-checkbox" id="' . $field . '-col-' . $column_count . '">'; |
|
| 172 | + $column = '<div class="'.$column_class.$field.'-checkbox" id="'.$field.'-col-'.$column_count.'">'; |
|
| 173 | 173 | foreach ($row as $value => $title) |
| 174 | 174 | { |
| 175 | 175 | $title = $this->user->lang($title); |
| 176 | 176 | $selected = $this->get_selected_option($value, $selected_items, 'checked'); |
| 177 | - $column .= '<label><input type="checkbox" name="config[' . $field . '][' . $index . ']" value="' . $value . '"' . $selected . ' class="checkbox" /> ' . $title . '</label><br />'; |
|
| 177 | + $column .= '<label><input type="checkbox" name="config['.$field.']['.$index.']" value="'.$value.'"'.$selected.' class="checkbox" /> '.$title.'</label><br />'; |
|
| 178 | 178 | $index++; |
| 179 | 179 | } |
| 180 | 180 | $column .= '</div>'; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | { |
| 61 | 61 | if (!function_exists('build_cfg_template')) |
| 62 | 62 | { |
| 63 | - include($this->phpbb_root_path . 'includes/functions_acp.' . $this->php_ext); // @codeCoverageIgnore |
|
| 63 | + include($this->phpbb_root_path.'includes/functions_acp.'.$this->php_ext); // @codeCoverageIgnore |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | $this->generate_config_fields($block_data['settings'], $default_settings); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | // @codeCoverageIgnoreStart |
| 99 | 99 | if (!function_exists('validate_config_vars')) |
| 100 | 100 | { |
| 101 | - include($this->phpbb_root_path . 'includes/functions_acp.' . $this->php_ext); |
|
| 101 | + include($this->phpbb_root_path.'includes/functions_acp.'.$this->php_ext); |
|
| 102 | 102 | } |
| 103 | 103 | // @codeCoverageIgnoreEnd |
| 104 | 104 | |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | if (empty($vars['object'])) |
| 202 | 202 | { |
| 203 | 203 | $object = $this; |
| 204 | - $method = 'prep_' . $type[0] . '_field_for_display'; |
|
| 204 | + $method = 'prep_'.$type[0].'_field_for_display'; |
|
| 205 | 205 | |
| 206 | 206 | if (is_callable(array($this, $method))) |
| 207 | 207 | { |
@@ -255,7 +255,7 @@ discard block |
||
| 255 | 255 | $l_explain = ''; |
| 256 | 256 | if (!empty($vars['explain'])) |
| 257 | 257 | { |
| 258 | - $l_explain = (isset($vars['lang_explain'])) ? $this->user->lang($vars['lang_explain']) : $this->user->lang($vars['lang'] . '_EXPLAIN'); |
|
| 258 | + $l_explain = (isset($vars['lang_explain'])) ? $this->user->lang($vars['lang_explain']) : $this->user->lang($vars['lang'].'_EXPLAIN'); |
|
| 259 | 259 | } |
| 260 | 260 | |
| 261 | 261 | return $l_explain; |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | { |
| 358 | 358 | $this->prep_checkbox_field_for_display($vars, $type, $field); |
| 359 | 359 | |
| 360 | - $vars['method'] ='build_multi_select'; |
|
| 360 | + $vars['method'] = 'build_multi_select'; |
|
| 361 | 361 | } |
| 362 | 362 | |
| 363 | 363 | /** |
@@ -41,8 +41,7 @@ |
||
| 41 | 41 | if (is_array($message)) |
| 42 | 42 | { |
| 43 | 43 | $this->message = (string) $message[0]; |
| 44 | - } |
|
| 45 | - else |
|
| 44 | + } else |
|
| 46 | 45 | { |
| 47 | 46 | $this->message = $message; |
| 48 | 47 | } |