@@ -168,8 +168,7 @@ discard block |
||
168 | 168 | { |
169 | 169 | $data = generate_text_for_edit($this->field_explain, $this->field_exp_uid, $this->field_exp_options); |
170 | 170 | return $data['text']; |
171 | - } |
|
172 | - else |
|
171 | + } else |
|
173 | 172 | { |
174 | 173 | $parse_flags = ($this->field_exp_bitfield ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; |
175 | 174 | return generate_text_for_display($this->field_explain, $this->field_exp_uid, $this->field_exp_bitfield, $parse_flags); |
@@ -186,8 +185,7 @@ discard block |
||
186 | 185 | if (!is_array($props)) |
187 | 186 | { |
188 | 187 | $this->field_props = $props; |
189 | - } |
|
190 | - else if (sizeof($props)) |
|
188 | + } else if (sizeof($props)) |
|
191 | 189 | { |
192 | 190 | $this->field_props = json_encode($props); |
193 | 191 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | 'ITEMS_PER_PAGE' => 10, |
86 | 86 | 'TOPICS_PER_GROUP' => 4, |
87 | 87 | |
88 | - 'U_ACTION' => $u_action . "&do=save&type=$type", |
|
88 | + 'U_ACTION' => $u_action."&do=save&type=$type", |
|
89 | 89 | 'UA_AJAX_URL' => $this->controller_helper->route('blitze_content_field_settings', array(), false), |
90 | 90 | |
91 | 91 | 'S_TYPE_OPS' => $this->get_field_options(), |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | $options = ''; |
109 | 109 | foreach ($fields as $field => $object) |
110 | 110 | { |
111 | - $options .= '<option value="' . $field . '">' . $this->language->lang($object->get_langname()) . '</option>'; |
|
111 | + $options .= '<option value="'.$field.'">'.$this->language->lang($object->get_langname()).'</option>'; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | return $options; |
@@ -55,7 +55,7 @@ |
||
55 | 55 | * @param \blitze\sitemaker\services\auto_lang $auto_lang Auto add lang file |
56 | 56 | * @param \blitze\content\services\form\fields_factory $fields_factory Fields factory object |
57 | 57 | * @param \blitze\content\services\views\views_factory $views_factory Views factory object |
58 | - */ |
|
58 | + */ |
|
59 | 59 | public function __construct(\phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \blitze\sitemaker\services\auto_lang $auto_lang, \blitze\content\services\form\fields_factory $fields_factory, \blitze\content\services\views\views_factory $views_factory) |
60 | 60 | { |
61 | 61 | $this->auth = $auth; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function get_field_value($name, $default) |
57 | 57 | { |
58 | 58 | $default = is_array($default) ? $default : explode("\n", $default); |
59 | - $value = $this->request->variable($name, array(0 => ''), true); |
|
59 | + $value = $this->request->variable($name, array(0 => ''), true); |
|
60 | 60 | |
61 | 61 | return $value ? $value : $default; |
62 | 62 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | protected function make_box($color) |
104 | 104 | { |
105 | - $style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: ' . $color; |
|
106 | - return ($color) ? '<div style="' . $style . '" title="' . $color . '"></div>' : ''; |
|
105 | + $style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: '.$color; |
|
106 | + return ($color) ? '<div style="'.$style.'" title="'.$color.'"></div>' : ''; |
|
107 | 107 | } |
108 | 108 | } |
@@ -94,7 +94,7 @@ |
||
94 | 94 | * @param int $topic_id |
95 | 95 | * @param string $mode |
96 | 96 | * @param bool $save_draft |
97 | - * @return string|false |
|
97 | + * @return string|boolean |
|
98 | 98 | */ |
99 | 99 | public function init($forum_id, $topic_id, $mode, $save_draft) |
100 | 100 | { |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | foreach ($fields_data as $field => $value) |
141 | 141 | { |
142 | 142 | $value = is_array($value) ? join("\n", $value) : $value; |
143 | - $message .= '[tag=' . $field . ']' . $value . '[/tag]'; |
|
143 | + $message .= '[tag='.$field.']'.$value.'[/tag]'; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | return $message; |
@@ -192,13 +192,13 @@ discard block |
||
192 | 192 | $text = ''; |
193 | 193 | if ($entity = $this->types->get_type($content_type)) |
194 | 194 | { |
195 | - $get_tags = 'get_' . $view . '_tags'; |
|
196 | - $get_template = 'get_' . $view . '_tpl'; |
|
195 | + $get_tags = 'get_'.$view.'_tags'; |
|
196 | + $get_template = 'get_'.$view.'_tpl'; |
|
197 | 197 | |
198 | 198 | $this->fields->prepare_to_show($entity, array($post_data['topic_id']), $entity->$get_tags(), $entity->$get_template(), $view); |
199 | 199 | $content = $this->fields->build_content(array_change_key_case($post_data, CASE_UPPER)); |
200 | 200 | |
201 | - $text = $content['CUSTOM_DISPLAY'] ?: join('', $content['FIELDS']['all']); |
|
201 | + $text = $content['CUSTOM_DISPLAY'] ?: join('', $content['FIELDS']['all']); |
|
202 | 202 | } |
203 | 203 | return $text; |
204 | 204 | } |
@@ -280,8 +280,7 @@ discard block |
||
280 | 280 | if (!$field_data['field_mod_only'] || $this->mode === 'mcp') |
281 | 281 | { |
282 | 282 | $this->form->add($field, $field_data['field_type'], $field_data, $topic_id); |
283 | - } |
|
284 | - else if (!empty($field_data['field_value'])) |
|
283 | + } else if (!empty($field_data['field_value'])) |
|
285 | 284 | { |
286 | 285 | $this->form->add($field, 'hidden', $field_data, $topic_id); |
287 | 286 | } |
@@ -333,8 +332,7 @@ discard block |
||
333 | 332 | { |
334 | 333 | $sql_data['topic_visibility'] = $force_status; |
335 | 334 | } |
336 | - } |
|
337 | - else |
|
335 | + } else |
|
338 | 336 | { |
339 | 337 | if ($this->force_state()) |
340 | 338 | { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | * @param \phpbb\user $user User object |
35 | 35 | * @param string $phpbb_root_path Path to the phpbb includes directory. |
36 | 36 | * @param string $php_ext php file extension |
37 | - */ |
|
37 | + */ |
|
38 | 38 | public function __construct(\phpbb\auth\auth $auth, \phpbb\template\template $template, \phpbb\user $user, $phpbb_root_path, $php_ext) |
39 | 39 | { |
40 | 40 | $this->auth = $auth; |
@@ -124,7 +124,7 @@ |
||
124 | 124 | */ |
125 | 125 | protected function allow_topic_delete(array $topic_data) |
126 | 126 | { |
127 | - return ($this->auth->acl_get('m_delete', $topic_data['forum_id'])) || (($topic_data['topic_visibility'] != ITEM_DELETED) && $this->auth->acl_get('m_softdelete', $topic_data['forum_id'])); |
|
127 | + return ($this->auth->acl_get('m_delete', $topic_data['forum_id'])) || (($topic_data['topic_visibility'] != ITEM_DELETED) && $this->auth->acl_get('m_softdelete', $topic_data['forum_id'])); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * |
23 | 23 | * @param \blitze\sitemaker\services\poll $poll Poll Object |
24 | 24 | * @param \blitze\sitemaker\services\template $ptemplate Sitemaker Template Object |
25 | - */ |
|
25 | + */ |
|
26 | 26 | public function __construct(\blitze\sitemaker\services\poll $poll, \blitze\sitemaker\services\template $ptemplate) |
27 | 27 | { |
28 | 28 | $this->poll = $poll; |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $value = $this->request->variable($name, $value); |
20 | 20 | $value = $this->get_image_src($value); |
21 | 21 | |
22 | - return ($value) ? '[img]' . $value . '[/img]' : ''; |
|
22 | + return ($value) ? '[img]'.$value.'[/img]' : ''; |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $data['field_value'] = $this->get_image_src($bbcode_value); |
35 | 35 | |
36 | 36 | $this->ptemplate->assign_vars($data); |
37 | - $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field . '_field'); |
|
37 | + $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field.'_field'); |
|
38 | 38 | |
39 | 39 | $data['field_value'] = $bbcode_value; |
40 | 40 | |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | $image = ''; |
50 | 50 | if ($data['field_value']) |
51 | 51 | { |
52 | - $image = '<figure class="img-ui">' . $data['field_value'] . '</figure>'; |
|
52 | + $image = '<figure class="img-ui">'.$data['field_value'].'</figure>'; |
|
53 | 53 | if ($mode !== 'block') |
54 | 54 | { |
55 | - $image = '<div class="' . join(' ', array_filter($data['field_props'])) . '">' . $image . '</div>'; |
|
55 | + $image = '<div class="'.join(' ', array_filter($data['field_props'])).'">'.$image.'</div>'; |
|
56 | 56 | } |
57 | 57 | } |
58 | 58 | return $image; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | ), |
69 | 69 | 'css' => array( |
70 | 70 | '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.min.css', |
71 | - '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.' . $data['field_props']['theme'] . '.min.css', |
|
71 | + '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.'.$data['field_props']['theme'].'.min.css', |
|
72 | 72 | ) |
73 | 73 | )); |
74 | 74 | |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | array_walk($range, array($this, 'set_prefix'), $data['field_props']['prefix']); |
90 | 90 | } |
91 | 91 | |
92 | - return join($range, ' - ') . $data['field_props']['postfix']; |
|
92 | + return join($range, ' - ').$data['field_props']['postfix']; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -129,6 +129,6 @@ discard block |
||
129 | 129 | */ |
130 | 130 | protected function set_prefix(&$item, $key, $prefix) |
131 | 131 | { |
132 | - $item = $prefix . $item; |
|
132 | + $item = $prefix.$item; |
|
133 | 133 | } |
134 | 134 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | */ |
37 | 37 | public function display_field(array $data) |
38 | 38 | { |
39 | - return $data['field_value'] ? '<a href="tel:' . $data['field_value'] . '">' . preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "$1-$2-$3", $data['field_value']) . '</a>' : ''; |
|
39 | + return $data['field_value'] ? '<a href="tel:'.$data['field_value'].'">'.preg_replace("/^1?(\d{3})(\d{3})(\d{4})$/", "$1-$2-$3", $data['field_value']).'</a>' : ''; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |