Merge commit 'release-3.0.6-RC3'

This commit is contained in:
Nils Adermann 2010-03-02 01:05:41 +01:00
commit 6ebc26e330
30 changed files with 156 additions and 140 deletions

View file

@ -1,11 +1,13 @@
<!-- INCLUDE overall_header.html --> <!-- 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}"> <form id="confirm" method="post" action="{S_COPY_ACTION}">
<fieldset> <fieldset>
<h1>{L_COPY_PERMISSIONS}</h1>
<p>{L_COPY_PERMISSIONS_EXPLAIN}</p>
<p>{L_ACL_LINK}</p>
<dl> <dl>
<dt><label for="forum_perm_from">{L_COPY_PERMISSIONS}:</label><br /><span>{L_COPY_PERMISSIONS_EXPLAIN}</span></dt> <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> <dd><select id="forum_perm_from" name="forum_perm_from"><option value="0">{L_NO_PERMISSIONS}</option>{S_FORUM_OPTIONS}</select></dd>
@ -13,7 +15,6 @@
<div style="text-align: center;">{S_FORM_TOKEN}{S_HIDDEN_FIELDS} <div style="text-align: center;">{S_FORM_TOKEN}{S_HIDDEN_FIELDS}
<input type="submit" name="update" value="{L_CONTINUE}" class="button2" />&nbsp; <input type="submit" name="update" value="{L_CONTINUE}" class="button2" />&nbsp;
</div> </div>
</fieldset> </fieldset>
</form> </form>

View file

@ -195,7 +195,6 @@ li {
width: 76%; width: 76%;
margin: 0 0 0 3%; margin: 0 0 0 3%;
min-height: 350px; min-height: 350px;
overflow-x: auto;
} }
.rtl #main { .rtl #main {
@ -205,7 +204,6 @@ li {
* html #main { * html #main {
height: 350px; height: 350px;
overflow-x: visible;
} }
#page-body.simple-page-body { #page-body.simple-page-body {

View file

@ -1,13 +1,21 @@
<!-- IF S_RECAPTCHA_AVAILABLE --> <!-- IF S_RECAPTCHA_AVAILABLE -->
<dl> <dl>
<dd> <dd>
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"> <script type="text/javascript">
// <![CDATA[ // <![CDATA[
var RecaptchaOptions = { var RecaptchaOptions = {
lang : {L_RECAPTCHA_LANG} lang : '{L_RECAPTCHA_LANG}',
}; };
// ]]> // ]]>
</script> </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> <noscript>

View file

@ -796,6 +796,7 @@ function get_schema_struct()
'poster_ip' => array('INDEX', 'poster_ip'), 'poster_ip' => array('INDEX', 'poster_ip'),
'poster_id' => array('INDEX', 'poster_id'), 'poster_id' => array('INDEX', 'poster_id'),
'post_approved' => array('INDEX', 'post_approved'), 'post_approved' => array('INDEX', 'post_approved'),
'post_username' => array('INDEX', 'post_username'),
'tid_post_time' => array('INDEX', array('topic_id', 'post_time')), 'tid_post_time' => array('INDEX', array('topic_id', 'post_time')),
), ),
); );

View file

