diff options
-rw-r--r-- | phpBB/assets/javascript/core.js | 8 | ||||
-rw-r--r-- | phpBB/common.php | 5 | ||||
-rw-r--r-- | phpBB/cron.php | 8 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 9 | ||||
-rw-r--r-- | phpBB/includes/functions_content.php | 26 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 82 | ||||
-rw-r--r-- | phpBB/memberlist.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/extension/manager.php | 9 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/overall_header.html | 4 | ||||
-rw-r--r-- | phpBB/styles/prosilver/theme/bidi.css | 15 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/overall_header.html | 4 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/search_results.html | 2 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/ucp_main_bookmarks.html | 2 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/ucp_main_front.html | 2 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/ucp_main_subscribed.html | 8 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/viewforum_body.html | 2 | ||||
-rw-r--r-- | phpBB/viewforum.php | 1 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 1 | ||||
-rw-r--r-- | tests/functional/visibility_reapprove_test.php | 3 |
19 files changed, 131 insertions, 62 deletions
diff --git a/phpBB/assets/javascript/core.js b/phpBB/assets/javascript/core.js index cd633ed2ae..9eba80542c 100644 --- a/phpBB/assets/javascript/core.js +++ b/phpBB/assets/javascript/core.js @@ -84,8 +84,8 @@ phpbb.alert = function(title, msg, fadedark) { e.stopPropagation(); }); - $(document).bind('keydown', function(e) { - if (e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) { + $(document).keydown(function(e) { + if ((e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) && dark.is(':visible')) { dark.trigger('click'); e.preventDefault(); @@ -333,7 +333,9 @@ phpbb.ajaxify = function(options) { // Hide the alert even if we refresh the page, in case the user // presses the back button. dark.fadeOut(phpbb.alertTime, function() { - alert.hide(); + if (typeof alert !== 'undefined') { + alert.hide(); + } }); }, res.REFRESH_DATA.time * 1000); // Server specifies time in seconds } diff --git a/phpBB/common.php b/phpBB/common.php index 4ad669a021..d8375d365b 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -108,11 +108,6 @@ foreach ($phpbb_hook_finder->find() as $hook) @include($phpbb_root_path . 'includes/hooks/' . $hook . '.' . $phpEx); } -if (!$config['use_system_cron']) -{ - $cron = $phpbb_container->get('cron.manager'); -} - /** * Main event which is triggered on every page * diff --git a/phpBB/cron.php b/phpBB/cron.php index 787183f689..f63642faa2 100644 --- a/phpBB/cron.php +++ b/phpBB/cron.php @@ -59,11 +59,7 @@ function do_cron($cron_lock, $run_tasks) // // If DEBUG is defined and cron lock cannot be obtained, a message will be printed. -if ($config['use_system_cron']) -{ - $cron = $phpbb_container->get('cron.manager'); -} -else +if (!$config['use_system_cron']) { $cron_type = request_var('cron_type', ''); @@ -74,6 +70,8 @@ else $cron_lock = $phpbb_container->get('cron.lock_db'); if ($cron_lock->acquire()) { + $cron = $phpbb_container->get('cron.manager'); + if ($config['use_system_cron']) { $run_tasks = $cron->find_all_ready_tasks(); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 49568bb1b2..d613c87728 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -5095,7 +5095,7 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = // Call cron-type script $call_cron = false; - if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot']) + if (!defined('IN_CRON') && !$config['use_system_cron'] && $run_cron && !$config['board_disable'] && !$user->data['is_bot'] && !$cache->get('cron.lock_check')) { $call_cron = true; $time_now = (!empty($user->time_now) && is_int($user->time_now)) ? $user->time_now : time(); @@ -5116,7 +5116,8 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = // Call cron job? if ($call_cron) { - global $cron; + global $phpbb_container; + $cron = $phpbb_container->get('cron.manager'); $task = $cron->find_one_ready_task(); if ($task) @@ -5124,6 +5125,10 @@ function page_footer($run_cron = true, $display_template = true, $exit_handler = $url = $task->get_url(); $template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="cron" />'); } + else + { + $cache->put('cron.lock_check', true, 300); + } } if ($display_template) diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index d56f02dd09..01d540620a 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -1348,7 +1348,8 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', // Return colour if ($mode == 'colour') { - return $username_colour; + $username_string = $username_colour; + break; } // no break; @@ -1368,7 +1369,8 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', // Return username if ($mode == 'username') { - return $username; + $username_string = $username; + break; } // no break; @@ -1389,19 +1391,23 @@ function get_username_string($mode, $user_id, $username, $username_colour = '', // Return profile if ($mode == 'profile') { - return $profile_url; + $username_string = $profile_url; + break; } // no break; } - - if (($mode == 'full' && !$profile_url) || $mode == 'no_profile') - { - $username_string = str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']); - } - else + + if (!isset($username_string)) { - $username_string = str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']); + if (($mode == 'full' && !$profile_url) || $mode == 'no_profile') + { + $username_string = str_replace(array('{USERNAME_COLOUR}', '{USERNAME}'), array($username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_noprofile'] : $_profile_cache['tpl_noprofile_colour']); + } + else + { + $username_string = str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), (!$username_colour) ? $_profile_cache['tpl_profile'] : $_profile_cache['tpl_profile_colour']); + } } /** diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index a71bc997e9..5f96d5952b 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -578,6 +578,7 @@ class mcp_queue $redirect = reapply_sid($redirect); $success_msg = $post_url = ''; $approve_log = array(); + $num_topics = 0; $s_hidden_fields = build_hidden_fields(array( 'i' => $id, @@ -634,11 +635,6 @@ class mcp_queue $phpbb_content_visibility->set_post_visibility(ITEM_APPROVED, $topic_data['posts'], $topic_id, $topic_data['forum_id'], $user->data['user_id'], time(), '', isset($topic_data['first_post']), isset($topic_data['last_post'])); } - if (sizeof($post_info) >= 1) - { - $success_msg = (sizeof($post_info) == 1) ? 'POST_' . strtoupper($action) . 'D_SUCCESS' : 'POSTS_' . strtoupper($action) . 'D_SUCCESS'; - } - foreach ($approve_log as $log_data) { add_log('mod', $log_data['forum_id'], $log_data['topic_id'], 'LOG_POST_' . strtoupper($action) . 'D', $log_data['post_subject']); @@ -656,21 +652,32 @@ class mcp_queue if (!$post_data['topic_posts_approved']) { $phpbb_notifications->delete_notifications('topic_in_queue', $post_data['topic_id']); + + if ($post_data['post_visibility'] == ITEM_UNAPPROVED) + { + $phpbb_notifications->add_notifications(array('topic'), $post_data); + } + if ($post_data['post_visibility'] != ITEM_APPROVED) + { + $num_topics++; + } } - $phpbb_notifications->delete_notifications('post_in_queue', $post_id); - - // Only add notifications, if we are not reapproving post - // When the topic was already approved, but was edited and - // now needs re-approval, we don't want to notify the users - // again. - if ($post_data['post_visibility'] == ITEM_UNAPPROVED) + else { - $phpbb_notifications->add_notifications(array( - 'quote', - 'bookmark', - 'post', - ), $post_data); + // Only add notifications, if we are not reapproving post + // When the topic was already approved, but was edited and + // now needs re-approval, we don't want to notify the users + // again. + if ($post_data['post_visibility'] == ITEM_UNAPPROVED) + { + $phpbb_notifications->add_notifications(array( + 'bookmark', + 'post', + ), $post_data); + } } + $phpbb_notifications->add_notifications(array('quote'), $post_data); + $phpbb_notifications->delete_notifications('post_in_queue', $post_id); $phpbb_notifications->mark_notifications_read(array( 'quote', @@ -686,11 +693,27 @@ class mcp_queue continue; } - $phpbb_notifications->add_notifications('approve_post', $post_data); + if (!$post_data['topic_posts_approved']) + { + $phpbb_notifications->add_notifications('approve_post', $post_data); + } + else + { + $phpbb_notifications->add_notifications('approve_topic', $post_data); + } } } } + if ($num_topics >= 1) + { + $success_msg = ($num_topics == 1) ? 'TOPIC_' . strtoupper($action) . 'D_SUCCESS' : 'TOPICS_' . strtoupper($action) . 'D_SUCCESS'; + } + else + { + $success_msg = (sizeof($post_info) == 1) ? 'POST_' . strtoupper($action) . 'D_SUCCESS' : 'POSTS_' . strtoupper($action) . 'D_SUCCESS'; + } + meta_refresh(3, $redirect); $message = $user->lang[$success_msg]; @@ -721,14 +744,14 @@ class mcp_queue { foreach ($post_info as $post_data) { - if ($post_data['poster_id'] == ANONYMOUS) + if (!$post_data['topic_posts_approved']) { - continue; + $num_topics++; } - else + + if (!$show_notify && $post_data['poster_id'] != ANONYMOUS) { $show_notify = true; - break; } } } @@ -738,7 +761,18 @@ class mcp_queue 'S_' . strtoupper($action) => true, )); - confirm_box(false, strtoupper($action) . '_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'), $s_hidden_fields, 'mcp_approve.html'); + // Create the confirm box message + $action_msg = strtoupper($action); + $num_posts = sizeof($post_id_list) - $num_topics; + if ($num_topics > 0 && $num_posts <= 0) + { + $action_msg .= '_TOPIC' . (($num_topics == 1) ? '' : 'S'); + } + else + { + $action_msg .= '_POST' . ((sizeof($post_id_list) == 1) ? '' : 'S'); + } + confirm_box(false, $action_msg, $s_hidden_fields, 'mcp_approve.html'); } redirect($redirect); @@ -834,7 +868,7 @@ class mcp_queue 'post_subject' => $topic_data['topic_title'], 'post_time' => $topic_data['topic_time'], 'poster_id' => $topic_data['topic_poster'], - 'username' => $topic_data['topic_first_poster_name'], + 'post_username' => $topic_data['topic_first_poster_name'], )); $phpbb_notifications->delete_notifications('topic_in_queue', $topic_id); diff --git a/phpBB/memberlist.php b/phpBB/memberlist.php index 137cb0e7fa..2001c816eb 100644 --- a/phpBB/memberlist.php +++ b/phpBB/memberlist.php @@ -677,6 +677,8 @@ switch ($mode) 'U_ADD_FOE' => (!$friend && !$foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&mode=foes&add=' . urlencode(htmlspecialchars_decode($member['username']))) : '', 'U_REMOVE_FRIEND' => ($friend && $friends_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&usernames[]=' . $user_id) : '', 'U_REMOVE_FOE' => ($foe && $foes_enabled) ? append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=zebra&remove=1&mode=foes&usernames[]=' . $user_id) : '', + + 'U_CANONICAL' => generate_board_url() . '/' . append_sid("memberlist.$phpEx", 'mode=viewprofile&u=' . $user_id, true, ''), )); if (!empty($profile_fields['row'])) diff --git a/phpBB/phpbb/extension/manager.php b/phpBB/phpbb/extension/manager.php index b22fbf07a6..604f680af2 100644 --- a/phpBB/phpbb/extension/manager.php +++ b/phpBB/phpbb/extension/manager.php @@ -409,8 +409,13 @@ class manager } $iterator = new \RecursiveIteratorIterator( - new \RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \FilesystemIterator::NEW_CURRENT_AND_KEY | \FilesystemIterator::FOLLOW_SYMLINKS), - \RecursiveIteratorIterator::SELF_FIRST); + new \phpbb\recursive_dot_prefix_filter_iterator( + new \RecursiveDirectoryIterator($this->phpbb_root_path . 'ext/', \FilesystemIterator::NEW_CURRENT_AND_KEY | \FilesystemIterator::FOLLOW_SYMLINKS) + ), + \RecursiveIteratorIterator::SELF_FIRST + ); + $iterator->setMaxDepth(2); + foreach ($iterator as $file_info) { if ($file_info->isFile() && $file_info->getFilename() == 'ext.' . $this->php_ext) diff --git a/phpBB/styles/prosilver/template/overall_header.html b/phpBB/styles/prosilver/template/overall_header.html index 353ba9139a..8c63ce9cea 100644 --- a/phpBB/styles/prosilver/template/overall_header.html +++ b/phpBB/styles/prosilver/template/overall_header.html @@ -18,6 +18,10 @@ <!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&t={S_TOPIC_ID}" /><!-- ENDIF --> <!-- ENDIF --> +<!-- IF U_CANONICAL --> + <link rel="canonical" href="{U_CANONICAL}" /> +<!-- ENDIF --> + <!-- phpBB style name: prosilver Based on style: prosilver (this is the default phpBB3 style) diff --git a/phpBB/styles/prosilver/theme/bidi.css b/phpBB/styles/prosilver/theme/bidi.css index 0d5e1cf829..c2d15b9ef2 100644 --- a/phpBB/styles/prosilver/theme/bidi.css +++ b/phpBB/styles/prosilver/theme/bidi.css @@ -112,6 +112,12 @@ padding-right: 10px; } +/* Responsive breadcrumbs +----------------------------------------*/ +.rtl .breadcrumbs .crumb { + float: right; +} + /* Table styles ----------------------------------------*/ .rtl table.table1 thead th { @@ -289,7 +295,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { .rtl ul.topiclist dt, .rtl li.header dt { float: right; margin-right: 0; - margin-left: -410px; + margin-left: -440px; } .rtl ul.topiclist.missing-column dt { @@ -309,7 +315,7 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { .rtl ul.topiclist dt .list-inner { margin-right: 0; - margin-left: 410px; + margin-left: 440px; } .rtl ul.topiclist.missing-column dt .list-inner { @@ -338,6 +344,11 @@ ul.linklist li.small-icon > a, ul.linklist li.breadcrumbs span:first-child > a { border-left: none; } +.rtl ul.topiclist dfn { + left: auto; + right: -999px; +} + .rtl ul.topiclist li.row dt a.subforum { padding-right: 12px; background-position: right; diff --git a/phpBB/styles/subsilver2/template/overall_header.html b/phpBB/styles/subsilver2/template/overall_header.html index 0d3e727ecd..b4a2fa5b59 100644 --- a/phpBB/styles/subsilver2/template/overall_header.html +++ b/phpBB/styles/subsilver2/template/overall_header.html @@ -17,6 +17,10 @@ <!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&t={S_TOPIC_ID}" /><!-- ENDIF --> <!-- ENDIF --> +<!-- IF U_CANONICAL --> + <link rel="canonical" href="{U_CANONICAL}" /> +<!-- ENDIF --> + <link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" /> <link rel="stylesheet" href="{T_STYLESHEET_LANG_LINK}" type="text/css" /> diff --git a/phpBB/styles/subsilver2/template/search_results.html b/phpBB/styles/subsilver2/template/search_results.html index 319e37d710..3649bb9633 100644 --- a/phpBB/styles/subsilver2/template/search_results.html +++ b/phpBB/styles/subsilver2/template/search_results.html @@ -37,7 +37,7 @@ <td class="row1"> <!-- EVENT topiclist_row_prepend --> <!-- IF searchresults.S_UNREAD_TOPIC --><a href="{searchresults.U_NEWEST_POST}" class="imageset">{NEWEST_POST_IMG}</a><!-- ENDIF --> - {searchresults.ATTACH_ICON_IMG} <a href="<!-- IF not S_IS_BOT and searchresults.S_UNREAD_TOPIC -->{searchresults.U_NEWEST_POST}<!-- ELSE -->{searchresults.U_VIEW_TOPIC}<!-- ENDIF -->" class="topictitle">{searchresults.TOPIC_TITLE}</a> + {searchresults.ATTACH_ICON_IMG} <a href="{searchresults.U_VIEW_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a> <!-- IF searchresults.S_TOPIC_UNAPPROVED or searchresults.S_POSTS_UNAPPROVED --> <a href="{searchresults.U_MCP_QUEUE}" class="imageset">{searchresults.UNAPPROVED_IMG}</a> <!-- ENDIF --> diff --git a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html index a8c6b4a9a8..e91417503f 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html +++ b/phpBB/styles/subsilver2/template/ucp_main_bookmarks.html @@ -41,7 +41,7 @@ <td class="postdetails" style="padding: 4px" width="100%" colspan="2">{L_DELETED_TOPIC}</td> <!-- ELSE --> <td style="padding: 4px;" width="100%" valign="top"> - <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="<!-- IF topicrow.S_UNREAD_TOPIC -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_VIEW_TOPIC}<!-- ENDIF -->">{topicrow.TOPIC_TITLE}</a></p> + <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p> <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}{L_COLON} </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF --> <!-- IF .topicrow.pagination --> <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON} diff --git a/phpBB/styles/subsilver2/template/ucp_main_front.html b/phpBB/styles/subsilver2/template/ucp_main_front.html index bc26266bef..5dea2b4f03 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_front.html +++ b/phpBB/styles/subsilver2/template/ucp_main_front.html @@ -16,7 +16,7 @@ <!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <td class="row1" width="25" align="center">{topicrow.TOPIC_FOLDER_IMG}</td> <td class="row1" width="100%"> - <p class="topictitle"><!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="<!-- IF topicrow.S_UNREAD -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_VIEW_TOPIC}<!-- ENDIF -->">{topicrow.TOPIC_TITLE}</a></p><p class="gensmall">{topicrow.GOTO_PAGE}</p> + <p class="topictitle"><!-- IF topicrow.S_UNREAD --><a href="{topicrow.U_NEWEST_POST}">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a></p><p class="gensmall">{topicrow.GOTO_PAGE}</p> </td> <td class="row1" width="120" align="center" nowrap="nowrap"> <p class="topicdetails">{topicrow.LAST_POST_TIME}</p> diff --git a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html index 9de44dd9ed..c6ae1b6cab 100644 --- a/phpBB/styles/subsilver2/template/ucp_main_subscribed.html +++ b/phpBB/styles/subsilver2/template/ucp_main_subscribed.html @@ -50,14 +50,16 @@ <!-- IF topicrow.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> <td style="padding: 4px;" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td> <td style="padding: 4px;" width="100%" valign="top"> - <p class="topictitle"><!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="imageset">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG} <a href="<!-- IF topicrow.S_UNREAD_TOPIC -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_VIEW_TOPIC}<!-- ENDIF -->">{topicrow.TOPIC_TITLE}</a></p> + <p class="topictitle"> + <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="imageset">{NEWEST_POST_IMG}</a> <!-- ENDIF -->{topicrow.ATTACH_ICON_IMG}<a href="{topicrow.U_VIEW_TOPIC}">{topicrow.TOPIC_TITLE}</a> + </p> <!-- IF topicrow.S_GLOBAL_TOPIC --><span class="gensmall">{L_GLOBAL_ANNOUNCEMENT}</span><!-- ELSE --><span class="gensmall"><b>{L_FORUM}{L_COLON} </b><a href="{topicrow.U_VIEW_FORUM}">{topicrow.FORUM_NAME}</a></span><!-- ENDIF --> <!-- IF .topicrow.pagination --> - <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON} + <p class="gensmall"> [ {GOTO_PAGE_IMG}{L_GOTO_PAGE}{L_COLON} <!-- BEGIN pagination --> <!-- IF topicrow.pagination.S_IS_PREV --> <!-- ELSEIF topicrow.pagination.S_IS_CURRENT --><strong>{topicrow.pagination.PAGE_NUMBER}</strong> - <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS} + <!-- ELSEIF topicrow.pagination.S_IS_ELLIPSIS --> {L_ELLIPSIS} <!-- ELSEIF topicrow.pagination.S_IS_NEXT --> <!-- ELSE --><a href="{topicrow.pagination.PAGE_URL}">{topicrow.pagination.PAGE_NUMBER}</a> <!-- ENDIF --> diff --git a/phpBB/styles/subsilver2/template/viewforum_body.html b/phpBB/styles/subsilver2/template/viewforum_body.html index a7a130a8df..e34d1807e6 100644 --- a/phpBB/styles/subsilver2/template/viewforum_body.html +++ b/phpBB/styles/subsilver2/template/viewforum_body.html @@ -208,7 +208,7 @@ <!-- EVENT topiclist_row_prepend --> <!-- IF topicrow.S_UNREAD_TOPIC --><a href="{topicrow.U_NEWEST_POST}" class="imageset">{NEWEST_POST_IMG}</a><!-- ENDIF --> {topicrow.ATTACH_ICON_IMG} <!-- IF topicrow.S_HAS_POLL or topicrow.S_TOPIC_MOVED --><b>{topicrow.TOPIC_TYPE}</b> <!-- ENDIF --> - <a title="{L_POSTED}{L_COLON} {topicrow.FIRST_POST_TIME}" href="<!-- IF not S_IS_BOT and topicrow.S_UNREAD_TOPIC -->{topicrow.U_NEWEST_POST}<!-- ELSE -->{topicrow.U_VIEW_TOPIC}<!-- ENDIF -->" class="topictitle">{topicrow.TOPIC_TITLE}</a> + <a title="{L_POSTED}{L_COLON} {topicrow.FIRST_POST_TIME}" href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a> <!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED --> <a href="{topicrow.U_MCP_QUEUE}" class="imageset">{topicrow.UNAPPROVED_IMG}</a> <!-- ENDIF --> diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index f1b0b4df5b..6c7e56cffd 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -366,6 +366,7 @@ $template->assign_vars(array( 'U_MCP' => ($auth->acl_get('m_', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "f=$forum_id&i=main&mode=forum_view", true, $user->session_id) : '', 'U_POST_NEW_TOPIC' => ($auth->acl_get('f_post', $forum_id) || $user->data['user_id'] == ANONYMOUS) ? append_sid("{$phpbb_root_path}posting.$phpEx", 'mode=post&f=' . $forum_id) : '', 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($start == 0) ? '' : "&start=$start")), + 'U_CANONICAL' => generate_board_url() . '/' . append_sid("viewforum.$phpEx", "f=$forum_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($start) ? "&start=$start" : ''), true, ''), 'U_MARK_TOPICS' => ($user->data['is_registered'] || $config['load_anon_lastread']) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'hash=' . generate_link_hash('global') . "&f=$forum_id&mark=topics&mark_time=" . time()) : '', )); diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 95bee9789f..4553917d80 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -642,6 +642,7 @@ $template->assign_vars(array( 'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id", 'U_FORUM' => $server_path, 'U_VIEW_TOPIC' => $viewtopic_url, + 'U_CANONICAL' => generate_board_url() . '/' . append_sid("viewtopic.$phpEx", "t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($start) ? "&start=$start" : ''), true, ''), 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), 'U_VIEW_OLDER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=previous"), 'U_VIEW_NEWER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=next"), diff --git a/tests/functional/visibility_reapprove_test.php b/tests/functional/visibility_reapprove_test.php index 70134ef724..57a1212c57 100644 --- a/tests/functional/visibility_reapprove_test.php +++ b/tests/functional/visibility_reapprove_test.php @@ -208,8 +208,7 @@ class phpbb_functional_visibility_reapprove_test extends phpbb_functional_test_c $crawler = self::submit($form); $form = $crawler->selectButton($this->lang('YES'))->form(); $crawler = self::submit($form); - //@todo $this->assertContainsLang('TOPIC_APPROVED_SUCCESS', $crawler->text()); - $this->assertContainsLang('POST_APPROVED_SUCCESS', $crawler->text()); + $this->assertContainsLang('TOPIC_APPROVED_SUCCESS', $crawler->text()); $this->assert_forum_details($this->data['forums']['Reapprove Test #1'], array( 'forum_posts_approved' => 3, |