[ticket/249] Fix codesniffer complaints in portal files

B3P-249
This commit is contained in:
Marc Alexander
2014-06-09 00:32:38 +02:00
parent 727980f7e0
commit eb256a647d
20 changed files with 52 additions and 57 deletions

View File

@@ -175,7 +175,6 @@ class phpbb_trim_message_bbcodes
$this->is_sensitive = true; $this->is_sensitive = true;
} }
$this->open_bbcode($bbcode_tag, $this->cur_position); $this->open_bbcode($bbcode_tag, $this->cur_position);
$this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length; $this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length;
$this->bbcode_action($bbcode_tag, 'open_end', $this->cur_position); $this->bbcode_action($bbcode_tag, 'open_end', $this->cur_position);

View File

@@ -310,7 +310,6 @@ class announcements extends module_base
$this->pagination->generate_template_pagination($view_topic_url, 'announcements_center_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true); $this->pagination->generate_template_pagination($view_topic_url, 'announcements_center_row.pagination', 'start', $fetch_news[$i]['topic_replies'] + 1, $this->config['posts_per_page'], 1, true, true);
if(!empty($fetch_news[$i]['attachments'])) if(!empty($fetch_news[$i]['attachments']))
{ {
foreach ($fetch_news[$i]['attachments'] as $attachment) foreach ($fetch_news[$i]['attachments'] as $attachment)

View File

@@ -467,7 +467,7 @@ class links extends module_base
*/ */
private function utf_unserialize($serial_str) private function utf_unserialize($serial_str)
{ {
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str ); $out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str);
return unserialize($out); return unserialize($out);
} }
} }

View File

@@ -530,7 +530,7 @@ class main_menu extends module_base
*/ */
private function utf_unserialize($serial_str) private function utf_unserialize($serial_str)
{ {
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str ); $out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str);
return unserialize($out); return unserialize($out);
} }
} }

View File

@@ -114,7 +114,6 @@ class news extends module_base
$portal_news_length = ($news < 0) ? $this->config['board3_news_length_' . $module_id] : 0; $portal_news_length = ($news < 0) ? $this->config['board3_news_length_' . $module_id] : 0;
$fetch_news = phpbb_fetch_posts($module_id, $this->config['board3_news_forum_' . $module_id], $this->config['board3_news_permissions_' . $module_id], $this->config['board3_number_of_news_' . $module_id], $portal_news_length, 0, ($this->config['board3_show_all_news_' . $module_id]) ? 'news_all' : 'news', $start, $this->config['board3_news_exclude_' . $module_id]); $fetch_news = phpbb_fetch_posts($module_id, $this->config['board3_news_forum_' . $module_id], $this->config['board3_news_permissions_' . $module_id], $this->config['board3_number_of_news_' . $module_id], $portal_news_length, 0, ($this->config['board3_show_all_news_' . $module_id]) ? 'news_all' : 'news', $start, $this->config['board3_news_exclude_' . $module_id]);
// Any news present? If not terminate it here. // Any news present? If not terminate it here.
if (sizeof($fetch_news) == 0) if (sizeof($fetch_news) == 0)
{ {

View File

@@ -116,7 +116,6 @@ class stylechanger extends module_base
$this->template->assign_var('STYLE_SELECT', $style_select); $this->template->assign_var('STYLE_SELECT', $style_select);
} }
// Assign specific vars // Assign specific vars
$this->template->assign_vars(array( $this->template->assign_vars(array(
'S_STYLE_OPTIONS' => ($this->config['override_user_style'] || $style_count < 2) ? '' : style_select($this->user->data['user_style']), 'S_STYLE_OPTIONS' => ($this->config['override_user_style'] || $style_count < 2) ? '' : style_select($this->user->data['user_style']),

View File

@@ -145,7 +145,6 @@ class user_menu extends module_base
$unread_list = get_unread_topics($this->user->data['user_id'], $sql_where, 'ORDER BY t.topic_id DESC'); $unread_list = get_unread_topics($this->user->data['user_id'], $sql_where, 'ORDER BY t.topic_id DESC');
$unread_posts_count = sizeof($unread_list); $unread_posts_count = sizeof($unread_list);
// Get user avatar and rank // Get user avatar and rank
$user_id = $this->user->data['user_id']; $user_id = $this->user->data['user_id'];
$username = $this->user->data['username']; $username = $this->user->data['username'];