@@ -32,7 +32,7 @@ |
||
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; |
@@ -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 | } |
@@ -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 | } |
@@ -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; |
@@ -73,7 +73,7 @@ |
||
73 | 73 | * @param string $phpbb_admin_path Relative admin root path |
74 | 74 | * @param string $php_ext php file extension |
75 | 75 | * @param boolean $auto_refresh Used for testing |
76 | - */ |
|
76 | + */ |
|
77 | 77 | public function __construct(\phpbb\auth\auth $auth, \phpbb\cache\driver\driver_interface $cache, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \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) |
78 | 78 | { |
79 | 79 | $this->auth = $auth; |
@@ -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 | } |
@@ -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 | } |