@@ -69,16 +69,16 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function __construct(\phpbb\request\request $request, \phpbb\cache\driver\driver_interface $cache, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, \phpbb\user $user, \phpbb\log\log $log, $root_path, $php_ext, $table_prefix) |
71 | 71 | { |
72 | - $this->request = $request; |
|
73 | - $this->cache = $cache; |
|
74 | - $this->config = $config; |
|
75 | - $this->db = $db; |
|
76 | - $this->template = $template; |
|
77 | - $this->user = $user; |
|
78 | - $this->log = $log; |
|
79 | - |
|
80 | - $this->root_path = $root_path; |
|
81 | - $this->php_ext = $php_ext; |
|
72 | + $this->request = $request; |
|
73 | + $this->cache = $cache; |
|
74 | + $this->config = $config; |
|
75 | + $this->db = $db; |
|
76 | + $this->template = $template; |
|
77 | + $this->user = $user; |
|
78 | + $this->log = $log; |
|
79 | + |
|
80 | + $this->root_path = $root_path; |
|
81 | + $this->php_ext = $php_ext; |
|
82 | 82 | $this->table_prefix = $table_prefix; |
83 | 83 | |
84 | 84 | $this->_get_attributes(); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $result = $this->db->sql_query($sql); |
145 | 145 | |
146 | 146 | $this->_name = array(); |
147 | - while ( $row = $this->db->sql_fetchrow($result) ) |
|
147 | + while ($row = $this->db->sql_fetchrow($result)) |
|
148 | 148 | { |
149 | 149 | $this->_name[$row['user_id']] = array( |
150 | 150 | 'user_id' => (int) $row['user_id'], |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | $a_class_name = preg_replace('#[^a-z0-9 _-]#', '', strtolower($a_name)); |
718 | 718 | } |
719 | 719 | |
720 | - return ' class="qte-attr ' . (isset($a_class_name) ? $a_class_name : '') . '"' . (!empty($a_colour) ? ' style="color:#' . $a_colour . '; font-weight:bold;"' : ''); |
|
720 | + return ' class="qte-attr ' . (isset($a_class_name) ? $a_class_name : '') . '"' . (!empty($a_colour) ? ' style="color:#' . $a_colour . '; font-weight:bold;"' : ''); |
|
721 | 721 | } |
722 | 722 | |
723 | 723 | /** |
@@ -26,8 +26,8 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db) |
28 | 28 | { |
29 | - $this->config = $config; |
|
30 | - $this->db = $db; |
|
29 | + $this->config = $config; |
|
30 | + $this->db = $db; |
|
31 | 31 | } |
32 | 32 | |
33 | 33 | /** |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | $id_ary = array(); |
82 | 82 | |
83 | 83 | // Create some display specific sql strings |
84 | - $sql_attribute = 't.topic_attr_id = ' . (int) $attribute_id; |
|
84 | + $sql_attribute = 't.topic_attr_id = ' . (int) $attribute_id; |
|
85 | 85 | $sql_fora = (sizeof($ex_fid_ary)) ? ' AND ' . $this->db->sql_in_set('p.forum_id', $ex_fid_ary, true) : ''; |
86 | - $sql_topic_id = ($topic_id) ? ' AND p.topic_id = ' . (int) $topic_id : ''; |
|
86 | + $sql_topic_id = ($topic_id) ? ' AND p.topic_id = ' . (int) $topic_id : ''; |
|
87 | 87 | $sql_time = ($sort_days) ? ' AND p.post_time >= ' . (time() - ($sort_days * 86400)) : ''; |
88 | - $sql_firstpost = ' AND p.post_id = t.topic_first_post_id'; |
|
88 | + $sql_firstpost = ' AND p.post_id = t.topic_first_post_id'; |
|
89 | 89 | |
90 | 90 | // Build sql strings for sorting |
91 | 91 | $sql_sort = $sort_by_sql[$sort_key] . (($sort_dir == 'a') ? ' ASC' : ' DESC'); |
@@ -93,13 +93,13 @@ discard block |
||
93 | 93 | switch ($sql_sort[0]) |
94 | 94 | { |
95 | 95 | case 'u': |
96 | - $sql_sort_table = USERS_TABLE . ' u, '; |
|
97 | - $sql_sort_join = ($type == 'posts') ? ' AND u.user_id = p.poster_id ' : ' AND u.user_id = t.topic_poster '; |
|
96 | + $sql_sort_table = USERS_TABLE . ' u, '; |
|
97 | + $sql_sort_join = ($type == 'posts') ? ' AND u.user_id = p.poster_id ' : ' AND u.user_id = t.topic_poster '; |
|
98 | 98 | break; |
99 | 99 | |
100 | 100 | case 'f': |
101 | - $sql_sort_table = FORUMS_TABLE . ' f, '; |
|
102 | - $sql_sort_join = ' AND f.forum_id = p.forum_id '; |
|
101 | + $sql_sort_table = FORUMS_TABLE . ' f, '; |
|
102 | + $sql_sort_join = ' AND f.forum_id = p.forum_id '; |
|
103 | 103 | break; |
104 | 104 | } |
105 | 105 |
@@ -36,11 +36,11 @@ discard block |
||
36 | 36 | |
37 | 37 | public function __construct(\phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\qte\qte $qte, \ernadoo\qte\search\fulltext_attribute $qte_search) |
38 | 38 | { |
39 | - $this->request = $request; |
|
40 | - $this->template = $template; |
|
41 | - $this->user = $user; |
|
42 | - $this->qte = $qte; |
|
43 | - $this->qte_search = $qte_search; |
|
39 | + $this->request = $request; |
|
40 | + $this->template = $template; |
|
41 | + $this->user = $user; |
|
42 | + $this->qte = $qte; |
|
43 | + $this->qte_search = $qte_search; |
|
44 | 44 | } |
45 | 45 | |
46 | 46 | static public function getSubscribedEvents() |
@@ -127,8 +127,8 @@ discard block |
||
127 | 127 | { |
128 | 128 | if ($this->searc_attr) |
129 | 129 | { |
130 | - $keywords = utf8_normalize_nfc($this->request->variable('keywords', '', true)); |
|
131 | - $author = $this->request->variable('author', '', true); |
|
130 | + $keywords = utf8_normalize_nfc($this->request->variable('keywords', '', true)); |
|
131 | + $author = $this->request->variable('author', '', true); |
|
132 | 132 | |
133 | 133 | if (!$keywords && !$author) |
134 | 134 | { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | public function viewtopic_attr_apply($event) |
103 | 103 | { |
104 | 104 | $attr_id = (int) $this->request->variable('attr_id', 0); |
105 | - if ( $attr_id ) |
|
105 | + if ($attr_id) |
|
106 | 106 | { |
107 | 107 | $this->qte->get_users_by_topic_id(array($event['topic_id'])); |
108 | 108 | $this->qte->attr_apply($attr_id, $event['topic_id'], $event['forum_id'], $event['topic_data']['topic_attr_id'], (array) unserialize(trim($event['topic_data']['hide_attr']))); |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | |
124 | 124 | if ($topic_attribute != \ernadoo\qte\qte::KEEP) |
125 | 125 | { |
126 | - $post_data['topic_attr_id'] = (int) $topic_attribute; |
|
126 | + $post_data['topic_attr_id'] = (int) $topic_attribute; |
|
127 | 127 | $post_data['topic_attr_user'] = (int) $this->user->data['user_id']; |
128 | 128 | $post_data['topic_attr_time'] = time(); |
129 | 129 | |
@@ -146,11 +146,11 @@ discard block |
||
146 | 146 | |
147 | 147 | if ($event['post_data']['force_attr']) |
148 | 148 | { |
149 | - if ($post_data['attr_id'] == \ernadoo\qte\qte::REMOVE && ($event['mode'] == 'post' || ($event['mode'] == 'edit' && $event['post_data']['topic_first_post_id'] == $event['post_id'])) ) |
|
149 | + if ($post_data['attr_id'] == \ernadoo\qte\qte::REMOVE && ($event['mode'] == 'post' || ($event['mode'] == 'edit' && $event['post_data']['topic_first_post_id'] == $event['post_id']))) |
|
150 | 150 | { |
151 | 151 | $error = $event['error']; |
152 | 152 | $error[] = $this->user->lang['QTE_ATTRIBUTE_UNSELECTED']; |
153 | - $event['error'] = $error ; |
|
153 | + $event['error'] = $error; |
|
154 | 154 | |
155 | 155 | // init the value |
156 | 156 | $post_data['attr_id'] = 0; |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | while ($row = $this->db->sql_fetchrow($result)) |
54 | 54 | { |
55 | - $auth_option = 'f_qte_attr_'.$row['attr_id']; |
|
55 | + $auth_option = 'f_qte_attr_' . $row['attr_id']; |
|
56 | 56 | $migrator_tool_permission->add($auth_option, false); |
57 | 57 | |
58 | 58 | $attr_permissions_array[$auth_option] = json_decode($row['attr_auths'], true); |