@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | $content = $this->request->variable('content', '', true); |
| 70 | 70 | $cblocks = $this->get_custom_blocks(); |
| 71 | 71 | |
| 72 | - $sql_data = $this->get_default_fields($block_id); |
|
| 72 | + $sql_data = $this->get_default_fields($block_id); |
|
| 73 | 73 | $sql_data['block_content'] = $content; |
| 74 | 74 | |
| 75 | 75 | generate_text_for_storage($sql_data['block_content'], $sql_data['bbcode_uid'], $sql_data['bbcode_bitfield'], $sql_data['bbcode_options'], true, true, true); |
@@ -130,11 +130,11 @@ discard block |
||
| 130 | 130 | { |
| 131 | 131 | if (!$block_exists) |
| 132 | 132 | { |
| 133 | - $sql = 'INSERT INTO ' . $this->cblocks_table . ' ' . $this->db->sql_build_array('INSERT', $sql_data); |
|
| 133 | + $sql = 'INSERT INTO '.$this->cblocks_table.' '.$this->db->sql_build_array('INSERT', $sql_data); |
|
| 134 | 134 | } |
| 135 | 135 | else |
| 136 | 136 | { |
| 137 | - $sql = 'UPDATE ' . $this->cblocks_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_data) . ' WHERE block_id = ' . (int) $sql_data['block_id']; |
|
| 137 | + $sql = 'UPDATE '.$this->cblocks_table.' SET '.$this->db->sql_build_array('UPDATE', $sql_data).' WHERE block_id = '.(int) $sql_data['block_id']; |
|
| 138 | 138 | } |
| 139 | 139 | $this->db->sql_query($sql); |
| 140 | 140 | $this->cache->destroy('pt_cblocks'); |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | if ($edit_mode !== false) |
| 152 | 152 | { |
| 153 | 153 | decode_message($cblock['block_content'], $cblock['bbcode_uid']); |
| 154 | - $content = '<div id="block-editor-' . $cblock['block_id'] . '" class="editable editable-block" data-service="blitze.sitemaker.block.custom" data-method="edit" data-raw="' . $cblock['block_content'] . '">' . $content . '</div>'; |
|
| 154 | + $content = '<div id="block-editor-'.$cblock['block_id'].'" class="editable editable-block" data-service="blitze.sitemaker.block.custom" data-method="edit" data-raw="'.$cblock['block_content'].'">'.$content.'</div>'; |
|
| 155 | 155 | } |
| 156 | 156 | } |
| 157 | 157 | |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | private function change_user() |
| 148 | 148 | { |
| 149 | 149 | $change = false; |
| 150 | - if ($this->settings['rotation'] == 'pageload' || $this->settings['last_changed'] < strtotime('-1 ' . self::$rotations[$this->settings['rotation']])) |
|
| 150 | + if ($this->settings['rotation'] == 'pageload' || $this->settings['last_changed'] < strtotime('-1 '.self::$rotations[$this->settings['rotation']])) |
|
| 151 | 151 | { |
| 152 | 152 | $this->settings['last_changed'] = time(); |
| 153 | 153 | $change = true; |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | private function get_settings(array $bdata) |
| 164 | 164 | { |
| 165 | - $cached_settings = $this->cache->get('pt_block_data_' . $bdata['bid']); |
|
| 165 | + $cached_settings = $this->cache->get('pt_block_data_'.$bdata['bid']); |
|
| 166 | 166 | $settings = ($cached_settings && $cached_settings['hash'] === $bdata['hash']) ? $cached_settings : $bdata['settings']; |
| 167 | 167 | $settings['hash'] = $bdata['hash']; |
| 168 | 168 | |
@@ -182,8 +182,8 @@ discard block |
||
| 182 | 182 | $sql_data = array( |
| 183 | 183 | 'settings' => json_encode($settings) |
| 184 | 184 | ); |
| 185 | - $this->db->sql_query('UPDATE ' . $this->blocks_table . ' SET ' . $this->db->sql_build_array('UPDATE', $sql_data) . ' WHERE bid = ' . (int) $bid); |
|
| 186 | - $this->cache->put('pt_block_data_' . $bid, $this->settings); |
|
| 185 | + $this->db->sql_query('UPDATE '.$this->blocks_table.' SET '.$this->db->sql_build_array('UPDATE', $sql_data).' WHERE bid = '.(int) $bid); |
|
| 186 | + $this->cache->put('pt_block_data_'.$bid, $this->settings); |
|
| 187 | 187 | } |
| 188 | 188 | } |
| 189 | 189 | |
@@ -235,8 +235,8 @@ discard block |
||
| 235 | 235 | $rotation = $this->settings['rotation']; |
| 236 | 236 | |
| 237 | 237 | $this->ptemplate->assign_vars(array( |
| 238 | - 'QTYPE_EXPLAIN' => ($query_type == 'posts' || $query_type == 'recent') ? $this->translator->lang('QTYPE_' . strtoupper($query_type)) : '', |
|
| 239 | - 'TITLE_EXPLAIN' => ($rotation != 'pageload') ? $this->translator->lang(strtoupper($rotation) . '_MEMBER') : '', |
|
| 238 | + 'QTYPE_EXPLAIN' => ($query_type == 'posts' || $query_type == 'recent') ? $this->translator->lang('QTYPE_'.strtoupper($query_type)) : '', |
|
| 239 | + 'TITLE_EXPLAIN' => ($rotation != 'pageload') ? $this->translator->lang(strtoupper($rotation).'_MEMBER') : '', |
|
| 240 | 240 | )); |
| 241 | 241 | } |
| 242 | 242 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | { |
| 142 | 142 | $this->set_display_fields(); |
| 143 | 143 | |
| 144 | - $view = 'S_' . strtoupper($this->settings['template']); |
|
| 144 | + $view = 'S_'.strtoupper($this->settings['template']); |
|
| 145 | 145 | $post_data = $this->get_post_data($topic_data); |
| 146 | 146 | $topic_data = array_values($topic_data); |
| 147 | 147 | |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | { |
| 167 | 167 | for ($i = 0, $size = sizeof($topic_data); $i < $size; $i++) |
| 168 | 168 | { |
| 169 | - $row =& $topic_data[$i]; |
|
| 169 | + $row = & $topic_data[$i]; |
|
| 170 | 170 | $forum_id = $row['forum_id']; |
| 171 | 171 | $topic_id = $row['topic_id']; |
| 172 | 172 | |
@@ -181,10 +181,10 @@ discard block |
||
| 181 | 181 | 'VIEWS' => $row['topic_views'], |
| 182 | 182 | 'S_UNREAD_TOPIC' => $this->is_unread_topic($forum_id, $topic_id, $row['topic_last_post_time']), |
| 183 | 183 | |
| 184 | - 'U_VIEWTOPIC' => append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f=$forum_id&t=$topic_id"), |
|
| 185 | - 'U_VIEWFORUM' => append_sid($this->phpbb_root_path . 'viewforum.' . $this->php_ext, "f=$forum_id"), |
|
| 186 | - 'U_NEW_POST' => append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f=$forum_id&t=$topic_id&view=unread") . '#unread', |
|
| 187 | - 'U_LAST_POST' => append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f=$forum_id&t=$topic_id&p=" . $row['topic_last_post_id']) . '#p' . $row['topic_last_post_id'], |
|
| 184 | + 'U_VIEWTOPIC' => append_sid($this->phpbb_root_path.'viewtopic.'.$this->php_ext, "f=$forum_id&t=$topic_id"), |
|
| 185 | + 'U_VIEWFORUM' => append_sid($this->phpbb_root_path.'viewforum.'.$this->php_ext, "f=$forum_id"), |
|
| 186 | + 'U_NEW_POST' => append_sid($this->phpbb_root_path.'viewtopic.'.$this->php_ext, "f=$forum_id&t=$topic_id&view=unread").'#unread', |
|
| 187 | + 'U_LAST_POST' => append_sid($this->phpbb_root_path.'viewtopic.'.$this->php_ext, "f=$forum_id&t=$topic_id&p=".$row['topic_last_post_id']).'#p'.$row['topic_last_post_id'], |
|
| 188 | 188 | ); |
| 189 | 189 | |
| 190 | 190 | $this->ptemplate->assign_block_vars('topicrow', $tpl_ary); |
@@ -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 | } |
@@ -71,9 +71,9 @@ |
||
| 71 | 71 | $this->ptemplate->assign_vars(array( |
| 72 | 72 | 'S_SHOW_HIDE_ME' => ($settings['show_hide_me']) ? true : false, |
| 73 | 73 | 'S_AUTOLOGIN_ENABLED' => ($settings['allow_autologin']) ? true : false, |
| 74 | - 'S_LOGIN_ACTION' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=login'), |
|
| 75 | - 'U_REGISTER' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=register'), |
|
| 76 | - 'U_SEND_PASSWORD' => append_sid("{$this->phpbb_root_path}ucp." . $this->php_ext, 'mode=sendpassword'), |
|
| 74 | + 'S_LOGIN_ACTION' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=login'), |
|
| 75 | + 'U_REGISTER' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=register'), |
|
| 76 | + 'U_SEND_PASSWORD' => append_sid("{$this->phpbb_root_path}ucp.".$this->php_ext, 'mode=sendpassword'), |
|
| 77 | 77 | 'U_REDIRECT' => reapply_sid(ltrim(rtrim(build_url(array('edit_mode')), '?'), './../')) |
| 78 | 78 | )); |
| 79 | 79 | |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | |
| 100 | 100 | $this->ptemplate->assign_block_vars('topicrow', array( |
| 101 | 101 | 'TOPIC_TITLE' => censor_text($row['topic_title']), |
| 102 | - 'U_VIEWTOPIC' => append_sid($this->phpbb_root_path . 'viewtopic.' . $this->php_ext, "f=$forum_id&t=$topic_id"), |
|
| 102 | + 'U_VIEWTOPIC' => append_sid($this->phpbb_root_path.'viewtopic.'.$this->php_ext, "f=$forum_id&t=$topic_id"), |
|
| 103 | 103 | )); |
| 104 | 104 | unset($topic_data[$i]); |
| 105 | 105 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | { |
| 141 | 141 | return array( |
| 142 | 142 | 'WHERE' => array( |
| 143 | - 't.topic_last_post_time > ' . $this->user->data['user_lastvisit'], |
|
| 143 | + 't.topic_last_post_time > '.$this->user->data['user_lastvisit'], |
|
| 144 | 144 | 't.topic_moved_id = 0', |
| 145 | 145 | ), |
| 146 | 146 | ); |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | POSTS_TABLE => 'p', |
| 157 | 157 | ), |
| 158 | 158 | 'WHERE' => array( |
| 159 | - 't.topic_id = p.topic_id AND p.post_time > ' . $this->user->data['user_lastvisit'], |
|
| 159 | + 't.topic_id = p.topic_id AND p.post_time > '.$this->user->data['user_lastvisit'], |
|
| 160 | 160 | ), |
| 161 | 161 | ); |
| 162 | 162 | } |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | if (!empty($data['.'][0]['TOTAL_USERS_ONLINE'])) |
| 70 | 70 | { |
| 71 | - $l_online_users = $data['.'][0]['TOTAL_USERS_ONLINE']; |
|
| 71 | + $l_online_users = $data['.'][0]['TOTAL_USERS_ONLINE']; |
|
| 72 | 72 | $online_userlist = $data['.'][0]['LOGGED_IN_USER_LIST']; |
| 73 | 73 | $l_online_record = $data['.'][0]['RECORD_USERS']; |
| 74 | 74 | } |
@@ -105,6 +105,6 @@ discard block |
||
| 105 | 105 | */ |
| 106 | 106 | private function get_viewonline_url() |
| 107 | 107 | { |
| 108 | - return ($this->auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$this->phpbb_root_path}viewonline." . $this->php_ext) : ''; |
|
| 108 | + return ($this->auth->acl_gets('u_viewprofile', 'a_user', 'a_useradd', 'a_userdel')) ? append_sid("{$this->phpbb_root_path}viewonline.".$this->php_ext) : ''; |
|
| 109 | 109 | } |
| 110 | 110 | } |
@@ -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 | } |