@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | * @param \phpbb\user $user User object |
35 | 35 | * @param string $phpbb_root_path Path to the phpbb includes directory. |
36 | 36 | * @param string $php_ext php file extension |
37 | - */ |
|
37 | + */ |
|
38 | 38 | public function __construct(\phpbb\auth\auth $auth, \phpbb\config\db $config, \phpbb\user $user, $phpbb_root_path, $php_ext) |
39 | 39 | { |
40 | 40 | $this->auth = $auth; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | { |
117 | 117 | return append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=approve_details&f=' . $post_data['forum_id'] . '&p=' . $post_data['post_id'], true, $this->user->session_id); |
118 | 118 | } |
119 | - */ |
|
119 | + */ |
|
120 | 120 | |
121 | 121 | /** |
122 | 122 | * @param array $post_data |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | public function get_edit_url(array $post_data, array $topic_data, $cp_mode = '') |
54 | 54 | { |
55 | 55 | $cp_param = $this->get_cp_param($post_data, $topic_data, $cp_mode); |
56 | - return ($this->edit_allowed($post_data, $topic_data)) ? append_sid("{$this->phpbb_root_path}posting.$this->php_ext", "mode=edit&f={$topic_data['forum_id']}&p={$post_data['post_id']}" . $cp_param) : ''; |
|
56 | + return ($this->edit_allowed($post_data, $topic_data)) ? append_sid("{$this->phpbb_root_path}posting.$this->php_ext", "mode=edit&f={$topic_data['forum_id']}&p={$post_data['post_id']}".$cp_param) : ''; |
|
57 | 57 | } |
58 | 58 | |
59 | 59 | /** |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | public function get_delete_url(array $post_data, array $topic_data, $cp_mode = '') |
66 | 66 | { |
67 | 67 | $cp_param = $this->get_cp_param($post_data, $topic_data, $cp_mode); |
68 | - return ($this->delete_allowed($post_data, $topic_data)) ? append_sid("{$this->phpbb_root_path}posting.$this->php_ext", 'mode=' . (($this->softdelete_allowed($post_data)) ? 'soft_delete' : 'delete') . "&f={$post_data['forum_id']}&p={$post_data['post_id']}" . $cp_param) : ''; |
|
68 | + return ($this->delete_allowed($post_data, $topic_data)) ? append_sid("{$this->phpbb_root_path}posting.$this->php_ext", 'mode='.(($this->softdelete_allowed($post_data)) ? 'soft_delete' : 'delete')."&f={$post_data['forum_id']}&p={$post_data['post_id']}".$cp_param) : ''; |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function get_print_topic_url(array $topic_data) |
95 | 95 | { |
96 | - return ($this->auth->acl_get('f_print', $topic_data['forum_id'])) ? $topic_data['topic_url'] . '?view=print' : ''; |
|
96 | + return ($this->auth->acl_get('f_print', $topic_data['forum_id'])) ? $topic_data['topic_url'].'?view=print' : ''; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | */ |
103 | 103 | public function get_email_topic_url(array $topic_data) |
104 | 104 | { |
105 | - return ($this->auth->acl_get('f_email', $topic_data['forum_id']) && $this->config['email_enable']) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=email&t=' . $topic_data['topic_id']) : ''; |
|
105 | + return ($this->auth->acl_get('f_email', $topic_data['forum_id']) && $this->config['email_enable']) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=email&t='.$topic_data['topic_id']) : ''; |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | /** |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | */ |
113 | 113 | public function get_search_users_posts_url($forum_id, $username) |
114 | 114 | { |
115 | - return append_sid("{$this->phpbb_root_path}search.{$this->php_ext}", "author={$username}&" . urlencode('fid[]') . "=$forum_id&sc=0&sf=titleonly&sr=topics"); |
|
115 | + return append_sid("{$this->phpbb_root_path}search.{$this->php_ext}", "author={$username}&".urlencode('fid[]')."=$forum_id&sc=0&sf=titleonly&sr=topics"); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | /** |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | public function get_info_url(array $post_data) |
123 | 123 | { |
124 | 124 | $forum_id = $post_data['forum_id']; |
125 | - return ($this->auth->acl_get('m_info', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=main&mode=post_details&f=$forum_id&p=" . $post_data['post_id'], true, $this->user->session_id) : ''; |
|
125 | + return ($this->auth->acl_get('m_info', $forum_id)) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=main&mode=post_details&f=$forum_id&p=".$post_data['post_id'], true, $this->user->session_id) : ''; |
|
126 | 126 | } |
127 | 127 | |
128 | 128 | /** |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | public function get_approve_url(array $post_data, $viewtopic_url) |
134 | 134 | { |
135 | - return append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=queue&p={$post_data['post_id']}&f={$post_data['forum_id']}&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url . '&p=' . $post_data['post_id'] . '#p' . $post_data['post_id']))); |
|
135 | + return append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=queue&p={$post_data['post_id']}&f={$post_data['forum_id']}&redirect=".urlencode(str_replace('&', '&', $viewtopic_url.'&p='.$post_data['post_id'].'#p'.$post_data['post_id']))); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | /** |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | */ |
162 | 162 | public function get_mcp_report_url(array $post_data) |
163 | 163 | { |
164 | - return ($this->auth->acl_get('m_report', $post_data['forum_id'])) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=reports&mode=report_details&f=' . $post_data['forum_id'] . '&p=' . $post_data['post_id'], true, $this->user->session_id) : ''; |
|
164 | + return ($this->auth->acl_get('m_report', $post_data['forum_id'])) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=reports&mode=report_details&f='.$post_data['forum_id'].'&p='.$post_data['post_id'], true, $this->user->session_id) : ''; |
|
165 | 165 | } |
166 | 166 | |
167 | 167 | /** |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | public function get_mcp_restore_url(array $post_data, array $topic_data) |
173 | 173 | { |
174 | - return ($this->auth->acl_get('m_approve', $post_data['forum_id'])) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode=' . (($topic_data['topic_visibility'] != ITEM_DELETED) ? 'deleted_posts' : 'deleted_topics') . '&f=' . $post_data['forum_id'] . '&p=' . $post_data['post_id'], true, $this->user->session_id) : ''; |
|
174 | + return ($this->auth->acl_get('m_approve', $post_data['forum_id'])) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=queue&mode='.(($topic_data['topic_visibility'] != ITEM_DELETED) ? 'deleted_posts' : 'deleted_topics').'&f='.$post_data['forum_id'].'&p='.$post_data['post_id'], true, $this->user->session_id) : ''; |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | */ |
181 | 181 | public function get_notes_url(array $post_data) |
182 | 182 | { |
183 | - return ($this->auth->acl_getf_global('m_')) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=notes&mode=user_notes&u=' . $post_data['poster_id'], true, $this->user->session_id) : ''; |
|
183 | + return ($this->auth->acl_getf_global('m_')) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=notes&mode=user_notes&u='.$post_data['poster_id'], true, $this->user->session_id) : ''; |
|
184 | 184 | } |
185 | 185 | |
186 | 186 | /** |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | */ |
190 | 190 | public function get_warning_url(array $post_data) |
191 | 191 | { |
192 | - return ($this->auth->acl_get('m_warn') && !$this->user_is_poster($post_data['poster_id']) && $post_data['poster_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=warn&mode=warn_post&f=' . $post_data['forum_id'] . '&p=' . $post_data['post_id'], true, $this->user->session_id) : ''; |
|
192 | + return ($this->auth->acl_get('m_warn') && !$this->user_is_poster($post_data['poster_id']) && $post_data['poster_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=warn&mode=warn_post&f='.$post_data['forum_id'].'&p='.$post_data['post_id'], true, $this->user->session_id) : ''; |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | /** |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | $cp_param = ''; |
243 | 243 | if ($topic_data['topic_first_post_id'] == $post_data['post_id']) |
244 | 244 | { |
245 | - $cp_param = '&cp=' . ((!$cp_mode) ? (($this->user_is_poster($post_data['poster_id'])) ? 'ucp' : 'mcp') : $cp_mode); |
|
245 | + $cp_param = '&cp='.((!$cp_mode) ? (($this->user_is_poster($post_data['poster_id'])) ? 'ucp' : 'mcp') : $cp_mode); |
|
246 | 246 | } |
247 | 247 | return $cp_param; |
248 | 248 | } |
@@ -222,8 +222,7 @@ |
||
222 | 222 | if ($topic_id) |
223 | 223 | { |
224 | 224 | $u_mcp = append_sid("{$this->phpbb_root_path}mcp.{$this->php_ext}", "i=mcp_main&mode=topic_view&f=$forum_id&t=$topic_id", true, $this->user->session_id); |
225 | - } |
|
226 | - else |
|
225 | + } else |
|
227 | 226 | { |
228 | 227 | $u_mcp = append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", 'i=-blitze-content-mcp-content_module&mode=content', true, $this->user->session_id); |
229 | 228 | } |
@@ -79,7 +79,7 @@ |
||
79 | 79 | 'count' => $row['total'], |
80 | 80 | 'url' => $this->helper->route($route_name, $route_params + array( |
81 | 81 | 'filter_type' => 'archive', |
82 | - 'filter_value' => $row['year'] . '-' . $row['month'], |
|
82 | + 'filter_value' => $row['year'].'-'.$row['month'], |
|
83 | 83 | )), |
84 | 84 | ); |
85 | 85 | } |
@@ -106,8 +106,7 @@ |
||
106 | 106 | 'route_name' => 'blitze_content_index', |
107 | 107 | 'route_params' => array('type' => $this->content_types->get_forum_type($settings['forum_id'])), |
108 | 108 | ); |
109 | - } |
|
110 | - else |
|
109 | + } else |
|
111 | 110 | { |
112 | 111 | return array( |
113 | 112 | 'forum_ids' => array_keys($this->content_types->get_forum_types()), |