Completed
Push — #12 ( fb1588...544bf8 )
by Erwan
02:13
created
event/acp_listener.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,11 +36,11 @@  discard block
 block discarded – undo
36 36
 
37 37
 	public function __construct(\phpbb\request\request $request, \phpbb\cache\driver\driver_interface $cache, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, \ernadoo\qte\qte $qte, $table_prefix)
38 38
 	{
39
-		$this->request	= $request;
39
+		$this->request = $request;
40 40
 		$this->cache	= $cache;
41
-		$this->db		= $db;
41
+		$this->db = $db;
42 42
 		$this->user		= $user;
43
-		$this->qte		= $qte;
43
+		$this->qte = $qte;
44 44
 
45 45
 		$this->table_prefix = $table_prefix;
46 46
 	}
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	{
66 66
 		$categories				= $event['categories'];
67 67
 		$categories				= array_merge($categories, array('qte' => 'ACL_CAT_QTE'));
68
-		$event['categories']	= $categories;
68
+		$event['categories'] = $categories;
69 69
 
70 70
 		$permissions = $event['permissions'];
71 71
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 		foreach ($this->qte->getAttr() as $attr)
79 79
 		{
80 80
 			$permissions += array(
81
-				'f_qte_attr_'.$attr['attr_id'] => array('lang' => $this->user->lang('QTE_CAN_USE_ATTR', $attr['attr_name']), 'cat' => 'qte'),
81
+				'f_qte_attr_' . $attr['attr_id'] => array('lang' => $this->user->lang('QTE_CAN_USE_ATTR', $attr['attr_name']), 'cat' => 'qte'),
82 82
 			);
83 83
 		}
84 84
 		$event['permissions'] = $permissions;
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 		$dest_forum_ids = array();
226 226
 		while ($row = $this->db->sql_fetchrow($result))
227 227
 		{
228
-			$dest_forum_ids[]	= (int) $row['forum_id'];
228
+			$dest_forum_ids[] = (int) $row['forum_id'];
229 229
 		}
230 230
 		$this->db->sql_freeresult($result);
231 231
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 		$acl_options_ids = array();
244 244
 		while ($row = $this->db->sql_fetchrow($result))
245 245
 		{
246
-			$acl_options_ids[]	= (int) $row['auth_option_id'];
246
+			$acl_options_ids[] = (int) $row['auth_option_id'];
247 247
 		}
248 248
 
249 249
 		// From the mysql documentation:
Please login to merge, or discard this patch.
acp/main_module.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,18 +27,18 @@  discard block
 block discarded – undo
27 27
 	{
28 28
 		global $phpbb_container, $db, $user, $phpbb_log, $template, $cache, $request, $table_prefix;
29 29
 
30
-		$this->qte						= $phpbb_container->get('ernadoo.qte');
31
-		$this->migrator_tool_permission	= $phpbb_container->get('migrator.tool.permission');
30
+		$this->qte = $phpbb_container->get('ernadoo.qte');
31
+		$this->migrator_tool_permission = $phpbb_container->get('migrator.tool.permission');
32 32
 
33 33
 		$action			= $request->variable('action', '');
34 34
 		$submit			= $request->is_set_post('submit');
35 35
 		$attr_id		= $request->variable('id', 0);
36
-		$attr_auth_id	= $request->variable('attr_auth_id', 0);
36
+		$attr_auth_id = $request->variable('attr_auth_id', 0);
37 37
 
38 38
 		$error = array();
39 39
 		$clear_dest_perms = false;
40 40
 
41
-		$this->tpl_name		= 'acp_attributes';
41
+		$this->tpl_name = 'acp_attributes';
42 42
 		$this->page_title	= 'QTE_MANAGE_TITLE';
43 43
 
44 44
 		$user->add_lang_ext('ernadoo/qte', array('attributes', 'attributes_acp'));
@@ -156,14 +156,14 @@  discard block
 block discarded – undo
156 156
 							$db->sql_query($sql);
157 157
 							$attr_id = $db->sql_nextid();
158 158
 
159
-							$this->migrator_tool_permission->add('f_qte_attr_'.$attr_id, false);
159
+							$this->migrator_tool_permission->add('f_qte_attr_' . $attr_id, false);
160 160
 
161 161
 							$message = 'ADDED';
162 162
 						}
163 163
 
164 164
 						if ($attr_auth_id)
165 165
 						{
166
-							$this->_copy_permission('f_qte_attr_'.$attr_id, 'f_qte_attr_'.$attr_auth_id, $clear_dest_perms);
166
+							$this->_copy_permission('f_qte_attr_' . $attr_id, 'f_qte_attr_' . $attr_auth_id, $clear_dest_perms);
167 167
 						}
168 168
 
169 169
 						$cache->destroy('_attr');
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
 					$phpbb_log->add('admin', $user->data['user_id'], $user->ip, 'LOG_ATTRIBUTE_REMOVED', time(), array($attr_name));
273 273
 
274
-					$this->migrator_tool_permission->remove('f_qte_attr_'.$attr_id, false);
274
+					$this->migrator_tool_permission->remove('f_qte_attr_' . $attr_id, false);
275 275
 
276 276
 					$sql = 'DELETE FROM ' . $table_prefix . 'topics_attr
277 277
 						WHERE attr_id = ' . (int) $attr_id;
Please login to merge, or discard this patch.