@ -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] 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] 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] 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] 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] 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> <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] Make sure only logs for existing users are displayed and user-specific logs removed on user deletion. (Bug #49855)</li>
<li>[Fix] Only show &quot;Add friend&quot; and &quot;Add foe&quot; links if the specific module is enabled. (Bug #50475)</li> <li>[Fix] Only show &quot;Add friend&quot; and &quot;Add foe&quot; 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] 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 &quot;split topics&quot;, &quot;merge topics&quot; and &quot;merge posts&quot;. (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] 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] 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> <li>[Fix] Send activation email when activating user from user settings. (Bug #43145)</li>

View file

@ -196,7 +196,7 @@ foreach ($item_vars as $row)
echo '<p>' . $user->lang['STATISTICS'] . ': ' . $row['statistics'] . '</p>'; echo '<p>' . $user->lang['STATISTICS'] . ': ' . $row['statistics'] . '</p>';
} }
echo '<hr /></div>' . "\n" . ']]></content>' . "\n"; echo '<hr />' . "\n" . ']]></content>' . "\n";
echo '</entry>' . "\n"; echo '</entry>' . "\n";
} }
@ -450,7 +450,7 @@ class phpbb_feed
$this->sql = array(); $this->sql = array();
// Set some values for pagination // Set some values for pagination
$this->num_items = $config['feed_limit']; $this->num_items = (int) $config['feed_limit'];
$this->set_keys(); $this->set_keys();
} }
@ -828,7 +828,7 @@ class phpbb_feed_forums extends phpbb_feed
$this->set('date', 'forum_last_post_time'); $this->set('date', 'forum_last_post_time');
$this->set('options', 'forum_desc_options'); $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() function open()

View file

@ -193,18 +193,19 @@ class acp_forums
$cache->destroy('sql', FORUMS_TABLE); $cache->destroy('sql', FORUMS_TABLE);
// Copy permissions? // Copy permissions?
if (!empty($forum_perm_from) && $forum_perm_from != $forum_data['forum_id'] && 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')))) ($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); copy_forum_permissions($forum_perm_from, $forum_data['forum_id'], ($action == 'edit') ? true : false);
cache_moderators(); 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); $this->copy_permission_page($forum_data);
return; return;
} }
*/
$auth->acl_clear_prefetch(); $auth->acl_clear_prefetch();
$acl_url = '&amp;mode=setting_forum_local&amp;forum_id[]=' . $forum_data['forum_id']; $acl_url = '&amp;mode=setting_forum_local&amp;forum_id[]=' . $forum_data['forum_id'];
@ -1919,6 +1920,7 @@ class acp_forums
/** /**
* Display copy permission page * 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) function copy_permission_page($forum_data)
{ {

View file

@ -509,6 +509,14 @@ class acp_profile
// Get the number of options if this key is 'field_maxlen' // Get the number of options if this key is 'field_maxlen'
$var = request_var('field_default_value', 0); $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; $cp->vars[$key] = $var;
} }

View file

@ -39,6 +39,11 @@ class acp_update
$info = obtain_latest_version_info(request_var('versioncheck_force', false), true); $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); $info = explode("\n", $info);
$latest_version = trim($info[0]); $latest_version = trim($info[0]);

View file

@ -1023,7 +1023,7 @@ class acp_users
'U_WHOIS' => $this->u_action . "&amp;action=whois&amp;user_ip={$user_row['user_ip']}", 'U_WHOIS' => $this->u_action . "&amp;action=whois&amp;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_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&amp;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&amp;u={$user_row['user_id']}&amp;hash=" . generate_link_hash('switchperm')) : '',
'POSTS_IN_QUEUE' => $user_row['posts_in_queue'], 'POSTS_IN_QUEUE' => $user_row['posts_in_queue'],
'USER' => $user_row['username'], 'USER' => $user_row['username'],

View file

@ -350,6 +350,11 @@ class phpbb_captcha_qa
$error = ''; $error = '';
if (!sizeof($this->question_ids))
{
return false;
}
if (!$this->confirm_id) if (!$this->confirm_id)
{ {
$error = $user->lang['CONFIRM_QUESTION_WRONG']; $error = $user->lang['CONFIRM_QUESTION_WRONG'];
@ -388,6 +393,11 @@ class phpbb_captcha_qa
{ {
global $db, $user; global $db, $user;
if (!sizeof($this->question_ids))
{
return false;
}
$this->confirm_id = md5(unique_id($user->ip)); $this->confirm_id = md5(unique_id($user->ip));
$this->question = (int) array_rand($this->question_ids); $this->question = (int) array_rand($this->question_ids);
@ -410,6 +420,11 @@ class phpbb_captcha_qa
{ {
global $db, $user; global $db, $user;
if (!sizeof($this->question_ids))
{
return false;
}
$this->question = (int) array_rand($this->question_ids); $this->question = (int) array_rand($this->question_ids);
$this->solved = 0; $this->solved = 0;
@ -450,6 +465,11 @@ class phpbb_captcha_qa
{ {
global $db, $user; global $db, $user;
if (!sizeof($this->question_ids))
{
return false;
}
$sql = 'SELECT con.question_id, attempts, question_text, strict $sql = 'SELECT con.question_id, attempts, question_text, strict
FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' con, ' . CAPTCHA_QUESTIONS_TABLE . " qes FROM ' . CAPTCHA_QA_CONFIRM_TABLE . ' con, ' . CAPTCHA_QUESTIONS_TABLE . " qes
WHERE con.question_id = qes.question_id WHERE con.question_id = qes.question_id

View file

@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
*/ */
// phpBB Version // phpBB Version
define('PHPBB_VERSION', '3.0.6-RC2'); define('PHPBB_VERSION', '3.0.6-RC3');
// QA-related // QA-related
// define('PHPBB_QA', 1); // define('PHPBB_QA', 1);

