@@ -29,7 +29,7 @@ |
||
| 29 | 29 | * @param \phpbb\request\request_interface $request Request object |
| 30 | 30 | * @param \phpbb\template\template $template Template object |
| 31 | 31 | * @param \blitze\content\services\form\fields_factory $fields_factory Fields factory object |
| 32 | - * @param string $admin_path Admin path |
|
| 32 | + * @param \blitze\content\services\form\fields_factory $admin_path Admin path |
|
| 33 | 33 | */ |
| 34 | 34 | public function __construct(\phpbb\request\request_interface $request, \phpbb\template\template $template, \blitze\content\services\form\fields_factory $fields_factory, $admin_path) |
| 35 | 35 | { |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | /** |
| 96 | - * @param string $values |
|
| 96 | + * @param string $value |
|
| 97 | 97 | * @return array |
| 98 | 98 | */ |
| 99 | 99 | protected function get_range($value) |
@@ -122,7 +122,6 @@ discard block |
||
| 122 | 122 | } |
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | - * @param array $data |
|
| 126 | 125 | * @return array |
| 127 | 126 | */ |
| 128 | 127 | protected function set_prepost(&$item, $key, array $props) |
@@ -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 | |
@@ -127,6 +127,6 @@ discard block |
||
| 127 | 127 | */ |
| 128 | 128 | protected function set_prepost(&$item, $key, array $props) |
| 129 | 129 | { |
| 130 | - $item = $props['prefix'] . $item . $props['postfix']; |
|
| 130 | + $item = $props['prefix'].$item.$props['postfix']; |
|
| 131 | 131 | } |
| 132 | 132 | } |
@@ -96,8 +96,6 @@ discard block |
||
| 96 | 96 | /** |
| 97 | 97 | * Display content field |
| 98 | 98 | * |
| 99 | - * @param string $field_value |
|
| 100 | - * @param array $field_data |
|
| 101 | 99 | * @param string $view_mode |
| 102 | 100 | * @param array $topic_data |
| 103 | 101 | * @return mixed |
@@ -172,7 +170,7 @@ discard block |
||
| 172 | 170 | * @param string $value |
| 173 | 171 | * @param string $topic_url |
| 174 | 172 | * @param string $view_mode |
| 175 | - * @return void |
|
| 173 | + * @return string |
|
| 176 | 174 | */ |
| 177 | 175 | protected function generate_field_pages($field_name, $value, $topic_url, $view_mode) |
| 178 | 176 | { |
@@ -202,8 +200,8 @@ discard block |
||
| 202 | 200 | /** |
| 203 | 201 | * Generate pagination for topic subpages |
| 204 | 202 | * |
| 205 | - * @param array $pages |
|
| 206 | - * @param array $page_titles |
|
| 203 | + * @param string[] $pages |
|
| 204 | + * @param string[] $page_titles |
|
| 207 | 205 | * @param int $start |
| 208 | 206 | * @param string $topic_url |
| 209 | 207 | * @param string $view_mode |
@@ -225,6 +223,7 @@ discard block |
||
| 225 | 223 | * |
| 226 | 224 | * @param int $start |
| 227 | 225 | * @param $page_titles |
| 226 | + * @param string $topic_url |
|
| 228 | 227 | * @return void |
| 229 | 228 | */ |
| 230 | 229 | protected function generate_toc($start, $page_titles, $topic_url) |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | $asset_path = $this->util->get_web_path(); |
| 126 | 126 | $this->util->add_assets(array( |
| 127 | 127 | 'js' => array( |
| 128 | - $asset_path . 'assets/javascript/editor.js', |
|
| 128 | + $asset_path.'assets/javascript/editor.js', |
|
| 129 | 129 | '@blitze_content/assets/form/textarea.min.js' |
| 130 | 130 | ) |
| 131 | 131 | )); |
@@ -145,12 +145,12 @@ discard block |
||
| 145 | 145 | // Assigning custom bbcodes |
| 146 | 146 | if (!function_exists('display_custom_bbcodes')) |
| 147 | 147 | { |
| 148 | - include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
|
| 148 | + include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | display_custom_bbcodes(); |
| 152 | 152 | |
| 153 | - $bbcode_status = ($this->config['allow_bbcode'] && $this->auth->acl_get('f_bbcode', $forum_id)) ? true : false; |
|
| 153 | + $bbcode_status = ($this->config['allow_bbcode'] && $this->auth->acl_get('f_bbcode', $forum_id)) ? true : false; |
|
| 154 | 154 | |
| 155 | 155 | $dataref = $this->template_context->get_data_ref(); |
| 156 | 156 | $this->ptemplate->assign_block_vars_array('custom_tags', (isset($dataref['custom_tags'])) ? $dataref['custom_tags'] : array()); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | $this->template->assign_block_vars('toc', array( |
| 236 | 236 | 'TITLE' => $title, |
| 237 | 237 | 'S_PAGE' => ($page === $start), |
| 238 | - 'U_VIEW' => append_sid($topic_url, 'page=' . $page), |
|
| 238 | + 'U_VIEW' => append_sid($topic_url, 'page='.$page), |
|
| 239 | 239 | )); |
| 240 | 240 | } |
| 241 | 241 | } |
@@ -111,7 +111,7 @@ |
||
| 111 | 111 | */ |
| 112 | 112 | protected function set_prop($prop, array &$data) |
| 113 | 113 | { |
| 114 | - $field_prop = $this->request->variable('field_' . $prop, array('' => array(0 => '')), true); |
|
| 114 | + $field_prop = $this->request->variable('field_'.$prop, array('' => array(0 => '')), true); |
|
| 115 | 115 | |
| 116 | 116 | if (null !== ($array = array_pop($field_prop))) |
| 117 | 117 | { |
@@ -232,8 +232,7 @@ discard block |
||
| 232 | 232 | { |
| 233 | 233 | $data = generate_text_for_edit($this->content_desc, $this->content_desc_uid, $this->content_desc_options); |
| 234 | 234 | return $data['text']; |
| 235 | - } |
|
| 236 | - else |
|
| 235 | + } else |
|
| 237 | 236 | { |
| 238 | 237 | $parse_flags = ($this->content_desc_bitfield ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; |
| 239 | 238 | return generate_text_for_display($this->content_desc, $this->content_desc_uid, $this->content_desc_bitfield, $parse_flags); |
@@ -251,8 +250,7 @@ discard block |
||
| 251 | 250 | if (!is_array($settings)) |
| 252 | 251 | { |
| 253 | 252 | $this->content_view_settings = $settings; |
| 254 | - } |
|
| 255 | - else if (sizeof($settings)) |
|
| 253 | + } else if (sizeof($settings)) |
|
| 256 | 254 | { |
| 257 | 255 | $this->content_view_settings = json_encode($settings); |
| 258 | 256 | } |
@@ -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 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $this->template = $template; |
| 53 | 53 | $this->content_types = $content_types; |
| 54 | 54 | $this->phpbb_root_path = $phpbb_root_path; |
| 55 | - $this->phpbb_admin_path = $this->phpbb_root_path . $relative_admin_path; |
|
| 55 | + $this->phpbb_admin_path = $this->phpbb_root_path.$relative_admin_path; |
|
| 56 | 56 | $this->php_ext = $php_ext; |
| 57 | 57 | } |
| 58 | 58 | |
@@ -76,19 +76,19 @@ discard block |
||
| 76 | 76 | |
| 77 | 77 | 'S_ENABLED' => $entity->get_content_enabled(), |
| 78 | 78 | |
| 79 | - 'U_DELETE' => $u_action . '&do=pre_delete&type=' . $type, |
|
| 80 | - 'U_EDIT' => $u_action . '&do=edit&type=' . $type, |
|
| 81 | - 'U_STATUS' => $u_action . '&do=toggle_status&type=' . $type, |
|
| 79 | + 'U_DELETE' => $u_action.'&do=pre_delete&type='.$type, |
|
| 80 | + 'U_EDIT' => $u_action.'&do=edit&type='.$type, |
|
| 81 | + 'U_STATUS' => $u_action.'&do=toggle_status&type='.$type, |
|
| 82 | 82 | 'U_VIEW' => $this->controller_helper->route('blitze_content_index', array('type' => $type)), |
| 83 | - 'U_POST' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, "i=-blitze-content-ucp-content_module&mode=content&action=post&type={$type}"), |
|
| 84 | - 'U_GROUP_PERMS' => append_sid("{$this->phpbb_admin_path}index." . $this->php_ext, "i=acp_permissions&mode=setting_group_global"), |
|
| 85 | - 'U_FORUM_PERMS' => append_sid("{$this->phpbb_admin_path}index." . $this->php_ext, "i=acp_permissions&mode=setting_forum_local&forum_id[]=$forum_id"), |
|
| 83 | + 'U_POST' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, "i=-blitze-content-ucp-content_module&mode=content&action=post&type={$type}"), |
|
| 84 | + 'U_GROUP_PERMS' => append_sid("{$this->phpbb_admin_path}index.".$this->php_ext, "i=acp_permissions&mode=setting_group_global"), |
|
| 85 | + 'U_FORUM_PERMS' => append_sid("{$this->phpbb_admin_path}index.".$this->php_ext, "i=acp_permissions&mode=setting_forum_local&forum_id[]=$forum_id"), |
|
| 86 | 86 | ); |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | $this->template->assign_vars(array( |
| 90 | 90 | 'TYPES' => $types_list, |
| 91 | - 'U_ADD_TYPE' => $u_action . "&do=add", |
|
| 91 | + 'U_ADD_TYPE' => $u_action."&do=add", |
|
| 92 | 92 | )); |
| 93 | 93 | } |
| 94 | 94 | } |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | * @param \blitze\sitemaker\services\auto_lang $auto_lang Auto add lang file |
| 52 | 52 | * @param \blitze\content\services\form\fields_factory $fields_factory Fields factory object |
| 53 | 53 | * @param \blitze\content\services\views\views_factory $views_factory Views factory object |
| 54 | - */ |
|
| 54 | + */ |
|
| 55 | 55 | 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\views\views_factory $views_factory) |
| 56 | 56 | { |
| 57 | 57 | $this->auth = $auth; |
@@ -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; |
@@ -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\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\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, $controller_helper, $language, $template, $user, $auto_lang, $fields_factory, $views_factory); |