@@ -94,9 +94,9 @@ discard block |
||
| 94 | 94 | { |
| 95 | 95 | $toc_pattern = '(<h4>(.*?)</h4>)?'; |
| 96 | 96 | $pages_pattern = '<p><!-- pagebreak --></p>'; |
| 97 | - $split_pattern = $pages_pattern . (($view_mode !== 'detail') ? $toc_pattern : ''); |
|
| 97 | + $split_pattern = $pages_pattern.(($view_mode !== 'detail') ? $toc_pattern : ''); |
|
| 98 | 98 | |
| 99 | - $pages = array_filter(preg_split('#' . $split_pattern . '#s', $data['field_value'])); |
|
| 99 | + $pages = array_filter(preg_split('#'.$split_pattern.'#s', $data['field_value'])); |
|
| 100 | 100 | |
| 101 | 101 | if ($view_mode !== 'detail') |
| 102 | 102 | { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // get page titles to generate TOC |
| 107 | - preg_match_all('#' . $pages_pattern . $toc_pattern . '#s', $data['field_value'], $matches); |
|
| 107 | + preg_match_all('#'.$pages_pattern.$toc_pattern.'#s', $data['field_value'], $matches); |
|
| 108 | 108 | |
| 109 | 109 | return $this->get_detail_value($pages, $matches[2], $data); |
| 110 | 110 | } |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | $asset_path = $this->util->get_web_path(); |
| 120 | 120 | $this->util->add_assets(array( |
| 121 | 121 | 'js' => array( |
| 122 | - $asset_path . 'assets/javascript/editor.js', |
|
| 122 | + $asset_path.'assets/javascript/editor.js', |
|
| 123 | 123 | '@blitze_content/assets/fields/textarea.min.js' |
| 124 | 124 | ) |
| 125 | 125 | )); |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $this->template->assign_block_vars('toc', array( |
| 228 | 228 | 'TITLE' => ($title) ? $title : $this->language->lang('CONTENT_TOC_UNTITLED'), |
| 229 | 229 | 'S_PAGE' => ($page === $start), |
| 230 | - 'U_VIEW' => append_sid($topic_url, ($page) ? 'page=' . $page : false), |
|
| 230 | + 'U_VIEW' => append_sid($topic_url, ($page) ? 'page='.$page : false), |
|
| 231 | 231 | )); |
| 232 | 232 | } |
| 233 | 233 | } |
@@ -279,7 +279,7 @@ discard block |
||
| 279 | 279 | // Assigning custom bbcodes |
| 280 | 280 | if (!function_exists('display_custom_bbcodes')) |
| 281 | 281 | { |
| 282 | - include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
|
| 282 | + include($this->phpbb_root_path.'includes/functions_display.'.$this->php_ext); |
|
| 283 | 283 | } |
| 284 | 284 | |
| 285 | 285 | display_custom_bbcodes(); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $value = $this->request->variable($data['field_name'], $data['field_value']); |
| 53 | 53 | $value = $this->get_image_src($value); |
| 54 | 54 | |
| 55 | - return ($value) ? '[img]' . $value . '[/img]' : ''; |
|
| 55 | + return ($value) ? '[img]'.$value.'[/img]' : ''; |
|
| 56 | 56 | } |
| 57 | 57 | |
| 58 | 58 | /** |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | |
| 78 | 78 | $this->set_filemanager($data); |
| 79 | 79 | $this->ptemplate->assign_vars($data); |
| 80 | - $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field . '_field'); |
|
| 80 | + $field = $this->ptemplate->render_view('blitze/content', "fields/image.html", $field.'_field'); |
|
| 81 | 81 | |
| 82 | 82 | $data['field_value'] = $bbcode_value; |
| 83 | 83 | |
@@ -136,14 +136,14 @@ discard block |
||
| 136 | 136 | */ |
| 137 | 137 | private function get_image_html($image, $mode, array $field_props) |
| 138 | 138 | { |
| 139 | - $image = $image ?: '<img src="' . $field_props['default'] . '" class="postimage" alt="Image" />'; |
|
| 139 | + $image = $image ?: '<img src="'.$field_props['default'].'" class="postimage" alt="Image" />'; |
|
| 140 | 140 | |
| 141 | - $html = '<figure class="img-ui">' . $image . '</figure>'; |
|
| 141 | + $html = '<figure class="img-ui">'.$image.'</figure>'; |
|
| 142 | 142 | if ($mode !== 'block') |
| 143 | 143 | { |
| 144 | - $view_props = array_fill_keys(array($mode . '_size', $mode . '_align'), ''); |
|
| 144 | + $view_props = array_fill_keys(array($mode.'_size', $mode.'_align'), ''); |
|
| 145 | 145 | $image_props = array_filter(array_intersect_key($field_props, $view_props)); |
| 146 | - $html = '<div class="' . join(' ', $image_props) . '">' . $html . '</div>'; |
|
| 146 | + $html = '<div class="'.join(' ', $image_props).'">'.$html.'</div>'; |
|
| 147 | 147 | } |
| 148 | 148 | return $html; |
| 149 | 149 | } |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | { |
| 159 | 159 | $data['filemanager_path'] = append_sid("{$this->phpbb_root_path}ResponsiveFilemanager/filemanager/dialog.$this->php_ext", array( |
| 160 | 160 | 'type' => 1, |
| 161 | - 'field_id' => 'smc-' . $data['field_name'], |
|
| 161 | + 'field_id' => 'smc-'.$data['field_name'], |
|
| 162 | 162 | 'akey' => $this->filemanager->get_access_key(), |
| 163 | 163 | )); |
| 164 | 164 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher Event dispatcher object |
| 35 | 35 | * @param \blitze\content\services\types $content_types Content types object |
| 36 | 36 | * @param \blitze\content\model\mapper_factory $mapper_factory Mapper factory object |
| 37 | - */ |
|
| 37 | + */ |
|
| 38 | 38 | 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, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \blitze\content\services\types $content_types, \blitze\content\model\mapper_factory $mapper_factory) |
| 39 | 39 | { |
| 40 | 40 | parent::__construct($auth, $controller_helper, $language, $template, $user, $auto_lang, $fields_factory, $views_factory); |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | * @param \phpbb\template\template $template Template object |
| 42 | 42 | * @param \phpbb\user $user User object |
| 43 | 43 | * @param string $php_ext php file extension |
| 44 | - */ |
|
| 44 | + */ |
|
| 45 | 45 | public function __construct(\phpbb\config\config $config, \phpbb\controller\helper $controller_helper, \phpbb\symfony_request $symfony_request, \phpbb\template\template $template, \phpbb\user $user, $php_ext) |
| 46 | 46 | { |
| 47 | 47 | $this->config = $config; |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | $this->template->assign_vars(array( |
| 64 | 64 | 'BOARD_URL' => $this->board_url, |
| 65 | 65 | 'SELF_LINK' => $this->controller_helper->route($this->symfony_request->attributes->get('_route'), $this->symfony_request->attributes->get('_route_params'), true, '', UrlGeneratorInterface::ABSOLUTE_URL), |
| 66 | - 'FEED_LINK' => $this->board_url . $this->user->page['script_path'] . 'index.' . $this->php_ext, |
|
| 66 | + 'FEED_LINK' => $this->board_url.$this->user->page['script_path'].'index.'.$this->php_ext, |
|
| 67 | 67 | 'FEED_TITLE' => $this->config['sitename'], |
| 68 | 68 | 'FEED_SUBTITLE' => $this->config['site_desc'], |
| 69 | 69 | 'FEED_UPDATED' => $max_update_time, |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | $response = new Response($this->prepare_content($content)); |
| 89 | 89 | $response->headers->set('Content-Type', 'application/atom+xml'); |
| 90 | 90 | $response->setCharset('UTF-8'); |
| 91 | - $response->setLastModified(new \DateTime('@' . $max_update_time)); |
|
| 91 | + $response->setLastModified(new \DateTime('@'.$max_update_time)); |
|
| 92 | 92 | |
| 93 | 93 | if (!empty($this->user->data['is_bot'])) |
| 94 | 94 | { |
@@ -107,8 +107,8 @@ discard block |
||
| 107 | 107 | { |
| 108 | 108 | // convert relative urls to absolute urls |
| 109 | 109 | $script_path = trim($this->user->page['script_path'], '/'); |
| 110 | - $full_path = $this->board_url . '/' . $script_path; |
|
| 111 | - $content = preg_replace('/(href|src)=("|\')((?:\.*\/)+(?:' . $script_path . '\/)?)(.*?)("|\')/i', '$1=$2' . $full_path . '/$4$5', $content); |
|
| 110 | + $full_path = $this->board_url.'/'.$script_path; |
|
| 111 | + $content = preg_replace('/(href|src)=("|\')((?:\.*\/)+(?:'.$script_path.'\/)?)(.*?)("|\')/i', '$1=$2'.$full_path.'/$4$5', $content); |
|
| 112 | 112 | |
| 113 | 113 | // remove hidden field labels |
| 114 | 114 | $content = preg_replace('#<div class="field-label label-hidden">(.*?)</div>#', '', $content); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | $content = preg_replace('/((?:\?|&)sid=[a-z0-9]+)/', '', $content); |
| 118 | 118 | |
| 119 | 119 | // Remove Comments from inline attachments [ia] |
| 120 | - $content = preg_replace('#<dd>(.*?)</dd>#','',$content); |
|
| 120 | + $content = preg_replace('#<dd>(.*?)</dd>#', '', $content); |
|
| 121 | 121 | |
| 122 | 122 | // Replace some entities with their unicode counterpart |
| 123 | 123 | $entities = array( |
@@ -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 | } |