@@ -63,7 +63,7 @@ |
||
63 | 63 | $sql_ary = $event['sql_ary']; |
64 | 64 | |
65 | 65 | $forum_ids = array_keys($this->content_types->get_forum_types()); |
66 | - $sql_ary['WHERE'] .= ' AND ' . $this->db->sql_in_set('f.forum_id', array_map('intval', $forum_ids), true); |
|
66 | + $sql_ary['WHERE'] .= ' AND '.$this->db->sql_in_set('f.forum_id', array_map('intval', $forum_ids), true); |
|
67 | 67 | |
68 | 68 | $event['sql_ary'] = $sql_ary; |
69 | 69 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | * @param \phpbb\db\driver\driver_interface $db Database connection |
33 | 33 | * @param \phpbb\template\template $template Template object |
34 | 34 | * @param \blitze\content\services\types $content_types Content types object |
35 | - */ |
|
35 | + */ |
|
36 | 36 | public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, \blitze\content\services\types $content_types) |
37 | 37 | { |
38 | 38 | $this->config = $config; |
@@ -80,8 +80,8 @@ discard block |
||
80 | 80 | $feeds = array(); |
81 | 81 | foreach ($types_ary as $entity) |
82 | 82 | { |
83 | - /** @var \blitze\content\model\entity\type $entity */ |
|
84 | - $feeds[] = array( |
|
83 | + /** @var \blitze\content\model\entity\type $entity */ |
|
84 | + $feeds[] = array( |
|
85 | 85 | 'type' => $entity->get_content_name(), |
86 | 86 | 'langname' => $entity->get_content_langname(), |
87 | 87 | ); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | public function get_field_value(array $data) |
57 | 57 | { |
58 | 58 | $default = is_array($data['field_value']) ? $data['field_value'] : explode("\n", $data['field_value']); |
59 | - $value = $this->request->variable($data['field_name'], array(0 => '')); |
|
59 | + $value = $this->request->variable($data['field_name'], array(0 => '')); |
|
60 | 60 | return $value ?: $default; |
61 | 61 | } |
62 | 62 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | */ |
102 | 102 | protected function make_box($color) |
103 | 103 | { |
104 | - $style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: ' . $color; |
|
105 | - return ($color) ? '<div style="' . $style . '" title="' . $color . '"></div>' : ''; |
|
104 | + $style = 'display: inline-block; width: 15px; height: 15px; border: 1 solid #fff; border-radius: 4px; background-color: '.$color; |
|
105 | + return ($color) ? '<div style="'.$style.'" title="'.$color.'"></div>' : ''; |
|
106 | 106 | } |
107 | 107 | } |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | foreach ($fields_data as $field => $value) |
148 | 148 | { |
149 | 149 | $value = is_array($value) ? join("\n", $value) : $value; |
150 | - $message .= '[smcf=' . $field . ']' . $value . '[/smcf]'; |
|
150 | + $message .= '[smcf='.$field.']'.$value.'[/smcf]'; |
|
151 | 151 | } |
152 | 152 | |
153 | 153 | return $message; |
@@ -200,13 +200,13 @@ discard block |
||
200 | 200 | $text = ''; |
201 | 201 | if ($entity = $this->types->get_type($content_type)) |
202 | 202 | { |
203 | - $fields_accessor = 'get_' . $view . '_fields'; |
|
204 | - $template_accessor = 'get_' . $view . '_tpl'; |
|
203 | + $fields_accessor = 'get_'.$view.'_fields'; |
|
204 | + $template_accessor = 'get_'.$view.'_tpl'; |
|
205 | 205 | |
206 | 206 | $this->fields->prepare_to_show($entity, array($post_data['topic_id']), $entity->$fields_accessor(), $entity->$template_accessor(), $view); |
207 | 207 | $content = $this->fields->build_content(array_change_key_case($post_data, CASE_UPPER)); |
208 | 208 | |
209 | - $text = $content['CUSTOM_DISPLAY'] ?: join('', $content['FIELDS']['all']); |
|
209 | + $text = $content['CUSTOM_DISPLAY'] ?: join('', $content['FIELDS']['all']); |
|
210 | 210 | } |
211 | 211 | return $text; |
212 | 212 | } |
@@ -402,8 +402,8 @@ discard block |
||
402 | 402 | } |
403 | 403 | else |
404 | 404 | { |
405 | - $options[ITEM_UNAPPROVED] = 'CONTENT_STATUS_DISAPPROVE'; |
|
406 | - $options[ITEM_APPROVED] = 'CONTENT_STATUS_APPROVE'; |
|
405 | + $options[ITEM_UNAPPROVED] = 'CONTENT_STATUS_DISAPPROVE'; |
|
406 | + $options[ITEM_APPROVED] = 'CONTENT_STATUS_APPROVE'; |
|
407 | 407 | } |
408 | 408 | |
409 | 409 | return $options; |
@@ -286,8 +286,7 @@ discard block |
||
286 | 286 | if (!$field_data['field_mod_only'] || $this->mode === 'mcp') |
287 | 287 | { |
288 | 288 | $this->form->add($field, $field_data['field_type'], $field_data, $topic_id); |
289 | - } |
|
290 | - else if (!empty($field_data['field_value'])) |
|
289 | + } else if (!empty($field_data['field_value'])) |
|
291 | 290 | { |
292 | 291 | $this->form->add($field, 'hidden', $field_data, $topic_id); |
293 | 292 | } |
@@ -334,8 +333,7 @@ discard block |
||
334 | 333 | { |
335 | 334 | $data['force_visibility'] = $visibility; |
336 | 335 | } |
337 | - } |
|
338 | - else if ($this->force_state()) |
|
336 | + } else if ($this->force_state()) |
|
339 | 337 | { |
340 | 338 | $data['force_visibility'] = ($mode == 'edit_first_post') ? ITEM_REAPPROVE : ITEM_UNAPPROVED; |
341 | 339 | } |
@@ -399,8 +397,7 @@ discard block |
||
399 | 397 | if ($visibility == ITEM_APPROVED) |
400 | 398 | { |
401 | 399 | $options[ITEM_REAPPROVE] = 'CONTENT_STATUS_REAPPROVE'; |
402 | - } |
|
403 | - else |
|
400 | + } else |
|
404 | 401 | { |
405 | 402 | $options[ITEM_UNAPPROVED] = 'CONTENT_STATUS_DISAPPROVE'; |
406 | 403 | $options[ITEM_APPROVED] = 'CONTENT_STATUS_APPROVE'; |
@@ -61,7 +61,7 @@ |
||
61 | 61 | * @param \blitze\sitemaker\model\mapper_factory $sitemaker_mapper_factory Sitemaker Mapper factory object |
62 | 62 | * @param bool $auto_refresh Used during testing |
63 | 63 | * @param bool $trigger_error Used during testing |
64 | - */ |
|
64 | + */ |
|
65 | 65 | public function __construct(\phpbb\cache\driver\driver_interface $cache, \phpbb\language\language $language, \phpbb\log\log_interface $logger, \phpbb\request\request_interface $request, \phpbb\user $user, \blitze\content\services\types $content_types, \blitze\sitemaker\services\forum\manager $forum_manager, \blitze\content\model\mapper_factory $content_mapper_factory, \blitze\sitemaker\model\mapper_factory $sitemaker_mapper_factory, $auto_refresh = true, $trigger_error = true) |
66 | 66 | { |
67 | 67 | $this->cache = $cache; |
@@ -137,8 +137,7 @@ discard block |
||
137 | 137 | $unsaved_entity->set_content_id($entity->get_content_id()); |
138 | 138 | $this->handle_langname_change($forum_id, $entity->get_content_langname(), $unsaved_entity->get_content_langname()); |
139 | 139 | $this->copy_forum_permissions($forum_id, $forum_perm_from); |
140 | - } |
|
141 | - else |
|
140 | + } else |
|
142 | 141 | { |
143 | 142 | $forum_id = $this->create_content_forum($unsaved_entity->get_content_langname(), $forum_perm_from); |
144 | 143 | $unsaved_entity->set_forum_id($forum_id); |
@@ -210,8 +209,7 @@ discard block |
||
210 | 209 | $u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]=' . $entity->get_forum_id(), true); |
211 | 210 | $lang_key = 'CONTENT_TYPE_CREATED'; |
212 | 211 | $message = $this->language->lang($lang_key, '<a href="' . $u_set_permission . '">', '</a>'); |
213 | - } |
|
214 | - else |
|
212 | + } else |
|
215 | 213 | { |
216 | 214 | $this->meta_refresh(3, $u_action); |
217 | 215 | $lang_key = 'CONTENT_TYPE_UPDATED'; |
@@ -207,9 +207,9 @@ discard block |
||
207 | 207 | { |
208 | 208 | if (!$type) |
209 | 209 | { |
210 | - $u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]=' . $entity->get_forum_id(), true); |
|
210 | + $u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]='.$entity->get_forum_id(), true); |
|
211 | 211 | $lang_key = 'CONTENT_TYPE_CREATED'; |
212 | - $message = $this->language->lang($lang_key, '<a href="' . $u_set_permission . '">', '</a>'); |
|
212 | + $message = $this->language->lang($lang_key, '<a href="'.$u_set_permission.'">', '</a>'); |
|
213 | 213 | } |
214 | 214 | else |
215 | 215 | { |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | } |
227 | 227 | |
228 | 228 | $additional_data[] = $entity->get_content_langname(); |
229 | - $this->logger->add('admin', $this->user->data['user_id'], $this->user->ip, 'ACP_LOG_' . $lang_key, time(), $additional_data); |
|
229 | + $this->logger->add('admin', $this->user->data['user_id'], $this->user->ip, 'ACP_LOG_'.$lang_key, time(), $additional_data); |
|
230 | 230 | |
231 | 231 | $this->trigger_error($message, $u_action); |
232 | 232 | } |
@@ -269,7 +269,7 @@ discard block |
||
269 | 269 | if ($old_langname !== $new_langname) |
270 | 270 | { |
271 | 271 | $forum_name = $this->language->lang($new_langname); |
272 | - $sql = 'UPDATE ' . FORUMS_TABLE . " SET forum_name = '" . $this->db->sql_escape($forum_name) . "' WHERE forum_id = " . (int) $forum_id; |
|
272 | + $sql = 'UPDATE '.FORUMS_TABLE." SET forum_name = '".$this->db->sql_escape($forum_name)."' WHERE forum_id = ".(int) $forum_id; |
|
273 | 273 | $this->db->sql_query($sql); |
274 | 274 | } |
275 | 275 | } |
@@ -77,7 +77,7 @@ |
||
77 | 77 | * @param string $phpbb_admin_path Relative admin root path |
78 | 78 | * @param string $php_ext php file extension |
79 | 79 | * @param boolean $auto_refresh Used for testing |
80 | - */ |
|
80 | + */ |
|
81 | 81 | public function __construct(\phpbb\auth\auth $auth, \phpbb\cache\driver\driver_interface $cache, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \phpbb\language\language $language, \phpbb\log\log_interface $logger, \phpbb\request\request_interface $request, \phpbb\user $user, \blitze\content\services\types $content_types, \blitze\sitemaker\services\forum\manager $forum_manager, \blitze\content\model\mapper_factory $mapper_factory, $phpbb_admin_path, $php_ext, $auto_refresh = true) |
82 | 82 | { |
83 | 83 | $this->auth = $auth; |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | return ''; |
85 | 85 | } |
86 | 86 | |
87 | - $callable = 'display_field_' . $data['field_props']['display']; |
|
87 | + $callable = 'display_field_'.$data['field_props']['display']; |
|
88 | 88 | return $this->$callable($data); |
89 | 89 | } |
90 | 90 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | array_walk($range, array($this, 'set_prefix'), $data['field_props']['prefix']); |
126 | 126 | } |
127 | 127 | |
128 | - return join($range, ' - ') . $data['field_props']['postfix']; |
|
128 | + return join($range, ' - ').$data['field_props']['postfix']; |
|
129 | 129 | } |
130 | 130 | |
131 | 131 | /** |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | */ |
166 | 166 | protected function set_prefix(&$item, $key, $prefix) |
167 | 167 | { |
168 | - $item = $prefix . $item; |
|
168 | + $item = $prefix.$item; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | /** |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | ), |
181 | 181 | 'css' => array( |
182 | 182 | '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.min.css', |
183 | - '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.' . $theme . '.min.css', |
|
183 | + '@blitze_content/vendor/ion.rangeSlider/css/ion.rangeSlider.'.$theme.'.min.css', |
|
184 | 184 | ) |
185 | 185 | )); |
186 | 186 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object |
36 | 36 | * @param \blitze\content\services\types $content_types Content types object |
37 | 37 | * @param \blitze\content\model\mapper_factory $mapper_factory Mapper factory object |
38 | - */ |
|
38 | + */ |
|
39 | 39 | public function __construct(\phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \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\topic\blocks_factory $topic_blocks_factory, \blitze\content\services\views\views_factory $views_factory, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \blitze\content\services\types $content_types, \blitze\content\model\mapper_factory $mapper_factory) |
40 | 40 | { |
41 | 41 | parent::__construct($auth, $controller_helper, $language, $template, $user, $auto_lang, $fields_factory, $topic_blocks_factory, $views_factory); |
@@ -55,7 +55,7 @@ |
||
55 | 55 | * @param \blitze\content\services\form\fields_factory $fields_factory Fields factory object |
56 | 56 | * @param \blitze\content\services\topic\blocks_factory $topic_blocks_factory Topic blocks 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\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\topic\blocks_factory $topic_blocks_factory, \blitze\content\services\views\views_factory $views_factory) |
60 | 60 | { |
61 | 61 | $this->auth = $auth; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | 'TOPIC_BLOCK_OPS' => $this->topic_blocks_factory->get_all(), |
91 | 91 | 'ITEMS_PER_PAGE' => 10, |
92 | 92 | |
93 | - 'U_ACTION' => $u_action . "&do=save&type=$type", |
|
93 | + 'U_ACTION' => $u_action."&do=save&type=$type", |
|
94 | 94 | 'UA_AJAX_URL' => $this->controller_helper->route('blitze_content_field_settings', array(), false), |
95 | 95 | |
96 | 96 | 'S_TYPE_OPS' => $this->get_field_options(), |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | $options = ''; |
112 | 112 | foreach ($fields as $field => $object) |
113 | 113 | { |
114 | - $options .= '<option value="' . $field . '">' . $this->language->lang($object->get_langname()) . '</option>'; |
|
114 | + $options .= '<option value="'.$field.'">'.$this->language->lang($object->get_langname()).'</option>'; |
|
115 | 115 | } |
116 | 116 | |
117 | 117 | return $options; |
@@ -30,7 +30,7 @@ |
||
30 | 30 | * @param \phpbb\template\template $template Template object |
31 | 31 | * @param \blitze\content\services\fields $fields Content fields object |
32 | 32 | * @param \blitze\sitemaker\services\forum\data $forum Forum Data object |
33 | - */ |
|
33 | + */ |
|
34 | 34 | public function __construct(\phpbb\language\language $language, \phpbb\template\template $template, \blitze\content\services\fields $fields, \blitze\sitemaker\services\forum\data $forum) |
35 | 35 | { |
36 | 36 | $this->language = $language; |
@@ -68,7 +68,7 @@ |
||
68 | 68 | ->fetch_forum($topic_data['forum_id']) |
69 | 69 | ->fetch_topic_poster($topic_data['topic_poster']) |
70 | 70 | ->fetch_custom(array( |
71 | - 'WHERE' => array('t.topic_id <> ' . (int) $topic_data['topic_id']) |
|
71 | + 'WHERE' => array('t.topic_id <> '.(int) $topic_data['topic_id']) |
|
72 | 72 | ))->build(true, true, false); |
73 | 73 | |
74 | 74 | $topics_data = $this->forum->get_topic_data(5); |