@@ -191,7 +191,7 @@ |
||
191 | 191 | |
192 | 192 | return $this; |
193 | 193 | } |
194 | - */ |
|
194 | + */ |
|
195 | 195 | |
196 | 196 | /** |
197 | 197 | * Fetch Topic Tracking Info |
@@ -202,12 +202,12 @@ discard block |
||
202 | 202 | $this->store['sql_array']['SELECT'][] = 'tt.mark_time, ft.mark_time as forum_mark_time'; |
203 | 203 | $this->store['sql_array']['LEFT_JOIN'][] = array( |
204 | 204 | 'FROM' => array(TOPICS_TRACK_TABLE => 'tt'), |
205 | - 'ON' => 'tt.user_id = ' . $this->user->data['user_id'] . ' AND t.topic_id = tt.topic_id' |
|
205 | + 'ON' => 'tt.user_id = '.$this->user->data['user_id'].' AND t.topic_id = tt.topic_id' |
|
206 | 206 | ); |
207 | 207 | |
208 | 208 | $this->store['sql_array']['LEFT_JOIN'][] = array( |
209 | 209 | 'FROM' => array(FORUMS_TRACK_TABLE => 'ft'), |
210 | - 'ON' => 'ft.user_id = ' . $this->user->data['user_id'] . ' AND t.forum_id = ft.forum_id' |
|
210 | + 'ON' => 'ft.user_id = '.$this->user->data['user_id'].' AND t.forum_id = ft.forum_id' |
|
211 | 211 | ); |
212 | 212 | } |
213 | 213 | |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | { |
227 | 227 | if ($unix_start_time && $unix_stop_time) |
228 | 228 | { |
229 | - $this->store['sql_array']['WHERE'][] = (($mode == 'topic') ? 't.topic_time' : 'p.post_time') . " BETWEEN $unix_start_time AND $unix_stop_time"; |
|
229 | + $this->store['sql_array']['WHERE'][] = (($mode == 'topic') ? 't.topic_time' : 'p.post_time')." BETWEEN $unix_start_time AND $unix_stop_time"; |
|
230 | 230 | } |
231 | 231 | |
232 | 232 | return $this; |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | public function set_sorting($sort_key, $sort_dir = 'DESC') |
260 | 260 | { |
261 | - $this->store['sql_array']['ORDER_BY'] = $sort_key . ' ' . $sort_dir; |
|
261 | + $this->store['sql_array']['ORDER_BY'] = $sort_key.' '.$sort_dir; |
|
262 | 262 | |
263 | 263 | return $this; |
264 | 264 | } |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | { |
320 | 320 | if (!empty($column_id)) |
321 | 321 | { |
322 | - $this->store['sql_array']['WHERE'][] = (is_array($column_id)) ? $this->db->sql_in_set($column, $column_id) : $column . ' = ' . (int) $column_id; |
|
322 | + $this->store['sql_array']['WHERE'][] = (is_array($column_id)) ? $this->db->sql_in_set($column, $column_id) : $column.' = '.(int) $column_id; |
|
323 | 323 | } |
324 | 324 | } |
325 | 325 | |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | { |
331 | 331 | if ($check_visibility) |
332 | 332 | { |
333 | - $this->store['sql_array']['WHERE'][] = 't.topic_time <= ' . time(); |
|
333 | + $this->store['sql_array']['WHERE'][] = 't.topic_time <= '.time(); |
|
334 | 334 | $this->store['sql_array']['WHERE'][] = $this->content_visibility->get_global_visibility_sql('topic', $this->ex_fid_ary, 't.'); |
335 | 335 | } |
336 | 336 | } |
@@ -45,11 +45,11 @@ |
||
45 | 45 | $curr_key = (int) array_search($settings['current_user'], $userlist); |
46 | 46 | |
47 | 47 | // Remove the invalid user from the list |
48 | - $new_list = str_replace($settings['current_user'] . ',', '', $settings['userlist'] . ','); |
|
48 | + $new_list = str_replace($settings['current_user'].',', '', $settings['userlist'].','); |
|
49 | 49 | $new_list = trim($new_list, ','); |
50 | 50 | |
51 | 51 | $new_userlist = self::_get_userlist($new_list); |
52 | - $current_user =& $new_userlist[$curr_key - 1]; |
|
52 | + $current_user = & $new_userlist[$curr_key - 1]; |
|
53 | 53 | $settings['current_user'] = (int) $current_user; |
54 | 54 | $settings['userlist'] = trim($new_list); |
55 | 55 | $settings['last_changed'] = 0; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | protected function get_email_url(array $row) |
98 | 98 | { |
99 | - return ($this->email_form_allowed) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=email&u=' . $row['user_id']) : (($this->mailto_allowed) ? 'mailto:' . $row['user_email'] : ''); |
|
99 | + return ($this->email_form_allowed) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=email&u='.$row['user_id']) : (($this->mailto_allowed) ? 'mailto:'.$row['user_email'] : ''); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 | /** |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $jabber = array( |
128 | 128 | 'ID' => 'jabber', |
129 | 129 | 'NAME' => $this->translator->lang('JABBER'), |
130 | - 'U_CONTACT' => append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=contact&action=jabber&u=' . $row['user_id']), |
|
130 | + 'U_CONTACT' => append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=contact&action=jabber&u='.$row['user_id']), |
|
131 | 131 | ); |
132 | 132 | } |
133 | 133 | |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | $pm = array( |
157 | 157 | 'ID' => 'pm', |
158 | 158 | 'NAME' => $this->translator->lang('SEND_PRIVATE_MESSAGE'), |
159 | - 'U_CONTACT' => append_sid("{$this->phpbb_root_path}ucp.{$this->php_ext}", 'i=pm&mode=compose&u=' . $row['user_id']), |
|
159 | + 'U_CONTACT' => append_sid("{$this->phpbb_root_path}ucp.{$this->php_ext}", 'i=pm&mode=compose&u='.$row['user_id']), |
|
160 | 160 | ); |
161 | 161 | } |
162 | 162 | |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | { |
220 | 220 | if (!function_exists('phpbb_get_banned_user_ids')) |
221 | 221 | { |
222 | - include($this->phpbb_root_path . 'includes/functions_user.' . $this->php_ext); |
|
222 | + include($this->phpbb_root_path.'includes/functions_user.'.$this->php_ext); |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | return phpbb_get_banned_user_ids($user_ids, false); |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | public function get_users_groups() |
41 | 41 | { |
42 | 42 | $sql = 'SELECT group_id |
43 | - FROM ' . USER_GROUP_TABLE . ' |
|
43 | + FROM ' . USER_GROUP_TABLE.' |
|
44 | 44 | WHERE user_id = ' . (int) $this->user->data['user_id']; |
45 | 45 | $result = $this->db->sql_query($sql); |
46 | 46 | |
@@ -83,13 +83,13 @@ discard block |
||
83 | 83 | $sql = $this->_get_group_sql($mode); |
84 | 84 | $result = $this->db->sql_query($sql); |
85 | 85 | |
86 | - $options = '<option value="0">' . $this->translator->lang('ALL') . '</option>'; |
|
86 | + $options = '<option value="0">'.$this->translator->lang('ALL').'</option>'; |
|
87 | 87 | while ($row = $this->db->sql_fetchrow($result)) |
88 | 88 | { |
89 | 89 | $group_name = $this->_get_group_name($row); |
90 | 90 | $group_class = $this->_get_group_class($row['group_type']); |
91 | 91 | $selected_option = $this->_get_selected_option($row['group_id'], $selected); |
92 | - $options .= '<option' . $group_class . ' value="' . $row['group_id'] . '"' . $selected_option . '>' . $group_name . '</option>'; |
|
92 | + $options .= '<option'.$group_class.' value="'.$row['group_id'].'"'.$selected_option.'>'.$group_name.'</option>'; |
|
93 | 93 | } |
94 | 94 | $this->db->sql_freeresult($result); |
95 | 95 | |
@@ -103,8 +103,8 @@ discard block |
||
103 | 103 | private function _get_group_sql($mode) |
104 | 104 | { |
105 | 105 | return 'SELECT group_id, group_name, group_type |
106 | - FROM ' . GROUPS_TABLE . |
|
107 | - (($mode === 'special') ? ' WHERE group_type = ' . GROUP_SPECIAL : '') . ' |
|
106 | + FROM ' . GROUPS_TABLE. |
|
107 | + (($mode === 'special') ? ' WHERE group_type = '.GROUP_SPECIAL : '').' |
|
108 | 108 | ORDER BY group_type DESC, group_name ASC'; |
109 | 109 | } |
110 | 110 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | private function _get_group_name(array $row) |
116 | 116 | { |
117 | - return ($row['group_type'] == GROUP_SPECIAL) ? $this->translator->lang('G_' . $row['group_name']) : ucfirst($row['group_name']); |
|
117 | + return ($row['group_type'] == GROUP_SPECIAL) ? $this->translator->lang('G_'.$row['group_name']) : ucfirst($row['group_name']); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | /** |
@@ -138,7 +138,7 @@ |
||
138 | 138 | $this->ptemplate->assign_block_vars('postrow.attachment', array( |
139 | 139 | 'DISPLAY_ATTACHMENT' => $attachment, |
140 | 140 | 'EXTENSION_GROUP' => $extensions[$row['extension']]['group_name'], |
141 | - 'U_VIEWTOPIC' => append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", "t=$topic_id&p=$post_id") . '#p' . $post_id, |
|
141 | + 'U_VIEWTOPIC' => append_sid("{$this->phpbb_root_path}viewtopic.{$this->php_ext}", "t=$topic_id&p=$post_id").'#p'.$post_id, |
|
142 | 142 | )); |
143 | 143 | } |
144 | 144 | } |
@@ -40,9 +40,9 @@ |
||
40 | 40 | public function display(array $settings, $edit_mode = false) |
41 | 41 | { |
42 | 42 | $content = ''; |
43 | - $content .= $this->translator->lang('TOTAL_POSTS_COUNT', (int) $this->config['num_posts']) . '<br />'; |
|
44 | - $content .= $this->translator->lang('TOTAL_TOPICS', (int) $this->config['num_topics']) . '<br />'; |
|
45 | - $content .= $this->translator->lang('TOTAL_USERS', (int) $this->config['num_users']) . '<br />'; |
|
43 | + $content .= $this->translator->lang('TOTAL_POSTS_COUNT', (int) $this->config['num_posts']).'<br />'; |
|
44 | + $content .= $this->translator->lang('TOTAL_TOPICS', (int) $this->config['num_topics']).'<br />'; |
|
45 | + $content .= $this->translator->lang('TOTAL_USERS', (int) $this->config['num_users']).'<br />'; |
|
46 | 46 | $content .= $this->translator->lang('NEWEST_USER', get_username_string('full', $this->config['newest_user_id'], $this->config['newest_username'], $this->config['newest_user_colour'])); |
47 | 47 | |
48 | 48 | return array( |
@@ -109,8 +109,8 @@ discard block |
||
109 | 109 | $this->ptemplate->assign_block_vars('wordgraph', array( |
110 | 110 | 'WORD' => $this->show_word($word, $words_array[$word], $settings['show_word_count']), |
111 | 111 | 'WORD_SIZE' => $settings['min_word_size'] + (($words_array[$word] - $params['min_count']) * $params['size_step']), |
112 | - 'WORD_COLOR' => $r . $g . $b, |
|
113 | - 'WORD_URL' => append_sid("{$this->phpbb_root_path}search.$this->php_ext", 'keywords=' . urlencode($word)), |
|
112 | + 'WORD_COLOR' => $r.$g.$b, |
|
113 | + 'WORD_URL' => append_sid("{$this->phpbb_root_path}search.$this->php_ext", 'keywords='.urlencode($word)), |
|
114 | 114 | )); |
115 | 115 | } |
116 | 116 | } |
@@ -187,8 +187,8 @@ discard block |
||
187 | 187 | AND m.word_id = l.word_id |
188 | 188 | AND m.post_id = p.post_id |
189 | 189 | AND t.topic_id = p.topic_id |
190 | - AND t.topic_time <= ' . time() . ' |
|
191 | - AND ' . $this->content_visibility->get_global_visibility_sql('topic', array_keys($this->auth->acl_getf('!f_read', true)), 't.') . |
|
190 | + AND t.topic_time <= ' . time().' |
|
191 | + AND ' . $this->content_visibility->get_global_visibility_sql('topic', array_keys($this->auth->acl_getf('!f_read', true)), 't.'). |
|
192 | 192 | $sql_where, |
193 | 193 | 'GROUP_BY' => 'l.word_text, l.word_count', |
194 | 194 | 'ORDER_BY' => 'l.word_count DESC' |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | if ($exclude_words) |
206 | 206 | { |
207 | 207 | $exclude_words = array_filter(explode(',', str_replace(' ', '', strtolower($exclude_words)))); |
208 | - $sql_where = (sizeof($exclude_words)) ? ' AND ' . $this->db->sql_in_set('l.word_text', $exclude_words, true) : ''; |
|
208 | + $sql_where = (sizeof($exclude_words)) ? ' AND '.$this->db->sql_in_set('l.word_text', $exclude_words, true) : ''; |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | return $sql_where; |
@@ -219,6 +219,6 @@ discard block |
||
219 | 219 | */ |
220 | 220 | private function show_word($word, $count, $show_count) |
221 | 221 | { |
222 | - return censor_text(($show_count) ? $word . '(' . $count . ')' : $word); |
|
222 | + return censor_text(($show_count) ? $word.'('.$count.')' : $word); |
|
223 | 223 | } |
224 | 224 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | |
108 | 108 | $this->ptemplate->assign_block_vars('topicrow', array( |
109 | 109 | 'TOPIC_TITLE' => censor_text($row['topic_title']), |
110 | - 'U_VIEWTOPIC' => append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f=$forum_id&t=$topic_id"), |
|
110 | + 'U_VIEWTOPIC' => append_sid($this->phpbb_root_path.'viewtopic.'.$this->php_ext, "f=$forum_id&t=$topic_id"), |
|
111 | 111 | )); |
112 | 112 | unset($topic_data[$i]); |
113 | 113 | } |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | BOOKMARKS_TABLE => 'b', |
126 | 126 | ), |
127 | 127 | 'WHERE' => array( |
128 | - 'b.user_id = ' . $this->user->data['user_id'], |
|
128 | + 'b.user_id = '.$this->user->data['user_id'], |
|
129 | 129 | 'b.topic_id = t.topic_id', |
130 | 130 | ), |
131 | 131 | ); |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function display(array $bdata, $edit_mode = false) |
51 | 51 | { |
52 | - if (($content = $this->cache->get('pt_block_data_' . $bdata['bid'])) === false) |
|
52 | + if (($content = $this->cache->get('pt_block_data_'.$bdata['bid'])) === false) |
|
53 | 53 | { |
54 | 54 | $content = ''; |
55 | 55 | if ($this->find_birthday_users()) |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $content = $this->ptemplate->render_view('blitze/sitemaker', 'blocks/birthday.html', 'birthday_block'); |
58 | 58 | |
59 | 59 | // we only check birthdays every hour, may make this an admin choice |
60 | - $this->cache->put('pt_block_data_' . $bdata['bid'], $content, 3600); |
|
60 | + $this->cache->put('pt_block_data_'.$bdata['bid'], $content, 3600); |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | |
@@ -78,12 +78,12 @@ discard block |
||
78 | 78 | $leap_year_birthdays = $this->adjust_leap_year($now, $time); |
79 | 79 | |
80 | 80 | $sql = 'SELECT u.user_id, u.username, u.user_colour, u.user_birthday |
81 | - FROM ' . USERS_TABLE . ' u |
|
82 | - LEFT JOIN ' . BANLIST_TABLE . " b ON (u.user_id = b.ban_userid) |
|
81 | + FROM ' . USERS_TABLE.' u |
|
82 | + LEFT JOIN ' . BANLIST_TABLE." b ON (u.user_id = b.ban_userid) |
|
83 | 83 | WHERE (b.ban_id IS NULL |
84 | 84 | OR b.ban_exclude = 1) |
85 | - AND (u.user_birthday " . $this->db->sql_like_expression(sprintf('%2d-%2d-', $now['mday'], $now['mon']) . $this->db->get_any_char()) . " $leap_year_birthdays) |
|
86 | - AND u.user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ') |
|
85 | + AND (u.user_birthday " . $this->db->sql_like_expression(sprintf('%2d-%2d-', $now['mday'], $now['mon']).$this->db->get_any_char())." $leap_year_birthdays) |
|
86 | + AND u.user_type IN (".USER_NORMAL.', '.USER_FOUNDER.') |
|
87 | 87 | ORDER BY u.username ASC'; |
88 | 88 | $result = $this->db->sql_query($sql); |
89 | 89 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $leap_year_birthdays = ''; |
114 | 114 | if ($now['mday'] == 28 && $now['mon'] == 2 && !$time->format('L')) |
115 | 115 | { |
116 | - $leap_year_birthdays = ' OR u.user_birthday ' . $this->db->sql_like_expression(sprintf('%2d-%2d-', 29, 2) . $this->db->get_any_char()); |
|
116 | + $leap_year_birthdays = ' OR u.user_birthday '.$this->db->sql_like_expression(sprintf('%2d-%2d-', 29, 2).$this->db->get_any_char()); |
|
117 | 117 | } |
118 | 118 | |
119 | 119 | return $leap_year_birthdays; |