diff options
author | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:41 +0100 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2010-03-02 01:05:41 +0100 |
commit | 6ebc26e330d5e204eab0ac9061bb5817534047fe (patch) | |
tree | 417aa508a0b4282ec0ae1834ea02032e7e033d5f | |
parent | f0eb18fffd11a97383c8ccf2ae7d2838939f09e2 (diff) | |
parent | 8d12b40fc4fdf50517e9584d14a5edd311953e7c (diff) | |
download | forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.tar forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.tar.gz forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.tar.bz2 forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.tar.xz forums-6ebc26e330d5e204eab0ac9061bb5817534047fe.zip |
Merge commit 'release-3.0.6-RC3'
30 files changed, 156 insertions, 140 deletions
diff --git a/phpBB/adm/index.php b/phpBB/adm/index.php index b6b251d2fc..26f934f6bf 100644 --- a/phpBB/adm/index.php +++ b/phpBB/adm/index.php @@ -246,7 +246,7 @@ function h_radio($name, &$input_ary, $input_default = false, $id = false, $key = foreach ($input_ary as $value => $title) { $selected = ($input_default !== false && $value == $input_default) ? ' checked="checked"' : ''; - $html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label> '; + $html .= '<label><input type="radio" name="' . $name . '"' . (($id && !$id_assigned) ? ' id="' . $id . '"' : '') . ' value="' . $value . '"' . $selected . (($key) ? ' accesskey="' . $key . '"' : '') . ' class="radio" /> ' . $user->lang[$title] . '</label>'; $id_assigned = true; } diff --git a/phpBB/adm/style/acp_forums_copy_perm.html b/phpBB/adm/style/acp_forums_copy_perm.html index 73d9e70918..acec3c1967 100644 --- a/phpBB/adm/style/acp_forums_copy_perm.html +++ b/phpBB/adm/style/acp_forums_copy_perm.html @@ -1,21 +1,22 @@ <!-- INCLUDE overall_header.html --> +<h1>{L_COPY_PERMISSIONS}</h1> + +<p>{L_COPY_PERMISSIONS_EXPLAIN}</p> +<p>{L_ACL_LINK}</p> + <form id="confirm" method="post" action="{S_COPY_ACTION}"> <fieldset> - <h1>{L_COPY_PERMISSIONS}</h1> - <p>{L_COPY_PERMISSIONS_EXPLAIN}</p> - <p>{L_ACL_LINK}</p> <dl> <dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt> <dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd> </dl> <div style="text-align: center;">{S_FORM_TOKEN}{S_HIDDEN_FIELDS} - <input type="submit" name="update" value="{L_CONTINUE}" class="button2" /> + <input type="submit" name="update" value="{L_CONTINUE}" class="button2" /> </div> - </fieldset> - + </form> <!-- INCLUDE overall_footer.html --> diff --git a/phpBB/adm/style/admin.css b/phpBB/adm/style/admin.css index 9888ad3797..5f1f01c0a9 100644 --- a/phpBB/adm/style/admin.css +++ b/phpBB/adm/style/admin.css @@ -195,7 +195,6 @@ li { width: 76%; margin: 0 0 0 3%; min-height: 350px; - overflow-x: auto; } .rtl #main { @@ -205,7 +204,6 @@ li { * html #main { height: 350px; - overflow-x: visible; } #page-body.simple-page-body { diff --git a/phpBB/adm/style/captcha_recaptcha.html b/phpBB/adm/style/captcha_recaptcha.html index 93fc6e7499..e4fa5dd426 100644 --- a/phpBB/adm/style/captcha_recaptcha.html +++ b/phpBB/adm/style/captcha_recaptcha.html @@ -1,13 +1,21 @@ <!-- IF S_RECAPTCHA_AVAILABLE --> <dl> <dd> - <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"> + <script type="text/javascript"> // <![CDATA[ var RecaptchaOptions = { - lang : {L_RECAPTCHA_LANG} + lang : '{L_RECAPTCHA_LANG}', }; // ]]> </script> + <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"></script> + <script type="text/javascript"> + // <![CDATA[ + <!-- IF S_CONTENT_DIRECTION eq 'rtl' --> + document.getElementById('recaptcha_table').style.direction = 'ltr'; + <!-- ENDIF --> + // ]]> + </script> <noscript> diff --git a/phpBB/develop/mysql_upgrader.php b/phpBB/develop/mysql_upgrader.php index 034c1c0c20..a677f4464b 100644 --- a/phpBB/develop/mysql_upgrader.php +++ b/phpBB/develop/mysql_upgrader.php @@ -796,6 +796,7 @@ function get_schema_struct() 'poster_ip' => array('INDEX', 'poster_ip'), 'poster_id' => array('INDEX', 'poster_id'), 'post_approved' => array('INDEX', 'post_approved'), + 'post_username' => array('INDEX', 'post_username'), 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')), ), ); diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 6a947d259c..756754ddeb 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -94,7 +94,7 @@ <li>[Fix] Show report button in prosilver for guests who are allowed to report posts. (Bug #45695 - Patch by bantu)</li> <li>[Fix] Correctly show private message history (Bug #46065 - Patch by bantu)</li> <li>[Fix] Various XHTML mistakes in prosilver, subsilver2 and the ACP. (Bugs #25545 - Patch by bantu, #26315, #38555, #45505 - Patch by Raimon, #45785, #45865, #47085 - Patch by Raimon)</li> - <li>[Fix] Fix some ACP style issues (Bug #45975 - Patch by leviatan21, Bug #16109 - Patch by prototech)</li> + <li>[Fix] Fix some ACP style issues (Bug #16109 - Patch by prototech)</li> <li>[Fix] Move post bump information markup to the template. (Bug #34295 - Patch by bantu)</li> <li>[Fix] Show error in the ACP when template folder is not readable. (Bug #45705 - Patch by bantu)</li> <li>[Fix] Adjust viewonline filename regular expression to be less strict. (Bug #46215 - Patch by bantu)</li> @@ -202,7 +202,6 @@ <li>[Fix] Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)</li> <li>[Fix] Only show "Add friend" and "Add foe" links if the specific module is enabled. (Bug #50475)</li> <li>[Fix] Correctly display list items in forum description in prosilver and administration. (Bug #48055 - Patch by leviatan21)</li> - <li>[Fix] Fix handling of bookmarks and subscriptions on "split topics", "merge topics" and "merge posts". (Bug #50035)</li> <li>[Fix] Only embed cron.php if there is no cron lock present to reduce overhead. (Bug #45725 - Patch by TerryE)</li> <li>[Fix] Add header gradient back into subsilver2 but keep site logo easily replaceable with smaller and bigger ones. (Bug #11142 - Patch by dark/Rain and Raimon)</li> <li>[Fix] Send activation email when activating user from user settings. (Bug #43145)</li> diff --git a/phpBB/feed.php b/phpBB/feed.php index 9603b27301..88539acbf1 100644 --- a/phpBB/feed.php +++ b/phpBB/feed.php @@ -196,7 +196,7 @@ foreach ($item_vars as $row) echo '<p>' . $user->lang['STATISTICS'] . ': ' . $row['statistics'] . '</p>'; } - echo '<hr /></div>' . "\n" . ']]></content>' . "\n"; + echo '<hr />' . "\n" . ']]></content>' . "\n"; echo '</entry>' . "\n"; } @@ -249,7 +249,7 @@ function feed_generate_content($content, $uid, $bitfield, $options) $content = str_replace('./', $board_url . '/', $content); // Remove "Select all" link and mouse events - $content = str_replace('<a href="#" onclick="selectCode(this); return false;">' .$user->lang['SELECT_ALL_CODE'] . '</a>', '', $content); + $content = str_replace('<a href="#" onclick="selectCode(this); return false;">' . $user->lang['SELECT_ALL_CODE'] . '</a>', '', $content); $content = preg_replace('#(onkeypress|onclick)="(.*?)"#si', '', $content); // Firefox does not support CSS for feeds, though @@ -450,7 +450,7 @@ class phpbb_feed $this->sql = array(); // Set some values for pagination - $this->num_items = $config['feed_limit']; + $this->num_items = (int) $config['feed_limit']; $this->set_keys(); } @@ -828,7 +828,7 @@ class phpbb_feed_forums extends phpbb_feed $this->set('date', 'forum_last_post_time'); $this->set('options', 'forum_desc_options'); - $this->num_items = $config['feed_overall_forums_limit']; + $this->num_items = (int) $config['feed_overall_forums_limit']; } function open() diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 62ccbdb68e..2ff597ee98 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -193,18 +193,19 @@ class acp_forums $cache->destroy('sql', FORUMS_TABLE); // Copy permissions? - if (!empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] && - (($action != 'edit') || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth')))) + if ($forum_perm_from && $forum_perm_from != $forum_data['forum_id'] && + ($action != 'edit' || empty($forum_id) || ($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth')))) { copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false); cache_moderators(); } - else if (($action != 'edit') && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth')) +/* Commented out because of questionable UI workflow - re-visit for 3.0.7 + else if (!$this->parent_id && $action != 'edit' && $auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth')) { $this->copy_permission_page($forum_data); return; } - +*/ $auth->acl_clear_prefetch(); $acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id']; @@ -1919,6 +1920,7 @@ class acp_forums /** * Display copy permission page + * Not used at the moment - we will have a look at it for 3.0.7 */ function copy_permission_page($forum_data) { diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 1b0ec4b5d5..fc08c7e8e8 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -509,6 +509,14 @@ class acp_profile // Get the number of options if this key is 'field_maxlen' $var = request_var('field_default_value', 0); }*/ + else if ($field_type == FIELD_INT && $key == 'field_default_value') + { + // Permit an empty string + if (request_var('field_default_value', '') === '') + { + $var = ''; + } + } $cp->vars[$key] = $var; } diff --git a/phpBB/includes/acp/acp_update.php b/phpBB/includes/acp/acp_update.php index 0d75b7ceb1..3204e0204e 100644 --- a/phpBB/includes/acp/acp_update.php +++ b/phpBB/includes/acp/acp_update.php @@ -39,6 +39,11 @@ class acp_update $info = obtain_latest_version_info(request_var('versioncheck_force', false), true); + if ($info === false) + { + trigger_error('VERSIONCHECK_FAIL', E_USER_WARNING); + } + $info = explode("\n", $info); $latest_version = trim($info[0]); diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 614b58e7a9..afca056eb2 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1023,7 +1023,7 @@ class acp_users 'U_WHOIS' => $this->u_action . "&action=whois&user_ip={$user_row['user_ip']}", 'U_MCP_QUEUE' => ($auth->acl_getf_global('m_approve')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue', true, $user->session_id) : '', - 'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_row['user_id']}") : '', + 'U_SWITCH_PERMISSIONS' => ($auth->acl_get('a_switchperm') && $user->data['user_id'] != $user_row['user_id']) ? append_sid("{$phpbb_root_path}ucp.$phpEx", "mode=switch_perm&u={$user_row['user_id']}&hash=" . generate_link_hash('switchperm')) : '', 'POSTS_IN_QUEUE' => $user_row['posts_in_queue'], 'USER' => $user_row['username'], diff --git a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php index 411d1366fa..c17cfa7bbe 100644 --- a/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php +++ b/phpBB/includes/captcha/plugins/phpbb_captcha_qa_plugin.php @@ -349,7 +349,12 @@ class phpbb_captcha_qa global $config, $db, $user; $error = ''; - + + if (!sizeof($this->question_ids)) + { + return false; + } + if (!$this->confirm_id) { $error = $user->lang['CONFIRM_QUESTION_WRONG']; @@ -388,6 +393,11 @@ class phpbb_captcha_qa { global $db, $user; + + if (!sizeof($this->question_ids)) + { + return false; + } $this->confirm_id = md5(unique_id($user->ip)); $this->question = (int) array_rand($this->question_ids); @@ -409,6 +419,11 @@ class phpbb_captcha_qa function reselect_question() { global $db, $user; + + if (!sizeof($this->question_ids)) + { + return false; + } $this->question = (int) array_rand($this->question_ids); $this->solved = 0; @@ -449,6 +464,11 @@ class phpbb_captcha_qa function load_answer() { global $db, $user; + + if (!sizeof($this->question_ids)) + { + return false; + } $sql = 'SELECT con.question_id, attempts, question_text, strict FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' con, ' . CAPTCHA_QUESTIONS_TABLE . " qes diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 3bb9467bbf..267a0220ed 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -25,7 +25,7 @@ if (!defined('IN_PHPBB')) */ // phpBB Version -define('PHPBB_VERSION', '3.0.6-RC2'); +define('PHPBB_VERSION', '3.0.6-RC3'); // QA-related // define('PHPBB_QA', 1); diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 9e356414a9..db1925bdcc 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -624,7 +624,7 @@ class custom_profile } else { - if (!$preview && isset($user->profile_fields[$user_ident]) && is_null($user->profile_fields[$user_ident])) + if (!$preview && array_key_exists($user_ident, $user->profile_fields) && is_null($user->profile_fields[$user_ident])) { $value = NULL; } diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 7255d138ab..21e82030ee 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -2832,11 +2832,11 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false, if ($config['coppa_enable']) { - $group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED_COPPA', 'REGISTERED', 'BOTS', 'GUESTS'); + $group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'NEWLY_REGISTERED', 'REGISTERED_COPPA', 'REGISTERED', 'BOTS', 'GUESTS'); } else { - $group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'REGISTERED', 'BOTS', 'GUESTS'); + $group_order = array('ADMINISTRATORS', 'GLOBAL_MODERATORS', 'NEWLY_REGISTERED', 'REGISTERED', 'BOTS', 'GUESTS'); } // We need both username and user_id info diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php index acb7aa4ac0..b70601b479 100644 --- a/phpBB/includes/mcp/mcp_forum.php +++ b/phpBB/includes/mcp/mcp_forum.php @@ -416,14 +416,11 @@ function merge_topics($forum_id, $topic_ids, $to_topic_id) // If the topic no longer exist, we will update the topic watch table. // To not let it error out on users watching both topics, we just return on an error... - // Same for Bookmarks $db->sql_return_on_error(true); $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids)); - $db->sql_query('UPDATE ' . BOOKMARKS_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids)); $db->sql_return_on_error(false); $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids)); - $db->sql_query('DELETE FROM ' . BOOKMARKS_TABLE . ' WHERE ' . $db->sql_in_set('topic_id', $topic_ids)); // Link to the new topic $return_link .= (($return_link) ? '<br /><br />' : '') . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>'); diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 6c2ac0b521..50b05e989f 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -813,7 +813,14 @@ function mcp_delete_topic($topic_ids) foreach ($data as $topic_id => $row) { - add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_' . ($row['topic_moved_id'] ? 'SHADOW_' : '') . 'TOPIC', $row['topic_title']); + if ($row['topic_moved_id']) + { + add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_SHADOW_TOPIC', $row['topic_title']); + } + else + { + add_log('mod', $row['forum_id'], $topic_id, 'LOG_DELETE_TOPIC', $row['topic_title'], $row['topic_first_poster_name']); + } } $return = delete_topics('topic_id', $topic_ids); @@ -897,7 +904,8 @@ function mcp_delete_post($post_ids) foreach ($post_data as $id => $row) { - add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject']); + $post_username = ($row['poster_id'] == ANONYMOUS && !empty($row['post_username'])) ? $row['post_username'] : $row['username']; + add_log('mod', $row['forum_id'], $row['topic_id'], 'LOG_DELETE_POST', $row['post_subject'], $post_username); } // Now delete the posts, topics and forums are automatically resync'ed diff --git a/phpBB/includes/mcp/mcp_topic.php b/phpBB/includes/mcp/mcp_topic.php index eb3d6d3970..abdb839e7b 100644 --- a/phpBB/includes/mcp/mcp_topic.php +++ b/phpBB/includes/mcp/mcp_topic.php @@ -504,45 +504,6 @@ function split_topic($action, $topic_id, $to_forum_id, $subject) // Update forum statistics set_config_count('num_topics', 1, true); - // Add new topic to bookmarks - $bookmarks = array(); - $sql = 'SELECT user_id - FROM ' . BOOKMARKS_TABLE . ' - WHERE topic_id = ' . $topic_id; - $result = $db->sql_query($sql); - while ($row = $db->sql_fetchrow($result)) - { - $bookmarks[] = array( - 'user_id' => (int) $row['user_id'], - 'topic_id' => $to_topic_id, - ); - } - $db->sql_freeresult($result); - if (sizeof($bookmarks)) - { - $db->sql_multi_insert(BOOKMARKS_TABLE, $bookmarks); - } - - // Add new topic to watch-list - $notifications = array(); - $sql = 'SELECT user_id, notify_status - FROM ' . TOPICS_WATCH_TABLE . ' - WHERE topic_id = ' . $topic_id; - $result = $db->sql_query($sql); - while ($row = $db->sql_fetchrow($result)) - { - $notifications[] = array( - 'user_id' => (int) $row['user_id'], - 'topic_id' => $to_topic_id, - 'notify_status' => (int) $row['notify_status'], - ); - } - $db->sql_freeresult($result); - if (sizeof($notifications)) - { - $db->sql_multi_insert(TOPICS_WATCH_TABLE, $notifications); - } - // Link back to both topics $return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&t=' . $post_info['topic_id']) . '">', '</a>') . '<br /><br />' . sprintf($user->lang['RETURN_NEW_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $to_forum_id . '&t=' . $to_topic_id) . '">', '</a>'); } @@ -636,65 +597,17 @@ function merge_posts($topic_id, $to_topic_id) if ($row) { - // Add new topic to bookmarks - $bookmarks = array(); - $sql = 'SELECT user_id - FROM ' . BOOKMARKS_TABLE . ' - WHERE topic_id = ' . (int) $topic_id; - $result = $db->sql_query($sql); - while ($row = $db->sql_fetchrow($result)) - { - $bookmarks[] = array( - 'user_id' => (int) $row['user_id'], - 'topic_id' => (int) $to_topic_id, - ); - } - $db->sql_freeresult($result); - if (sizeof($bookmarks)) - { - // To not let it error out on users, who already bookmarked the topic, we just return on an error... - $db->sql_return_on_error(true); - $db->sql_multi_insert(BOOKMARKS_TABLE, $bookmarks); - $db->sql_return_on_error(false); - } - - // Add new topic to notifications - $notifications = array(); - $sql = 'SELECT user_id, notify_status - FROM ' . TOPICS_WATCH_TABLE . ' - WHERE topic_id = ' . (int) $topic_id; - $result = $db->sql_query($sql); - while ($row = $db->sql_fetchrow($result)) - { - $notifications[] = array( - 'user_id' => (int) $row['user_id'], - 'topic_id' => (int) $to_topic_id, - 'notify_status' => (int) $row['notify_status'], - ); - } - $db->sql_freeresult($result); - if (sizeof($notifications)) - { - // To not let it error out on users, who already watch the topic, we just return on an error... - $db->sql_return_on_error(true); - $db->sql_multi_insert(TOPICS_WATCH_TABLE, $notifications); - $db->sql_return_on_error(false); - } - $return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&t=' . $topic_id) . '">', '</a>'); } else { // If the topic no longer exist, we will update the topic watch table. // To not let it error out on users watching both topics, we just return on an error... - // Same for bookmarks $db->sql_return_on_error(true); $db->sql_query('UPDATE ' . TOPICS_WATCH_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE topic_id = ' . (int) $topic_id); - $db->sql_query('UPDATE ' . BOOKMARKS_TABLE . ' SET topic_id = ' . (int) $to_topic_id . ' WHERE topic_id = ' . (int) $topic_id); $db->sql_return_on_error(false); $db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . (int) $topic_id); - $db->sql_query('DELETE FROM ' . BOOKMARKS_TABLE . ' WHERE topic_id = ' . (int) $topic_id); } // Link to the new topic diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index 648af61c00..af5c9d3a47 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -152,6 +152,7 @@ class template function destroy() { $this->_tpldata = array('.' => array(0 => array())); + $this->_rootref = &$this->_tpldata['.'][0]; } /** @@ -248,8 +249,13 @@ class template { global $user, $phpEx, $config; + if (!isset($this->filename[$handle])) + { + trigger_error("template->_tpl_load(): No file specified for handle $handle", E_USER_ERROR); + } + $filename = $this->cachepath . str_replace('/', '.', $this->filename[$handle]) . '.' . $phpEx; - $this->files_template[$handle] = $user->theme['template_id']; + $this->files_template[$handle] = (isset($user->theme['template_id'])) ? $user->theme['template_id'] : 0; $recompile = false; if (!file_exists($filename) || @filesize($filename) === 0) diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index 6ac02c7d0a..e1c51170db 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -122,6 +122,7 @@ class ucp_pm // trigger_error('NO_AUTH_SEND_MESSAGE'); $template->assign_vars(array( 'S_NO_AUTH_SEND_MESSAGE' => true, + 'S_COMPOSE_PM_VIEW' => true, )); $tpl_file = 'ucp_pm_viewfolder'; diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index fba3bfeb32..2f56bcdf7a 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -811,7 +811,7 @@ function compose_pm($id, $mode, $action) } // Decode text for message display - $bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh && !sizeof($error)) ? $bbcode_uid : $message_parser->bbcode_uid; + $bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh) ? $bbcode_uid : $message_parser->bbcode_uid; $message_parser->decode_message($bbcode_uid); diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index 6493b54e1f..33d2c9fb6f 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -432,7 +432,6 @@ function get_pm_from($folder_id, $folder, $user_id) 'TOTAL_MESSAGES' => (($pm_count == 1) ? $user->lang['VIEW_PM_MESSAGE'] : sprintf($user->lang['VIEW_PM_MESSAGES'], $pm_count)), 'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? $user->img('button_topic_locked', 'POST_PM_LOCKED') : $user->img('button_pm_new', 'POST_NEW_PM'), - 'L_NO_MESSAGES' => (!$auth->acl_get('u_sendpm')) ? $user->lang['NO_AUTH_SEND_MESSAGE'] : $user->lang['NO_MESSAGES'], 'S_NO_AUTH_SEND_MESSAGE' => !$auth->acl_get('u_sendpm'), diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php index 7ef76535d3..ce223cf302 100644 --- a/phpBB/install/database_update.php +++ b/phpBB/install/database_update.php @@ -8,7 +8,7 @@ * */ -$updates_to_version = '3.0.6-RC2'; +$updates_to_version = '3.0.6-RC3'; // Enter any version to update from to test updates. The version within the db will not be updated. $debug_from_version = false; @@ -883,6 +883,8 @@ function database_update_info() LOG_TABLE => array('log_time'), ), ), + // No changes from 3.0.6-RC2 to 3.0.6-RC3 + '3.0.6-RC2' => array(), ); } @@ -1513,6 +1515,19 @@ function change_database_data(&$no_updates, $version) // No changes from 3.0.6-RC1 to 3.0.6-RC2 case '3.0.6-RC1': break; + + // Changes from 3.0.6-RC2 to 3.0.6-RC3 + case '3.0.6-RC2': + + // Update the Custom Profile Fields based on previous settings to the new format + $sql = 'UPDATE ' . PROFILE_FIELDS_TABLE . ' + SET field_show_on_vt = 1 + WHERE field_hide = 0 + AND (field_required = 1 OR field_show_on_reg = 1 OR field_show_profile = 1)'; + _sql($sql, $errored, $error_ary); + $no_updates = false; + + break; } } diff --git a/phpBB/install/install_update.php b/phpBB/install/install_update.php index ab7ec35705..6adebc7a64 100644 --- a/phpBB/install/install_update.php +++ b/phpBB/install/install_update.php @@ -262,6 +262,16 @@ class install_update extends module $template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']); } + // Since some people try to update to RC releases, but phpBB.com tells them the last version is the version they currently run + // we are faced with the updater thinking the database schema is up-to-date; which it is, but should be updated none-the-less + // We now try to cope with this by triggering the update process + if (version_compare(str_replace('rc', 'RC', strtolower($this->current_version)), str_replace('rc', 'RC', strtolower($this->update_info['version']['to'])), '<')) + { + $template->assign_vars(array( + 'S_UP_TO_DATE' => false, + )); + } + break; case 'update_db': diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 18bd8d8e9a..312d317b3f 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -239,7 +239,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page', INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.6-RC2'); +INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.6-RC3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); diff --git a/phpBB/language/en/email/pm_report_deleted.txt b/phpBB/language/en/email/pm_report_deleted.txt index 8cb7fdd6fa..a868837841 100644 --- a/phpBB/language/en/email/pm_report_deleted.txt +++ b/phpBB/language/en/email/pm_report_deleted.txt @@ -2,7 +2,7 @@ Subject: Report deleted - "{PM_SUBJECT}" Hello {USERNAME}, -You are receiving this notification because the report you filed regarding the post "{PM_SUBJECT}" at "{SITENAME}" was deleted by a moderator or administrator. +You are receiving this notification because the report you filed regarding the private message "{PM_SUBJECT}" at "{SITENAME}" was deleted by a moderator or administrator. {EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/styles/prosilver/template/captcha_recaptcha.html b/phpBB/styles/prosilver/template/captcha_recaptcha.html index 5ce19b20ec..cc4db0b760 100644 --- a/phpBB/styles/prosilver/template/captcha_recaptcha.html +++ b/phpBB/styles/prosilver/template/captcha_recaptcha.html @@ -12,16 +12,22 @@ <dl> <dt><label>{L_CONFIRM_CODE}</label>:<br /><span>{L_RECAPTCHA_EXPLAIN}</span></dt> <dd> - - <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"> + <script type="text/javascript"> // <![CDATA[ var RecaptchaOptions = { - lang : {L_RECAPTCHA_LANG}, + lang : '{L_RECAPTCHA_LANG}', tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF --> }; // ]]> </script> - + <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"></script> + <script type="text/javascript"> + // <![CDATA[ + <!-- IF S_CONTENT_DIRECTION eq 'rtl' --> + document.getElementById('recaptcha_table').style.direction = 'ltr'; + <!-- ENDIF --> + // ]]> + </script> <noscript> <div> <object data="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" type="text/html" height="300" width="500"></object><br /> diff --git a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html index 05d213f2ed..7b309a74f7 100644 --- a/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/prosilver/template/ucp_pm_viewfolder.html @@ -82,10 +82,14 @@ <!-- END messagerow --> </ul> - <!-- ELSEIF S_NO_AUTH_SEND_MESSAGE --> - <p><strong><!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_AUTH_SEND_MESSAGE}<!-- ENDIF --></p></strong> <!-- ELSE --> - <p><strong>{L_NO_MESSAGES}</strong></p> + <p><strong> + <!-- IF S_COMPOSE_PM_VIEW and S_NO_AUTH_SEND_MESSAGE --> + <!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_AUTH_SEND_MESSAGE}<!-- ENDIF --> + <!-- ELSE --> + {L_NO_MESSAGES} + <!-- ENDIF --> + </strong></p> <!-- ENDIF --> <!-- IF FOLDER_CUR_MESSAGES neq 0 --> diff --git a/phpBB/styles/subsilver2/template/captcha_recaptcha.html b/phpBB/styles/subsilver2/template/captcha_recaptcha.html index d8b06d2c51..cacdbeead7 100644 --- a/phpBB/styles/subsilver2/template/captcha_recaptcha.html +++ b/phpBB/styles/subsilver2/template/captcha_recaptcha.html @@ -5,13 +5,22 @@ <tr> <td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_RECAPTCHA_EXPLAIN}</span></td> <td class="row2"> - <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"> - //<![CDATA[ - var RecaptchaOptions = { - lang : {L_RECAPTCHA_LANG} - }; - // ]]> - </script> + <script type="text/javascript"> + // <![CDATA[ + var RecaptchaOptions = { + lang : '{L_RECAPTCHA_LANG}', + tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF --> + }; + // ]]> + </script> + <script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" ></script> + <script type="text/javascript"> + // <![CDATA[ + <!-- IF S_CONTENT_DIRECTION eq 'rtl' --> + document.getElementById('recaptcha_table').style.direction = 'ltr'; + <!-- ENDIF --> + // ]]> + </script> <noscript> <iframe src="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" height="300" width="500" frameborder="0"></iframe><br /> diff --git a/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html index c86211bc7e..1663502865 100644 --- a/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/subsilver2/template/ucp_pm_viewfolder.html @@ -92,7 +92,13 @@ </tr> <!-- BEGINELSE --> <tr> - <td class="row1" colspan="{$COLSPAN}" height="30" align="center" valign="middle"><span class="gen"><!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_MESSAGES}<!-- ENDIF --></span></td> + <td class="row1" colspan="{$COLSPAN}" height="30" align="center" valign="middle"><span class="gen"> + <!-- IF S_COMPOSE_PM_VIEW and S_NO_AUTH_SEND_MESSAGE --> + <!-- IF S_USER_NEW -->{L_USER_NEW_PERMISSION_DISALLOWED}<!-- ELSE -->{L_NO_AUTH_SEND_MESSAGE}<!-- ENDIF --> + <!-- ELSE --> + {L_NO_MESSAGES} + <!-- ENDIF --> + </span></td> </tr> <!-- END messagerow --> </table> |