View file

@ -624,7 +624,7 @@ class custom_profile
} }
else 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; $value = NULL;
} }

View file

@ -2832,11 +2832,11 @@ function group_user_del($group_id, $user_id_ary = false, $username_ary = false,
if ($config['coppa_enable']) 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 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 // We need both username and user_id info

View file

@ -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. // 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... // 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_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 ' . 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_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 ' . 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 // 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 . '&amp;t=' . $to_topic_id) . '">', '</a>'); $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 . '&amp;t=' . $to_topic_id) . '">', '</a>');

View file

@ -813,7 +813,14 @@ function mcp_delete_topic($topic_ids)
foreach ($data as $topic_id => $row) 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); $return = delete_topics('topic_id', $topic_ids);
@ -897,7 +904,8 @@ function mcp_delete_post($post_ids)
foreach ($post_data as $id => $row) 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 // Now delete the posts, topics and forums are automatically resync'ed

View file

@ -504,45 +504,6 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
// Update forum statistics // Update forum statistics
set_config_count('num_topics', 1, true); 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 // 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'] . '&amp;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 . '&amp;t=' . $to_topic_id) . '">', '</a>'); $return_link = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $post_info['forum_id'] . '&amp;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 . '&amp;t=' . $to_topic_id) . '">', '</a>');
} }
@ -636,65 +597,17 @@ function merge_posts($topic_id, $to_topic_id)
if ($row) 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'] . '&amp;t=' . $topic_id) . '">', '</a>'); $return_link .= sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'f=' . $row['forum_id'] . '&amp;t=' . $topic_id) . '">', '</a>');
} }
else else
{ {
// If the topic no longer exist, we will update the topic watch table. // 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... // 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_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 ' . 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_return_on_error(false);
$db->sql_query('DELETE FROM ' . TOPICS_WATCH_TABLE . ' WHERE topic_id = ' . (int) $topic_id); $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 // Link to the new topic

View file

@ -152,6 +152,7 @@ class template
function destroy() function destroy()
{ {
$this->_tpldata = array('.' => array(0 => array())); $this->_tpldata = array('.' => array(0 => array()));
$this->_rootref = &$this->_tpldata['.'][0];
} }
/** /**
@ -248,8 +249,13 @@ class template
{ {
global $user, $phpEx, $config; 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; $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; $recompile = false;
if (!file_exists($filename) || @filesize($filename) === 0) if (!file_exists($filename) || @filesize($filename) === 0)

View file

@ -122,6 +122,7 @@ class ucp_pm
// trigger_error('NO_AUTH_SEND_MESSAGE'); // trigger_error('NO_AUTH_SEND_MESSAGE');
$template->assign_vars(array( $template->assign_vars(array(
'S_NO_AUTH_SEND_MESSAGE' => true, 'S_NO_AUTH_SEND_MESSAGE' => true,
'S_COMPOSE_PM_VIEW' => true,
)); ));
$tpl_file = 'ucp_pm_viewfolder'; $tpl_file = 'ucp_pm_viewfolder';

View file

@ -811,7 +811,7 @@ function compose_pm($id, $mode, $action)
} }
// Decode text for message display // 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); $message_parser->decode_message($bbcode_uid);

View file

@ -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)), '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'), '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'), 'S_NO_AUTH_SEND_MESSAGE' => !$auth->acl_get('u_sendpm'),

View file

@ -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. // Enter any version to update from to test updates. The version within the db will not be updated.
$debug_from_version = false; $debug_from_version = false;
@ -883,6 +883,8 @@ function database_update_info()
LOG_TABLE => array('log_time'), 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 // No changes from 3.0.6-RC1 to 3.0.6-RC2
case '3.0.6-RC1': case '3.0.6-RC1':
break; 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;
} }
} }

View file

@ -262,6 +262,16 @@ class install_update extends module
$template->assign_var('PACKAGE_VERSION', $this->update_info['version']['to']); $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; break;
case 'update_db': case 'update_db':

View file

@ -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 ('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_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 ('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_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');

View file

@ -2,7 +2,7 @@ Subject: Report deleted - "{PM_SUBJECT}"
Hello {USERNAME}, 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} {EMAIL_SIG}

View file

@ -12,16 +12,22 @@
<dl> <dl>
<dt><label>{L_CONFIRM_CODE}</label>:<br /><span>{L_RECAPTCHA_EXPLAIN}</span></dt> <dt><label>{L_CONFIRM_CODE}</label>:<br /><span>{L_RECAPTCHA_EXPLAIN}</span></dt>
<dd> <dd>
<script type="text/javascript">
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}">
// <![CDATA[ // <![CDATA[
var RecaptchaOptions = { var RecaptchaOptions = {
lang : {L_RECAPTCHA_LANG}, lang : '{L_RECAPTCHA_LANG}',
tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF --> tabindex : <!-- IF $CAPTCHA_TAB_INDEX -->{$CAPTCHA_TAB_INDEX}<!-- ELSE -->10<!-- ENDIF -->
}; };
// ]]> // ]]>
</script> </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> <noscript>
<div> <div>
<object data="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" type="text/html" height="300" width="500"></object><br /> <object data="{RECAPTCHA_SERVER}/noscript?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}" type="text/html" height="300" width="500"></object><br />

View file

@ -82,10 +82,14 @@
<!-- END messagerow --> <!-- END messagerow -->
</ul> </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 --> <!-- 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 --> <!-- ENDIF -->
<!-- IF FOLDER_CUR_MESSAGES neq 0 --> <!-- IF FOLDER_CUR_MESSAGES neq 0 -->

View file

@ -5,12 +5,21 @@
<tr> <tr>
<td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_RECAPTCHA_EXPLAIN}</span></td> <td class="row1"><b class="genmed">{L_CONFIRM_CODE}:</b><br /><span class="gensmall">{L_RECAPTCHA_EXPLAIN}</span></td>
<td class="row2"> <td class="row2">
<script type="text/javascript" src="{RECAPTCHA_SERVER}/challenge?k={RECAPTCHA_PUBKEY}{RECAPTCHA_ERRORGET}"> <script type="text/javascript">
// <![CDATA[ // <![CDATA[
var RecaptchaOptions = { 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> </script>
<noscript> <noscript>

View file

@ -92,7 +92,13 @@
</tr> </tr>
<!-- BEGINELSE --> <!-- BEGINELSE -->
<tr> <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> </tr>
<!-- END messagerow --> <!-- END messagerow -->
</table> </table>