[ticket/249] Fix codesniffer complaints in portal files
B3P-249
This commit is contained in:
@@ -140,7 +140,7 @@ class announcements extends module_base
|
||||
if($permissions == true)
|
||||
{
|
||||
$disallow_access = array_unique(array_keys($this->auth->acl_getf('!f_read', true)));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$disallow_access = array();
|
||||
@@ -156,7 +156,7 @@ class announcements extends module_base
|
||||
|
||||
if(sizeof($forum_from))
|
||||
{
|
||||
$disallow_access = array_diff($forum_from, $disallow_access);
|
||||
$disallow_access = array_diff($forum_from, $disallow_access);
|
||||
if(!sizeof($disallow_access))
|
||||
{
|
||||
return array();
|
||||
@@ -197,7 +197,7 @@ class announcements extends module_base
|
||||
$topic_tracking_info = (get_portal_tracking_info($fetch_news));
|
||||
|
||||
if($announcement < 0)
|
||||
// Show the announcements overview
|
||||
// Show the announcements overview
|
||||
{
|
||||
$count = $fetch_news['topic_count'];
|
||||
for ($i = 0; $i < $count; $i++)
|
||||
@@ -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);
|
||||
|
||||
|
||||
if(!empty($fetch_news[$i]['attachments']))
|
||||
{
|
||||
foreach ($fetch_news[$i]['attachments'] as $attachment)
|
||||
@@ -332,7 +331,7 @@ class announcements extends module_base
|
||||
}
|
||||
else
|
||||
// Show "read full" page
|
||||
{
|
||||
{
|
||||
$i = $announcement;
|
||||
|
||||
/**
|
||||
@@ -358,7 +357,7 @@ class announcements extends module_base
|
||||
if ($this->config['board3_announcements_archive_' . $module_id])
|
||||
{
|
||||
$pagination = generate_portal_pagination(append_sid("{$this->phpbb_root_path}app.{$this->php_ext}/portal"), $total_announcements, $this->config['board3_number_of_announcements_' . $module_id], $start, 'announcements');
|
||||
}
|
||||
}
|
||||
|
||||
$this->template->assign_block_vars('announcements_center_row', array(
|
||||
'ATTACH_ICON_IMG' => ($fetch_news[$i]['attachment'] && $this->config['allow_attachments']) ? $this->user->img('icon_topic_attach', $this->user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
|
||||
@@ -629,7 +629,7 @@ class calendar extends module_base
|
||||
|
||||
return;
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
for ($i = 0; $i < sizeof($events); $i++)
|
||||
|
||||
@@ -342,7 +342,7 @@ class custom extends module_base
|
||||
display_custom_bbcodes();
|
||||
$this->user->add_lang('posting');
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ class links extends module_base
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* on move_down, switch position with next order_id...
|
||||
* on move_up, switch position with previous order_id...
|
||||
* move up means a lower ID, move down means a higher ID
|
||||
@@ -465,9 +465,9 @@ class links extends module_base
|
||||
*
|
||||
* @return string Unserialized string
|
||||
*/
|
||||
private function utf_unserialize($serial_str)
|
||||
private function utf_unserialize($serial_str)
|
||||
{
|
||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
|
||||
return unserialize($out);
|
||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str);
|
||||
return unserialize($out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,7 +424,7 @@ class main_menu extends module_base
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* on move_down, switch position with next order_id...
|
||||
* on move_up, switch position with previous order_id...
|
||||
* move up means a lower ID, move down means a higher ID
|
||||
@@ -528,9 +528,9 @@ class main_menu extends module_base
|
||||
*
|
||||
* @return string Unserialized string
|
||||
*/
|
||||
private function utf_unserialize($serial_str)
|
||||
private function utf_unserialize($serial_str)
|
||||
{
|
||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str );
|
||||
return unserialize($out);
|
||||
$out = preg_replace('!s:(\d+):"(.*?)";!se', "'s:'.strlen('$2').':\"$2\";'", $serial_str);
|
||||
return unserialize($out);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,6 @@ class news extends module_base
|
||||
$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]);
|
||||
|
||||
|
||||
// Any news present? If not terminate it here.
|
||||
if (sizeof($fetch_news) == 0)
|
||||
{
|
||||
@@ -268,7 +267,7 @@ class news extends module_base
|
||||
'TITLE' => $fetch_news[$i]['topic_title'],
|
||||
'POSTER' => $fetch_news[$i]['username'],
|
||||
'POSTER_FULL' => $fetch_news[$i]['username_full'],
|
||||
'USERNAME_FULL_LAST' => $fetch_news[$i]['username_full_last'],
|
||||
'USERNAME_FULL_LAST' => $fetch_news[$i]['username_full_last'],
|
||||
'U_USER_PROFILE' => (($fetch_news[$i]['user_type'] == USER_NORMAL || $fetch_news[$i]['user_type'] == USER_FOUNDER) && $fetch_news[$i]['user_id'] != ANONYMOUS) ? append_sid("{$this->phpbb_root_path}memberlist.{$this->php_ext}", 'mode=viewprofile&u=' . $fetch_news[$i]['user_id']) : '',
|
||||
'TIME' => $fetch_news[$i]['topic_time'],
|
||||
'LAST_POST_TIME' => $this->user->format_date($fetch_news[$i]['topic_last_post_time']),
|
||||
@@ -355,7 +354,7 @@ class news extends module_base
|
||||
'S_POLL' => $fetch_news[$i]['poll'],
|
||||
'S_UNREAD_INFO' => $unread_topic,
|
||||
'U_READ_FULL' => $read_full_url,
|
||||
'L_READ_FULL' => $read_full,
|
||||
'L_READ_FULL' => $read_full,
|
||||
'OPEN' => $open_bracket,
|
||||
'CLOSE' => $close_bracket,
|
||||
'S_HAS_ATTACHMENTS' => (!empty($fetch_news[$i]['attachments'])) ? true : false,
|
||||
|
||||
@@ -116,7 +116,6 @@ class stylechanger extends module_base
|
||||
$this->template->assign_var('STYLE_SELECT', $style_select);
|
||||
}
|
||||
|
||||
|
||||
// Assign specific vars
|
||||
$this->template->assign_vars(array(
|
||||
'S_STYLE_OPTIONS' => ($this->config['override_user_style'] || $style_count < 2) ? '' : style_select($this->user->data['user_style']),
|
||||
|
||||
@@ -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_posts_count = sizeof($unread_list);
|
||||
|
||||
|
||||
// Get user avatar and rank
|
||||
$user_id = $this->user->data['user_id'];
|
||||
$username = $this->user->data['username'];
|
||||
|
||||
@@ -247,7 +247,7 @@ class welcome extends module_base
|
||||
display_custom_bbcodes();
|
||||
$this->user->add_lang('posting');
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user