@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | $this->ptemplate->assign_vars(array_change_key_case($data, CASE_UPPER)); |
| 53 | 53 | |
| 54 | - return $this->ptemplate->render_view('blitze/content', "fields/$field.html", $field . '_field'); |
|
| 54 | + return $this->ptemplate->render_view('blitze/content', "fields/$field.html", $field.'_field'); |
|
| 55 | 55 | } |
| 56 | 56 | |
| 57 | 57 | /** |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | foreach ($data['field_settings']['field_options'] as $value => $label) |
| 71 | 71 | { |
| 72 | 72 | $this->ptemplate->assign_block_vars('option', array( |
| 73 | - 'ID' => 'field-'. $name . '-' . $count, |
|
| 73 | + 'ID' => 'field-'.$name.'-'.$count, |
|
| 74 | 74 | 'LABEL' => $this->language->lang($label), |
| 75 | 75 | 'SELECTED' => (in_array($value, $selected, true)) ? true : false, |
| 76 | 76 | 'VALUE' => $value |
@@ -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(array_change_key_case($data, CASE_UPPER)); |
| 37 | - $field = $this->ptemplate->render_view('blitze/content', "fields/$field.html", $field . '_field'); |
|
| 37 | + $field = $this->ptemplate->render_view('blitze/content', "fields/$field.html", $field.'_field'); |
|
| 38 | 38 | |
| 39 | 39 | $data['field_value'] = $bbcode_value; |
| 40 | 40 | |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function display_field($value) |
| 48 | 48 | { |
| 49 | - return ($value) ? '<div class="img-ui">' . $value . '</div>' : ''; |
|
| 49 | + return ($value) ? '<div class="img-ui">'.$value.'</div>' : ''; |
|
| 50 | 50 | } |
| 51 | 51 | |
| 52 | 52 | /** |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | */ |
| 35 | 35 | public function create($mode, $action) |
| 36 | 36 | { |
| 37 | - $service_name = 'blitze.content.actions.' . $mode . '.' . $action; |
|
| 37 | + $service_name = 'blitze.content.actions.'.$mode.'.'.$action; |
|
| 38 | 38 | if (!$this->phpbb_container->has($service_name)) |
| 39 | 39 | { |
| 40 | 40 | throw new \blitze\sitemaker\exception\out_of_bounds(array($action, 'INVALID_REQUEST')); |
@@ -65,14 +65,14 @@ |
||
| 65 | 65 | $entity->set_allow_comments(false); |
| 66 | 66 | |
| 67 | 67 | $overwrite = array( |
| 68 | - 'TOPIC_URL' => $u_action . '&do=view&type=' . $type . '&t=' . $topic_id, |
|
| 68 | + 'TOPIC_URL' => $u_action.'&do=view&type='.$type.'&t='.$topic_id, |
|
| 69 | 69 | 'U_INFO' => '', |
| 70 | 70 | ); |
| 71 | 71 | |
| 72 | 72 | if ($mode === 'mcp') |
| 73 | 73 | { |
| 74 | 74 | $redirect_url = urlencode(str_replace('&', '&', $u_action)); |
| 75 | - $overwrite['U_DELETE'] = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'quickmod=1&action=delete_topic&t=' . $topic_id . '&redirect=' . $redirect_url); |
|
| 75 | + $overwrite['U_DELETE'] = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'quickmod=1&action=delete_topic&t='.$topic_id.'&redirect='.$redirect_url); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | $update_count = array(); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | { |
| 89 | 89 | $copy_params = $this->params; |
| 90 | 90 | unset($copy_params['type']); |
| 91 | - $view_url = $u_action . http_build_query($copy_params); |
|
| 91 | + $view_url = $u_action.http_build_query($copy_params); |
|
| 92 | 92 | |
| 93 | 93 | $this->template->assign_block_vars('content', array( |
| 94 | 94 | 'TITLE' => $this->language->lang('TOPIC_ALL'), |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | 'TITLE' => $entity->get_content_langname(), |
| 105 | 105 | 'COLOUR' => $entity->get_content_colour(), |
| 106 | 106 | 'S_SELECTED' => ($type === $content_name) ? true : false, |
| 107 | - 'U_VIEW' => $view_url . '&type=' . $content_name |
|
| 107 | + 'U_VIEW' => $view_url.'&type='.$content_name |
|
| 108 | 108 | )); |
| 109 | 109 | } |
| 110 | 110 | } |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | { |
| 135 | 135 | $copy_params = $this->params; |
| 136 | 136 | unset($copy_params['status']); |
| 137 | - $view_url = $u_action . http_build_query($copy_params); |
|
| 137 | + $view_url = $u_action.http_build_query($copy_params); |
|
| 138 | 138 | |
| 139 | 139 | $this->template->assign_block_vars('status', array( |
| 140 | 140 | 'TITLE' => $this->language->lang('TOPIC_ALL'), |
@@ -146,9 +146,9 @@ discard block |
||
| 146 | 146 | foreach ($topic_status_ary as $status) |
| 147 | 147 | { |
| 148 | 148 | $this->template->assign_block_vars('status', array( |
| 149 | - 'TITLE' => $this->language->lang('TOPIC_' . strtoupper($status)), |
|
| 149 | + 'TITLE' => $this->language->lang('TOPIC_'.strtoupper($status)), |
|
| 150 | 150 | 'S_SELECTED' => ($status === $topic_status) ? true : false, |
| 151 | - 'U_VIEW' => $view_url . '&status=' . $status |
|
| 151 | + 'U_VIEW' => $view_url.'&status='.$status |
|
| 152 | 152 | )); |
| 153 | 153 | } |
| 154 | 154 | } |
@@ -163,18 +163,18 @@ discard block |
||
| 163 | 163 | switch ($topic_status) |
| 164 | 164 | { |
| 165 | 165 | case 'scheduled': |
| 166 | - $sql_where_array[] = 't.topic_time > ' . time(); |
|
| 166 | + $sql_where_array[] = 't.topic_time > '.time(); |
|
| 167 | 167 | break; |
| 168 | 168 | case 'unapproved': |
| 169 | 169 | case 'published': |
| 170 | 170 | case 'deleted': |
| 171 | - $sql_where_array[] = 't.topic_visibility = ' . array_search($topic_status, $this->filter_topic_status_ary); |
|
| 171 | + $sql_where_array[] = 't.topic_visibility = '.array_search($topic_status, $this->filter_topic_status_ary); |
|
| 172 | 172 | break; |
| 173 | 173 | case 'recommended': |
| 174 | 174 | case 'featured': |
| 175 | 175 | case 'must_read': |
| 176 | - $sql_where_array[] = 't.topic_type = ' . array_search($topic_status, $this->filter_topic_types_ary); |
|
| 177 | - $sql_where_array[] = 't.topic_visibility = ' . ITEM_APPROVED; |
|
| 176 | + $sql_where_array[] = 't.topic_type = '.array_search($topic_status, $this->filter_topic_types_ary); |
|
| 177 | + $sql_where_array[] = 't.topic_visibility = '.ITEM_APPROVED; |
|
| 178 | 178 | break; |
| 179 | 179 | } |
| 180 | 180 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | if ($keyword = $this->request->variable('keyword', '', true)) |
| 189 | 189 | { |
| 190 | 190 | $this->params['keyword'] = $keyword; |
| 191 | - $sql_where_array[] = 't.topic_title ' . $this->db->sql_like_expression($this->db->get_any_char() . $keyword . $this->db->get_any_char()); |
|
| 191 | + $sql_where_array[] = 't.topic_title '.$this->db->sql_like_expression($this->db->get_any_char().$keyword.$this->db->get_any_char()); |
|
| 192 | 192 | } |
| 193 | 193 | } |
| 194 | 194 | } |
@@ -84,7 +84,7 @@ |
||
| 84 | 84 | $this->template->assign_block_vars('field', array_merge( |
| 85 | 85 | array_change_key_case($entity->to_array(), CASE_UPPER), |
| 86 | 86 | array( |
| 87 | - 'TOKEN' => '{' . strtoupper($entity->get_field_name()) . '}', |
|
| 87 | + 'TOKEN' => '{'.strtoupper($entity->get_field_name()).'}', |
|
| 88 | 88 | 'TYPE_LABEL' => $this->language->lang($object->get_langname()), |
| 89 | 89 | 'DEFAULT_TYPE' => $this->get_field_type($entity->get_field_type(), $object->get_default_props()), |
| 90 | 90 | 'FIELD_EXPLAIN' => $explain['text'], |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | * @param \blitze\content\services\form\fields_factory $fields_factory Fields factory object |
| 30 | 30 | * @param \blitze\content\model\mapper_factory $mapper_factory Mapper factory object |
| 31 | 31 | * @param \blitze\content\services\views\views_factory $views_factory Views factory object |
| 32 | - */ |
|
| 32 | + */ |
|
| 33 | 33 | public function __construct(\phpbb\auth\auth $auth, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \blitze\sitemaker\services\auto_lang $auto_lang, \blitze\content\services\types $content_types, \blitze\content\services\form\fields_factory $fields_factory, \blitze\content\model\mapper_factory $mapper_factory, \blitze\content\services\views\views_factory $views_factory) |
| 34 | 34 | { |
| 35 | 35 | parent::__construct($auth, $language, $template, $user, $auto_lang, $fields_factory, $views_factory); |
@@ -300,7 +300,7 @@ |
||
| 300 | 300 | /** |
| 301 | 301 | * @param string $field |
| 302 | 302 | * @param array $fields_settings |
| 303 | - * @param array $fields_options |
|
| 303 | + * @param array $field_options |
|
| 304 | 304 | * @param array $fields_defaults |
| 305 | 305 | * @return array |
| 306 | 306 | */ |
@@ -62,7 +62,7 @@ |
||
| 62 | 62 | * @param string $phpbb_admin_path Relative admin root path |
| 63 | 63 | * @param string $php_ext php file extension |
| 64 | 64 | * @param boolean $auto_refresh Used for testing |
| 65 | - */ |
|
| 65 | + */ |
|
| 66 | 66 | 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\request\request_interface $request, \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) |
| 67 | 67 | { |
| 68 | 68 | $this->auth = $auth; |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * @param \blitze\content\model\entity\type $unsaved_entity |
| 109 | 109 | * @return void |
| 110 | 110 | */ |
| 111 | - protected function handle_content_type($type, \blitze\content\model\entity\type &$unsaved_entity) |
|
| 111 | + protected function handle_content_type($type, \blitze\content\model\entity\type & $unsaved_entity) |
|
| 112 | 112 | { |
| 113 | 113 | $forum_perm_from = $this->request->variable('copy_forum_perm', 0); |
| 114 | 114 | |
@@ -187,8 +187,8 @@ discard block |
||
| 187 | 187 | { |
| 188 | 188 | if (!$type) |
| 189 | 189 | { |
| 190 | - $u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]=' . $forum_id, true); |
|
| 191 | - $message = $this->language->lang('CONTENT_TYPE_CREATED', '<a href="' . $u_set_permission . '">', '</a>'); |
|
| 190 | + $u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]='.$forum_id, true); |
|
| 191 | + $message = $this->language->lang('CONTENT_TYPE_CREATED', '<a href="'.$u_set_permission.'">', '</a>'); |
|
| 192 | 192 | } |
| 193 | 193 | else |
| 194 | 194 | { |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | if ($old_langname !== $new_langname) |
| 238 | 238 | { |
| 239 | 239 | $forum_name = $this->language->lang($new_langname); |
| 240 | - $sql = 'UPDATE ' . FORUMS_TABLE . " SET forum_name = '" . $this->db->sql_escape($forum_name) . "' WHERE forum_id = " . (int) $forum_id; |
|
| 240 | + $sql = 'UPDATE '.FORUMS_TABLE." SET forum_name = '".$this->db->sql_escape($forum_name)."' WHERE forum_id = ".(int) $forum_id; |
|
| 241 | 241 | $this->db->sql_query($sql); |
| 242 | 242 | } |
| 243 | 243 | } |
@@ -121,8 +121,7 @@ discard block |
||
| 121 | 121 | $unsaved_entity->set_content_id($entity->get_content_id()); |
| 122 | 122 | $this->handle_langname_change($forum_id, $entity->get_content_langname(), $unsaved_entity->get_content_langname()); |
| 123 | 123 | $this->copy_forum_permissions($forum_id, $forum_perm_from); |
| 124 | - } |
|
| 125 | - else |
|
| 124 | + } else |
|
| 126 | 125 | { |
| 127 | 126 | $forum_id = $this->create_content_forum($unsaved_entity->get_content_langname(), $forum_perm_from); |
| 128 | 127 | $unsaved_entity->set_forum_id($forum_id); |
@@ -189,8 +188,7 @@ discard block |
||
| 189 | 188 | { |
| 190 | 189 | $u_set_permission = append_sid("{$this->phpbb_admin_path}index.$this->php_ext", 'i=permissions&mode=setting_forum_local&forum_id[]=' . $forum_id, true); |
| 191 | 190 | $message = $this->language->lang('CONTENT_TYPE_CREATED', '<a href="' . $u_set_permission . '">', '</a>'); |
| 192 | - } |
|
| 193 | - else |
|
| 191 | + } else |
|
| 194 | 192 | { |
| 195 | 193 | $this->meta_refresh(3, $u_action); |
| 196 | 194 | $message = $this->language->lang('CONTENT_TYPE_UPDATED'); |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | * @param \blitze\sitemaker\model\mapper_factory $sitemaker_mapper_factory Sitemaker Mapper factory object |
| 48 | 48 | * @param bool $auto_refresh Used during testing |
| 49 | 49 | * @param bool $trigger_error Used during testing |
| 50 | - */ |
|
| 50 | + */ |
|
| 51 | 51 | public function __construct(\phpbb\cache\driver\driver_interface $cache, \phpbb\language\language $language, \phpbb\request\request_interface $request, \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) |
| 52 | 52 | { |
| 53 | 53 | $this->cache = $cache; |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | * @param \blitze\sitemaker\services\auto_lang $auto_lang Auto add lang file |
| 48 | 48 | * @param \blitze\content\services\form\fields_factory $fields_factory Fields factory object |
| 49 | 49 | * @param \blitze\content\services\views\views_factory $views_factory Views factory object |
| 50 | - */ |
|
| 50 | + */ |
|
| 51 | 51 | public function __construct(\phpbb\auth\auth $auth, \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) |
| 52 | 52 | { |
| 53 | 53 | $this->auth = $auth; |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | 'POST_DATE' => $this->user->format_date(time()), |
| 78 | 78 | 'ITEMS_PER_PAGE' => 10, |
| 79 | 79 | 'TOPICS_PER_GROUP' => 4, |
| 80 | - 'U_ACTION' => $u_action . "&do=save&type=$type", |
|
| 80 | + 'U_ACTION' => $u_action."&do=save&type=$type", |
|
| 81 | 81 | |
| 82 | 82 | 'S_TYPE_OPS' => $this->get_field_options(), |
| 83 | 83 | 'S_FORUM_OPTIONS' => make_forum_select(false, $forum_id, true, false, false), |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $options = ''; |
| 116 | 116 | foreach ($fields as $field => $object) |
| 117 | 117 | { |
| 118 | - $options .= '<option value="' . $field . '">' . $this->language->lang($object->get_langname()) . '</option>'; |
|
| 118 | + $options .= '<option value="'.$field.'">'.$this->language->lang($object->get_langname()).'</option>'; |
|
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | return $options; |