Merge pull request #176 from marc1706/fix/code_sniffer

[fix/code_sniffer] Fix code_sniffer complaints
This commit is contained in:
Marc Alexander
2013-11-03 06:32:36 -08:00
7 changed files with 18 additions and 18 deletions

View File

@@ -284,7 +284,7 @@ class db
$ret[$key] = "{foobar.{$key}.{$this->sql_in_set[$id][1][$this->int_pointer]}}"; $ret[$key] = "{foobar.{$key}.{$this->sql_in_set[$id][1][$this->int_pointer]}}";
} }
} }
$this->int_pointer++;; $this->int_pointer++;
return $ret; return $ret;
} }
} }

View File

@@ -342,7 +342,7 @@ class phpbb_trim_message_bbcodes
for ($i = 1; $i <= $this->array_size; $i++) for ($i = 1; $i <= $this->array_size; $i++)
{ {
if (($this->bbcode_list[$this->array_size - $i]['open_start'] < $position) && if (($this->bbcode_list[$this->array_size - $i]['open_start'] < $position) &&
($this->bbcode_list[$this->array_size - $i]['close_start'] >= $position)) ($this->bbcode_list[$this->array_size - $i]['close_start'] >= $position))
{ {
$bbcodes[] = $this->bbcode_list[$this->array_size - $i]['bbcode_tag']; $bbcodes[] = $this->bbcode_list[$this->array_size - $i]['bbcode_tag'];
} }

View File

@@ -9,7 +9,7 @@
if (!defined('IN_PHPBB') && !defined('UMIL_AUTO') && !defined('IN_INSTALL')) if (!defined('IN_PHPBB') && !defined('UMIL_AUTO') && !defined('IN_INSTALL'))
{ {
exit; exit;
} }
// Get portal config // Get portal config
@@ -175,10 +175,10 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos
$topic_order = ($config['board3_news_show_last_' . $module_id]) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ; $topic_order = ($config['board3_news_show_last_' . $module_id]) ? 't.topic_last_post_time DESC' : 't.topic_time DESC' ;
break; break;
default: default:
$topic_type = $str_where = $user_link = $post_link = ''; $topic_type = $str_where = $user_link = $post_link = '';
$topic_order = 't.topic_time DESC'; $topic_order = 't.topic_time DESC';
// maybe use trigger_error here, as this shouldn't happen // maybe use trigger_error here, as this shouldn't happen
} }
if ($type == 'announcements' && $global_f < 1) if ($type == 'announcements' && $global_f < 1)
@@ -447,10 +447,10 @@ function generate_portal_pagination($base_url, $num_items, $per_page, $start_ite
$anker = '#n'; $anker = '#n';
break; break;
default: default:
// this shouldn't happend @todo: use trigger_error() // this shouldn't happend @todo: use trigger_error()
$pagination_type = 'ap'; $pagination_type = 'ap';
$anker = '#a'; $anker = '#a';
} }
// Make sure $per_page is a valid value // Make sure $per_page is a valid value
@@ -609,13 +609,13 @@ function get_portal_tracking_info($fetch_news)
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
// @todo: do not use $current_forum here as this is already used by the outside foreach // @todo: do not use $current_forum here as this is already used by the outside foreach
foreach($forum_ids as $current_forum) foreach($forum_ids as $current_forum)
{ {
$user_lastmark[$current_forum] = (isset($mark_time[$current_forum])) ? $mark_time[$current_forum] : $user->data['user_lastmark']; $user_lastmark[$current_forum] = (isset($mark_time[$current_forum])) ? $mark_time[$current_forum] : $user->data['user_lastmark'];
} }
// @todo: also check if $user_lastmark has been defined for this specific forum_id // @todo: also check if $user_lastmark has been defined for this specific forum_id
foreach ($topic_ids as $topic_id) foreach ($topic_ids as $topic_id)
{ {
$last_read[$topic_id] = (!isset($last_read[$topic_id]) || $user_lastmark[$rev_forum_ids[$topic_id]] > $last_read[$topic_id]) ? $user_lastmark[$rev_forum_ids[$topic_id]] : $last_read[$topic_id]; $last_read[$topic_id] = (!isset($last_read[$topic_id]) || $user_lastmark[$rev_forum_ids[$topic_id]] > $last_read[$topic_id]) ? $user_lastmark[$rev_forum_ids[$topic_id]] : $last_read[$topic_id];

View File

@@ -26,8 +26,8 @@ function column_num_string($column)
return 'top'; return 'top';
case 5: case 5:
return 'bottom'; return 'bottom';
default: default:
return 0; return 0;
} }
} }

View File

@@ -9,7 +9,7 @@
if (!defined('IN_PHPBB')) if (!defined('IN_PHPBB'))
{ {
exit; exit;
} }
/** /**

View File

@@ -103,7 +103,7 @@ class portal_links_module
public function get_template_acp($module_id) public function get_template_acp($module_id)
{ {
// do not remove this as it is needed in order to run manage_links // do not remove this as it is needed in order to run manage_links
return array( return array(
'title' => 'ACP_PORTAL_LINKS', 'title' => 'ACP_PORTAL_LINKS',
'vars' => array( 'vars' => array(
'legend1' => 'ACP_PORTAL_LINKS', 'legend1' => 'ACP_PORTAL_LINKS',

View File

@@ -113,7 +113,7 @@ class portal_main_menu_module
public function get_template_acp($module_id) public function get_template_acp($module_id)
{ {
// do not remove this as it is needed in order to run manage_links // do not remove this as it is needed in order to run manage_links
return array( return array(
'title' => 'ACP_PORTAL_MENU', 'title' => 'ACP_PORTAL_MENU',
'vars' => array( 'vars' => array(
'legend1' => 'ACP_PORTAL_MENU', 'legend1' => 'ACP_PORTAL_MENU',