Completed
Push — develop ( 5e581d...39a76d )
by Daniel
05:39
created
services/actions/type/delete.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
 	/** @var \blitze\sitemaker\model\mapper_factory */
36 36
 	protected $sitemaker_mapper_factory;
37 37
 
38
-    /** @var bool */
39
-    private $auto_refresh;
38
+	/** @var bool */
39
+	private $auto_refresh;
40 40
 
41
-    /** @var bool */
42
-    private $trigger_error;
41
+	/** @var bool */
42
+	private $trigger_error;
43 43
 
44
-    /**
44
+	/**
45 45
 	 * Constructor
46 46
 	 *
47 47
 	 * @param \phpbb\cache\driver\driver_interface		$cache						Cache object
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	 * @param \blitze\sitemaker\model\mapper_factory	$sitemaker_mapper_factory	Sitemaker Mapper factory object
54 54
 	 * @param bool										$auto_refresh				Used during testing
55 55
 	 * @param bool										$trigger_error				Used during testing
56
-	*/
56
+	 */
57 57
 	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)
58 58
 	{
59 59
 		$this->cache = $cache;
Please login to merge, or discard this patch.
services/actions/type/edit.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 	 * Constructor
22 22
 	 *
23 23
 	 * @param \phpbb\auth\auth									$auth					Auth object
24
-     * @param \phpbb\controller\helper                          $controller_helper      Controller Helper object
24
+	 * @param \phpbb\controller\helper                          $controller_helper      Controller Helper object
25 25
 	 * @param \phpbb\language\language							$language				Language Object
26 26
 	 * @param \phpbb\event\dispatcher_interface					$phpbb_dispatcher		Event dispatcher object
27 27
 	 * @param \phpbb\template\template							$template				Template object
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	 * @param \blitze\content\services\views\views_factory		$views_factory			Views factory object
32 32
 	 * @param \blitze\content\services\types					$content_types			Content types object
33 33
 	 * @param \blitze\content\model\mapper_factory				$mapper_factory			Mapper factory object
34
-	*/
34
+	 */
35 35
 	public function __construct(\phpbb\auth\auth $auth, \phpbb\controller\helper $controller_helper, \phpbb\event\dispatcher_interface $phpbb_dispatcher, \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, \blitze\content\services\types $content_types, \blitze\content\model\mapper_factory $mapper_factory)
36 36
 	{
37 37
 		parent::__construct($auth, $controller_helper, $phpbb_dispatcher, $language, $template, $user, $auto_lang, $fields_factory, $views_factory);
Please login to merge, or discard this patch.
services/permissions.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -11,28 +11,28 @@
 block discarded – undo
11 11
 
12 12
 class permissions
13 13
 {
14
-    /** @var \phpbb\auth\auth */
15
-    protected $auth;
16
-
17
-    /** @var \phpbb\config\db */
18
-    protected $config;
19
-
20
-    /** @var \phpbb\user */
21
-    protected $user;
22
-
23
-    /**
24
-     * Constructor
25
-     *
26
-     * @param \phpbb\auth\auth		$auth		Auth object
27
-     * @param \phpbb\config\db		$config		Config object
28
-     * @param \phpbb\user			$user		User object
29
-     */
30
-    public function __construct(\phpbb\auth\auth $auth, \phpbb\config\db $config, \phpbb\user $user)
31
-    {
32
-        $this->auth = $auth;
33
-        $this->config = $config;
34
-        $this->user = $user;
35
-    }
14
+	/** @var \phpbb\auth\auth */
15
+	protected $auth;
16
+
17
+	/** @var \phpbb\config\db */
18
+	protected $config;
19
+
20
+	/** @var \phpbb\user */
21
+	protected $user;
22
+
23
+	/**
24
+	 * Constructor
25
+	 *
26
+	 * @param \phpbb\auth\auth		$auth		Auth object
27
+	 * @param \phpbb\config\db		$config		Config object
28
+	 * @param \phpbb\user			$user		User object
29
+	 */
30
+	public function __construct(\phpbb\auth\auth $auth, \phpbb\config\db $config, \phpbb\user $user)
31
+	{
32
+		$this->auth = $auth;
33
+		$this->config = $config;
34
+		$this->user = $user;
35
+	}
36 36
 
37 37
 	/**
38 38
 	 * @param array $post_data
Please login to merge, or discard this patch.
services/helper.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 	 * @param \phpbb\user			$user				User object
26 26
 	 * @param string				$phpbb_root_path	Path to the phpbb includes directory.
27 27
 	 * @param string				$php_ext			php file extension
28
-	*/
28
+	 */
29 29
 	public function __construct(\phpbb\auth\auth $auth, \phpbb\config\db $config, \phpbb\user $user, $phpbb_root_path, $php_ext)
30 30
 	{
31 31
 		parent::__construct($auth, $config, $user);
@@ -191,11 +191,11 @@  discard block
 block discarded – undo
191 191
 		return append_sid("{$this->phpbb_root_path}mcp.$this->php_ext", "i=-blitze-content-mcp-content_module&mode=content&do=view&type=$content_type&t=$topic_id");
192 192
 	}
193 193
 
194
-    /**
195
-     * @param int $forum_id
196
-     * @param int $topic_id
197
-     * @return string
198
-     */
194
+	/**
195
+	 * @param int $forum_id
196
+	 * @param int $topic_id
197
+	 * @return string
198
+	 */
199 199
 	public function get_mcp_url($forum_id, $topic_id)
200 200
 	{
201 201
 		$u_mcp = '';
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -222,8 +222,7 @@
 block discarded – undo
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
 			}
Please login to merge, or discard this patch.
model/mapper/types.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,8 @@
 block discarded – undo
60 60
 	 */
61 61
 	public function delete($entity)
62 62
 	{
63
-        /** @var \blitze\content\model\entity\type $entity */
64
-        parent::delete($entity);
63
+		/** @var \blitze\content\model\entity\type $entity */
64
+		parent::delete($entity);
65 65
 
66 66
 		if ($entity instanceof $this->entity_class)
67 67
 		{
Please login to merge, or discard this patch.