From a2f728de3c0698ab22452a434900f216d71fcfa1 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 9 Jun 2014 00:11:13 +0200 Subject: [PATCH 1/3] [ticket/249] Add changes from phpBB files B3P-249 --- phpunit.xml.dist | 2 +- travis/phpunit-mariadb-travis.xml | 6 +++--- travis/phpunit-mysql-travis.xml | 4 ++-- travis/phpunit-postgres-travis.xml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 0219c216..8b277930 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -13,7 +13,7 @@ bootstrap="tests/bootstrap.php"> - ./tests/ + ./tests diff --git a/travis/phpunit-mariadb-travis.xml b/travis/phpunit-mariadb-travis.xml index 1eaee5b7..aa245a82 100644 --- a/travis/phpunit-mariadb-travis.xml +++ b/travis/phpunit-mariadb-travis.xml @@ -13,9 +13,9 @@ bootstrap="../tests/bootstrap.php"> - ../tests/ - tests/functional - tests/lint_test.php + ../tests + ../tests/functional + ../tests/lint_test.php ../tests/functional diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml index d875a5ed..32165b91 100644 --- a/travis/phpunit-mysql-travis.xml +++ b/travis/phpunit-mysql-travis.xml @@ -13,8 +13,8 @@ bootstrap="../tests/bootstrap.php"> - ../tests/ - tests/functional + ../tests + ../tests/functional ../tests/functional diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml index 52f18c94..4689655a 100644 --- a/travis/phpunit-postgres-travis.xml +++ b/travis/phpunit-postgres-travis.xml @@ -13,8 +13,8 @@ bootstrap="../tests/bootstrap.php"> - ../tests/ - tests/functional + ../tests + ../tests/functional ../tests/functional From 727980f7e01b158b4c174853eb1cb7eef23b9a91 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 9 Jun 2014 00:14:02 +0200 Subject: [PATCH 2/3] [ticket/249] Always run functional tests B3P-249 --- phpunit.xml.all | 25 ------------------------- phpunit.xml.dist | 3 +-- phpunit.xml.functional | 31 ------------------------------- 3 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 phpunit.xml.all delete mode 100644 phpunit.xml.functional diff --git a/phpunit.xml.all b/phpunit.xml.all deleted file mode 100644 index e0df67de..00000000 --- a/phpunit.xml.all +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - ./tests/ - - - - - - ./tests/ - - - diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 8b277930..1d0ef6fb 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -12,14 +12,13 @@ verbose="true" bootstrap="tests/bootstrap.php"> - + ./tests - functional slow diff --git a/phpunit.xml.functional b/phpunit.xml.functional deleted file mode 100644 index a59bd15f..00000000 --- a/phpunit.xml.functional +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - ./tests/ - - - - - - functional - - - - - - ./tests/ - - - From eb256a647dab4be4418cd8a9f1d3d35f8c558675 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Mon, 9 Jun 2014 00:32:38 +0200 Subject: [PATCH 3/3] [ticket/249] Fix codesniffer complaints in portal files B3P-249 --- acp/portal_module.php | 44 +++++++++---------- includes/functions.php | 4 +- includes/functions_upload.php | 4 +- includes/trim_message/bbcodes.php | 3 +- .../modules/portal_announcements_module.php | 2 +- .../de/modules/portal_attachments_module.php | 2 +- .../modules/portal_birthday_list_module.php | 2 +- language/de/modules/portal_links_module.php | 2 +- language/de/modules/portal_news_module.php | 2 +- language/en/modules/portal_links_module.php | 2 +- .../en/modules/portal_main_menu_module.php | 2 +- modules/announcements.php | 11 +++-- modules/calendar.php | 2 +- modules/custom.php | 2 +- modules/links.php | 8 ++-- modules/main_menu.php | 8 ++-- modules/news.php | 5 +-- modules/stylechanger.php | 1 - modules/user_menu.php | 1 - modules/welcome.php | 2 +- 20 files changed, 52 insertions(+), 57 deletions(-) diff --git a/acp/portal_module.php b/acp/portal_module.php index cbbeed2d..c54286a4 100644 --- a/acp/portal_module.php +++ b/acp/portal_module.php @@ -232,7 +232,7 @@ class portal_module $this->new_config[$config_name] = $config_value = $cfg_array[$config_name]; if ($submit) - { + { set_config($config_name, $config_value); } } @@ -385,8 +385,8 @@ class portal_module $portal_modules = obtain_portal_modules(); $installed_modules = array(); - foreach($portal_modules as $cur_module) - { + foreach($portal_modules as $cur_module) + { $installed_modules[] = $cur_module['module_classname']; // Create an array with the columns the module is in $this->module_column[$cur_module['module_classname']][] = column_num_string($cur_module['module_column']); @@ -790,10 +790,10 @@ class portal_module $portal_config = obtain_portal_config(); // we need to prevent duplicate entry errors $this->c_class->install($module_id); $this->cache->purge(); - + // We need to return to the module config meta_refresh(3, $this->get_module_link('config', $module_id)); - + trigger_error($this->user->lang['MODULE_RESET_SUCCESS'] . adm_back_link($this->u_action . "&module_id=$module_id")); } else @@ -942,14 +942,14 @@ class portal_module public function move_module_left($module_id) { $module_data = $this->get_move_module_data($module_id); - + if (!isset($this->modules[$module_data['module_classname']])) { trigger_error('CLASS_NOT_FOUND', E_USER_ERROR); } $this->c_class = $this->modules[$module_data['module_classname']]; - + if ($module_data !== false && $module_data['module_column'] > column_string_num('left')) { if($this->c_class->columns & column_string_const(column_num_string($module_data['module_column'] - 1))) @@ -964,7 +964,7 @@ class portal_module { $this->handle_after_move(false); } - + /** * moving only 1 column to the left means we will either end up in the left column * or in the center column. this is not possible when moving 2 columns to the left. @@ -998,13 +998,13 @@ class portal_module SET module_column = module_column - ' . $move_action . ' WHERE module_id = ' . (int) $module_id; $this->db->sql_query($sql); - + $sql = 'UPDATE ' . PORTAL_MODULES_TABLE . ' SET module_order = module_order - 1 WHERE module_order >= ' . $module_data['module_order'] . ' AND module_column = ' . $module_data['module_column']; $this->db->sql_query($sql); - + // the module that needs to moved is in the last row if(!$updated) { @@ -1014,7 +1014,7 @@ class portal_module AND module_column = ' . (int) ($module_data['module_column'] - $move_action); $this->db->sql_query($sql); $new_order = $this->db->sql_fetchfield('new_order') + 1; - + $sql = 'UPDATE ' . PORTAL_MODULES_TABLE . ' SET module_order = ' . $new_order . ' WHERE module_id = ' . (int) $module_id; @@ -1025,7 +1025,7 @@ class portal_module { $this->handle_after_move(false); } - + $this->handle_after_move(true); } @@ -1037,14 +1037,14 @@ class portal_module public function move_module_right($module_id) { $module_data = $this->get_move_module_data($module_id); - + if (!isset($this->modules[$module_data['module_classname']])) { trigger_error('CLASS_NOT_FOUND', E_USER_ERROR); } $this->c_class = $this->modules[$module_data['module_classname']]; - + if ($module_data !== false && $module_data['module_column'] < column_string_num('right')) { if($this->c_class->columns & column_string_const(column_num_string($module_data['module_column'] + 1))) @@ -1059,7 +1059,7 @@ class portal_module { $this->handle_after_move(false); } - + /** * moving only 1 column to the right means we will either end up in the right column * or in the center column. this is not possible when moving 2 columns to the right. @@ -1081,7 +1081,7 @@ class portal_module $move_action = 2; } } - + $sql = 'UPDATE ' . PORTAL_MODULES_TABLE . ' SET module_order = module_order + 1 WHERE module_order >= ' . (int) $module_data['module_order'] . ' @@ -1093,13 +1093,13 @@ class portal_module SET module_column = module_column + ' . $move_action . ' WHERE module_id = ' . (int) $module_id; $this->db->sql_query($sql); - + $sql = 'UPDATE ' . PORTAL_MODULES_TABLE . ' SET module_order = module_order - 1 WHERE module_order >= ' . (int) $module_data['module_order'] . ' AND module_column = ' . (int) $module_data['module_column']; $this->db->sql_query($sql); - + // the module that needs to moved is in the last row if(!$updated) { @@ -1109,7 +1109,7 @@ class portal_module AND module_column = ' . (int) ($module_data['module_column'] + $move_action); $this->db->sql_query($sql); $new_order = $this->db->sql_fetchfield('new_order') + 1; - + $sql = 'UPDATE ' . PORTAL_MODULES_TABLE . ' SET module_order = ' . (int) $new_order . ' WHERE module_id = ' . (int) $module_id; @@ -1140,7 +1140,7 @@ class portal_module $result = $this->db->sql_query_limit($sql, 1); $module_data = $this->db->sql_fetchrow($result); $this->db->sql_freeresult($result); - + if ($module_data !== false) { $module_classname = $this->request->variable('module_classname', ''); @@ -1164,7 +1164,7 @@ class portal_module WHERE module_column = ' . $module_data['module_column'] . ' AND module_order > ' . $module_data['module_order']; $this->db->sql_query($sql); - + $this->cache->purge(); // make sure we don't get errors after re-adding a module if ($this->request->is_ajax()) @@ -1194,7 +1194,7 @@ class portal_module ))); } } - + $this->cache->destroy('portal_modules'); } diff --git a/includes/functions.php b/includes/functions.php index f537a8bd..fd073829 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -110,7 +110,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos if ($permissions == true) { $disallow_access = array_unique(array_keys($auth->acl_getf('!f_read', true))); - } + } else { $disallow_access = array(); @@ -316,7 +316,7 @@ function phpbb_fetch_posts($module_id, $forum_from, $permissions, $number_of_pos $message = get_sub_taged_string($message, $row['bbcode_uid'], $maxlen); $posts[$i]['striped'] = true; } - else + else { $message = str_replace("\n", '
', $row['post_text']); } diff --git a/includes/functions_upload.php b/includes/functions_upload.php index cba9541c..6d69d510 100755 --- a/includes/functions_upload.php +++ b/includes/functions_upload.php @@ -129,7 +129,7 @@ class portal_upload if (!sizeof($file->error)) { - // Let's start moving our files where they belong + // Let's start moving our files where they belong foreach ($actions['NEW_FILES'] as $source => $target) { /* @@ -245,7 +245,7 @@ class portal_upload } foreach (scandir($dir) as $item) - { + { if ($item == '.' || $item == '..') { continue; diff --git a/includes/trim_message/bbcodes.php b/includes/trim_message/bbcodes.php index 09d8e4e5..63100d17 100644 --- a/includes/trim_message/bbcodes.php +++ b/includes/trim_message/bbcodes.php @@ -175,7 +175,6 @@ class phpbb_trim_message_bbcodes $this->is_sensitive = true; } - $this->open_bbcode($bbcode_tag, $this->cur_position); $this->cur_position += utf8_strlen($exploded_parts[0]) + $bbcode_end_length; $this->bbcode_action($bbcode_tag, 'open_end', $this->cur_position); @@ -376,7 +375,7 @@ class phpbb_trim_message_bbcodes { break; } - + if (($smiley_code = utf8_substr($content, $last_html_opening + 7, ($last_html_closing - $last_html_opening - 11))) != '--') { if ($last_smiley == $smiley_code) diff --git a/language/de/modules/portal_announcements_module.php b/language/de/modules/portal_announcements_module.php index 58ddfd58..08879011 100644 --- a/language/de/modules/portal_announcements_module.php +++ b/language/de/modules/portal_announcements_module.php @@ -70,5 +70,5 @@ $lang = array_merge($lang, array( 'PORTAL_ANNOUNCEMENTS_ARCHIVE' => 'Das Archivsystem für die Bekanntmachungen aktivieren', 'PORTAL_ANNOUNCEMENTS_ARCHIVE_EXP' => 'Wenn aktiviert, wird das Archivsystem und ggf. Seitenzahlen angezeigt.', 'PORTAL_SHOW_REPLIES_VIEWS' => '"Antworten" und "Zugriffe" in Extraspalten', - 'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.
Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.', + 'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.
Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.', )); diff --git a/language/de/modules/portal_attachments_module.php b/language/de/modules/portal_attachments_module.php index ec1a0d0c..a3164459 100644 --- a/language/de/modules/portal_attachments_module.php +++ b/language/de/modules/portal_attachments_module.php @@ -50,5 +50,5 @@ $lang = array_merge($lang, array( 'PORTAL_ATTACHMENTS_FILETYPE' => 'Dateitypen', 'PORTAL_ATTACHMENTS_FILETYPE_EXP' => 'Falls "Dateitypen ausschließen" auf "Ja" steht, wähle die Dateitypen die du ausschließen willst.
Falls "Dateitypen ausschließen" auf "Nein" steht, wähle die Dateitypen die du sehen willst.
Wähle mehrere Foren aus/ab, indem du beim Klicken die Strg-Taste drückst.', 'PORTAL_ATTACHMENTS_EXCLUDE' => 'Dateitypen ausschließen', - 'PORTAL_ATTACHMENTS_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Dateitypen vom Dateianhänge-Block ausschließen willst, und "Nein" wenn du nur die ausgewählten Dateitypen im Dateianhänge-Block sehen willst.', + 'PORTAL_ATTACHMENTS_EXCLUDE_EXP' => 'Wähle "Ja" wenn du die ausgewählten Dateitypen vom Dateianhänge-Block ausschließen willst, und "Nein" wenn du nur die ausgewählten Dateitypen im Dateianhänge-Block sehen willst.', )); diff --git a/language/de/modules/portal_birthday_list_module.php b/language/de/modules/portal_birthday_list_module.php index f553d6b4..c97fa691 100644 --- a/language/de/modules/portal_birthday_list_module.php +++ b/language/de/modules/portal_birthday_list_module.php @@ -40,5 +40,5 @@ $lang = array_merge($lang, array( 'ACP_PORTAL_BIRTHDAYS_SETTINGS_EXP' => 'Hier kannst du die Einstellungen für den Geburtstage-Block ändern.', 'PORTAL_BIRTHDAYS' => 'Geburtstage', 'PORTAL_BIRTHDAYS_AHEAD' => 'Anstehende Geburtstage', - 'PORTAL_BIRTHDAYS_AHEAD_EXP' => 'Zeitraum für die Geburtstagsvorschau (Tage).
"0" deaktiviert die Anzeige der bevorstehenden Geburtstage.', + 'PORTAL_BIRTHDAYS_AHEAD_EXP' => 'Zeitraum für die Geburtstagsvorschau (Tage).
"0" deaktiviert die Anzeige der bevorstehenden Geburtstage.', )); diff --git a/language/de/modules/portal_links_module.php b/language/de/modules/portal_links_module.php index 657a98d2..71d4c496 100644 --- a/language/de/modules/portal_links_module.php +++ b/language/de/modules/portal_links_module.php @@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang)) // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( 'PORTAL_LINKS' => 'Links', - 'LINKS_NO_LINKS' => 'Keine Links vorhanden', + 'LINKS_NO_LINKS' => 'Keine Links vorhanden', // ACP 'ACP_PORTAL_LINKS' => 'Links-Einstellungen', diff --git a/language/de/modules/portal_news_module.php b/language/de/modules/portal_news_module.php index f7680829..e6de3430 100644 --- a/language/de/modules/portal_news_module.php +++ b/language/de/modules/portal_news_module.php @@ -66,5 +66,5 @@ $lang = array_merge($lang, array( 'PORTAL_NEWS_ARCHIVE' => 'Das Archivsystem für die aktuellen Beiträge aktivieren', 'PORTAL_NEWS_ARCHIVE_EXP' => 'Wenn aktiviert, wird das Archivsystem und ggf. Seitenzahlen angezeigt.', 'PORTAL_SHOW_REPLIES_VIEWS' => '"Antworten" und "Zugriffe" in Extraspalten', - 'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.
Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.', + 'PORTAL_SHOW_REPLIES_VIEWS_EXP' => 'Einstellung für den kompakter Bekanntmachungen-Block-Stil.
Wenn aktiviert, wird die Anzahl der Antworten und Zugriffe in gesonderten Spalten angezeigt. Wenn deaktiviert gibt es nur zwei Spalten und die Antworten und Zugriffe werden neben "Forum" angezeigt. Bei Darstellungsproblemen mit z.B. schmalen Styles bitte deaktivieren.', )); diff --git a/language/en/modules/portal_links_module.php b/language/en/modules/portal_links_module.php index e39cc6b2..1fd18016 100644 --- a/language/en/modules/portal_links_module.php +++ b/language/en/modules/portal_links_module.php @@ -33,7 +33,7 @@ if (empty($lang) || !is_array($lang)) // in a url you again do not need to specify an order e.g., 'Click %sHERE%s' is fine $lang = array_merge($lang, array( 'PORTAL_LINKS' => 'Links', - 'LINKS_NO_LINKS' => 'No links', + 'LINKS_NO_LINKS' => 'No links', // ACP 'ACP_PORTAL_LINKS' => 'Link Settings', diff --git a/language/en/modules/portal_main_menu_module.php b/language/en/modules/portal_main_menu_module.php index 8e16eaaa..6ab2acca 100644 --- a/language/en/modules/portal_main_menu_module.php +++ b/language/en/modules/portal_main_menu_module.php @@ -40,7 +40,7 @@ $lang = array_merge($lang, array( 'M_TERMS' => 'Terms of use', 'M_PRV' => 'Privacy policy', 'M_SEARCH' => 'Search', - 'MENU_NO_LINKS' => 'No links', + 'MENU_NO_LINKS' => 'No links', // ACP 'ACP_PORTAL_MENU' => 'Menu settings', diff --git a/modules/announcements.php b/modules/announcements.php index 436c0e32..ae32da5d 100644 --- a/modules/announcements.php +++ b/modules/announcements.php @@ -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']) : '', diff --git a/modules/calendar.php b/modules/calendar.php index 04b312b9..880d90c8 100644 --- a/modules/calendar.php +++ b/modules/calendar.php @@ -629,7 +629,7 @@ class calendar extends module_base return; - break; + break; } for ($i = 0; $i < sizeof($events); $i++) diff --git a/modules/custom.php b/modules/custom.php index ea5cf3c7..ab2e04ca 100644 --- a/modules/custom.php +++ b/modules/custom.php @@ -342,7 +342,7 @@ class custom extends module_base display_custom_bbcodes(); $this->user->add_lang('posting'); - break; + break; } } diff --git a/modules/links.php b/modules/links.php index ead19f0a..19523ba2 100644 --- a/modules/links.php +++ b/modules/links.php @@ -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); } } diff --git a/modules/main_menu.php b/modules/main_menu.php index 810dbfa9..bb7d0572 100644 --- a/modules/main_menu.php +++ b/modules/main_menu.php @@ -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); } } diff --git a/modules/news.php b/modules/news.php index 0ba00d91..29cd8bba 100644 --- a/modules/news.php +++ b/modules/news.php @@ -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, diff --git a/modules/stylechanger.php b/modules/stylechanger.php index 05a6b7d7..3f7bcfe9 100644 --- a/modules/stylechanger.php +++ b/modules/stylechanger.php @@ -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']), diff --git a/modules/user_menu.php b/modules/user_menu.php index 8b80b860..a9afb419 100644 --- a/modules/user_menu.php +++ b/modules/user_menu.php @@ -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']; diff --git a/modules/welcome.php b/modules/welcome.php index ec316e6f..493affd8 100644 --- a/modules/welcome.php +++ b/modules/welcome.php @@ -247,7 +247,7 @@ class welcome extends module_base display_custom_bbcodes(); $this->user->add_lang('posting'); - break; + break; } }