Merge commit 'release-3.0.6'

This commit is contained in:
Nils Adermann 2010-03-02 01:05:41 +01:00
commit 6606e4bffe
14 changed files with 80 additions and 29 deletions

View file

@ -212,6 +212,8 @@
<li>[Fix] Only check whether forum image exists if forum image is specified. (Bug #51905)</li> <li>[Fix] Only check whether forum image exists if forum image is specified. (Bug #51905)</li>
<li>[Fix] Fixed database updater for changes to columns having default value in MSSQL (adding/dropping constraints).</li> <li>[Fix] Fixed database updater for changes to columns having default value in MSSQL (adding/dropping constraints).</li>
<li>[Fix] Jabber SASL PLAIN authentication failures. (Bug #52995)</li> <li>[Fix] Jabber SASL PLAIN authentication failures. (Bug #52995)</li>
<li>[Fix] Check sort options on memberlist to avoid a general error. (Bug #53655)</li>
<li>[Fix] Fix sql error in cache_moderators() if using postgresql. (Bug #53765)</li>
<li>[Change] Database updater now supports checking for existing/missing indexes.</li> <li>[Change] Database updater now supports checking for existing/missing indexes.</li>
<li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li> <li>[Change] submit_post() now accepts force_approved_state key passed to $data to indicate new posts being approved (true) or unapproved (false).</li>
<li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li> <li>[Change] Change the data format of the default file ACM to be more secure from tampering and have better performance.</li>

View file

@ -75,13 +75,6 @@ class acp_forums
trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING); trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
} }
case 'copy_perm':
if (!(($auth->acl_get('a_fauth') && $auth->acl_get('a_authusers') && $auth->acl_get('a_authgroups') && $auth->acl_get('a_mauth'))))
{
trigger_error($user->lang['NO_PERMISSION_COPY'] . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
}
break; break;
} }

View file

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

View file

@ -2361,8 +2361,8 @@ function cache_moderators()
'FROM' => array( 'FROM' => array(
ACL_OPTIONS_TABLE => 'o', ACL_OPTIONS_TABLE => 'o',
USER_GROUP_TABLE => 'ug', USER_GROUP_TABLE => 'ug',
ACL_GROUPS_TABLE => 'a',
GROUPS_TABLE => 'g', GROUPS_TABLE => 'g',
ACL_GROUPS_TABLE => 'a',
), ),
'LEFT_JOIN' => array( 'LEFT_JOIN' => array(

View file

@ -105,6 +105,7 @@ class mcp_queue
{ {
$template->assign_vars(array( $template->assign_vars(array(
'S_TOPIC_REVIEW' => true, 'S_TOPIC_REVIEW' => true,
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
'TOPIC_TITLE' => $post_info['topic_title']) 'TOPIC_TITLE' => $post_info['topic_title'])
); );
} }

View file

@ -116,6 +116,7 @@ class mcp_reports
{ {
$template->assign_vars(array( $template->assign_vars(array(
'S_TOPIC_REVIEW' => true, 'S_TOPIC_REVIEW' => true,
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
'TOPIC_TITLE' => $post_info['topic_title']) 'TOPIC_TITLE' => $post_info['topic_title'])
); );
} }

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) ? $bbcode_uid : $message_parser->bbcode_uid; $bbcode_uid = (($action == 'quote' || $action == 'forward') && !$preview && !$refresh && (!sizeof($error) || (sizeof($error) && !$submit))) ? $bbcode_uid : $message_parser->bbcode_uid;
$message_parser->decode_message($bbcode_uid); $message_parser->decode_message($bbcode_uid);

View file

@ -8,7 +8,7 @@
* *
*/ */
$updates_to_version = '3.0.6-RC4'; $updates_to_version = '3.0.6';
// 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;
@ -891,6 +891,8 @@ function database_update_info()
'3.0.6-RC2' => array(), '3.0.6-RC2' => array(),
// No changes from 3.0.6-RC3 to 3.0.6-RC4 // No changes from 3.0.6-RC3 to 3.0.6-RC4
'3.0.6-RC3' => array(), '3.0.6-RC3' => array(),
// No changes from 3.0.6-RC4 to 3.0.6
'3.0.6-RC4' => array(),
); );
} }
@ -1559,6 +1561,10 @@ function change_database_data(&$no_updates, $version)
// No changes from 3.0.6-RC3 to 3.0.6-RC4 // No changes from 3.0.6-RC3 to 3.0.6-RC4
case '3.0.6-RC3': case '3.0.6-RC3':
break; break;
// No changes from 3.0.6-RC4 to 3.0.6
case '3.0.6-RC4':
break;
} }
} }

View file

@ -927,7 +927,7 @@ class install_update extends module
{ {
if (function_exists('phpbb_is_writable') && !phpbb_is_writable($phpbb_root_path . 'store/')) if (function_exists('phpbb_is_writable') && !phpbb_is_writable($phpbb_root_path . 'store/'))
{ {
trigger_error(sprintf($user->lang['DIRECTORY_NOT_WRITABLE'], $phpbb_root_path . 'store/'), E_USER_ERROR); trigger_error(sprintf('The directory “%s” is not writable.', $phpbb_root_path . 'store/'), E_USER_ERROR);
} }
if ($use_method == '.zip') if ($use_method == '.zip')

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-RC4'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.6');
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

@ -976,9 +976,11 @@ switch ($mode)
$jabber = request_var('jabber', ''); $jabber = request_var('jabber', '');
$search_group_id = request_var('search_group_id', 0); $search_group_id = request_var('search_group_id', 0);
// when using these, make sure that we actually have values defined in $find_key_match
$joined_select = request_var('joined_select', 'lt'); $joined_select = request_var('joined_select', 'lt');
$active_select = request_var('active_select', 'lt'); $active_select = request_var('active_select', 'lt');
$count_select = request_var('count_select', 'eq'); $count_select = request_var('count_select', 'eq');
$joined = explode('-', request_var('joined', '')); $joined = explode('-', request_var('joined', ''));
$active = explode('-', request_var('active', '')); $active = explode('-', request_var('active', ''));
$count = (request_var('count', '') !== '') ? request_var('count', 0) : ''; $count = (request_var('count', '') !== '') ? request_var('count', 0) : '';
@ -1016,9 +1018,9 @@ switch ($mode)
$sql_where .= ($yahoo) ? ' AND u.user_yim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $yahoo)) . ' ' : ''; $sql_where .= ($yahoo) ? ' AND u.user_yim ' . $db->sql_like_expression(str_replace('*', $db->any_char, $yahoo)) . ' ' : '';
$sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : ''; $sql_where .= ($msn) ? ' AND u.user_msnm ' . $db->sql_like_expression(str_replace('*', $db->any_char, $msn)) . ' ' : '';
$sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : ''; $sql_where .= ($jabber) ? ' AND u.user_jabber ' . $db->sql_like_expression(str_replace('*', $db->any_char, $jabber)) . ' ' : '';
$sql_where .= (is_numeric($count)) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : ''; $sql_where .= (is_numeric($count) && isset($find_key_match[$count_select])) ? ' AND u.user_posts ' . $find_key_match[$count_select] . ' ' . (int) $count . ' ' : '';
$sql_where .= (sizeof($joined) > 1) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : ''; $sql_where .= (sizeof($joined) > 1 && isset($find_key_match[$joined_select])) ? " AND u.user_regdate " . $find_key_match[$joined_select] . ' ' . gmmktime(0, 0, 0, intval($joined[1]), intval($joined[2]), intval($joined[0])) : '';
$sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : ''; $sql_where .= ($auth->acl_get('u_viewonline') && sizeof($active) > 1 && isset($find_key_match[$active_select])) ? " AND u.user_lastvisit " . $find_key_match[$active_select] . ' ' . gmmktime(0, 0, 0, $active[1], intval($active[2]), intval($active[0])) : '';
$sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id AND ug.user_pending = 0 " : ''; $sql_where .= ($search_group_id) ? " AND u.user_id = ug.user_id AND ug.group_id = $search_group_id AND ug.user_pending = 0 " : '';
if ($search_group_id) if ($search_group_id)

View file

@ -95,8 +95,8 @@ switch ($mode)
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
WHERE t.topic_id = $topic_id WHERE t.topic_id = $topic_id
AND (f.forum_id = t.forum_id AND (f.forum_id = t.forum_id
OR f.forum_id = $forum_id) OR f.forum_id = $forum_id)" .
AND t.topic_approved = 1"; (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1');
break; break;
case 'quote': case 'quote':
@ -125,7 +125,7 @@ switch ($mode)
AND u.user_id = p.poster_id AND u.user_id = p.poster_id
AND (f.forum_id = t.forum_id AND (f.forum_id = t.forum_id
OR f.forum_id = $forum_id)" . OR f.forum_id = $forum_id)" .
(($auth->acl_get('m_approve', $forum_id) && $mode != 'quote') ? '' : 'AND p.post_approved = 1'); (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1');
break; break;
case 'smilies': case 'smilies':
@ -171,6 +171,13 @@ if (!$post_data)
trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST'); trigger_error(($mode == 'post' || $mode == 'bump' || $mode == 'reply') ? 'NO_TOPIC' : 'NO_POST');
} }
// Not able to reply to unapproved posts/topics
// TODO: add more descriptive language key
if ($auth->acl_get('m_approve', $forum_id) && ((($mode == 'reply' || $mode == 'bump') && !$post_data['topic_approved']) || ($mode == 'quote' && !$post_data['post_approved'])))
{
trigger_error(($mode == 'reply' || $mode == 'bump') ? 'TOPIC_UNAPPROVED' : 'POST_UNAPPROVED');
}
if ($mode == 'popup') if ($mode == 'popup')
{ {
upload_popup($post_data['forum_style']); upload_popup($post_data['forum_style']);

View file

@ -317,6 +317,39 @@ function find_in_tree(node, tag, type, class_name)
} }
} }
var in_autocomplete = false;
var last_key_entered = '';
/**
* Check event key
*/
function phpbb_check_key(event)
{
// Keycode is array down or up?
if (event.keyCode && (event.keyCode == 40 || event.keyCode == 38))
in_autocomplete = true;
// Make sure we are not within an "autocompletion" field
if (in_autocomplete)
{
// If return pressed and key changed we reset the autocompletion
if (!last_key_entered || last_key_entered == event.which)
{
in_autocompletion = false;
return true;
}
}
// Keycode is not return, then return. ;)
if (event.which != 13)
{
last_key_entered = event.which;
return true;
}
return false;
}
/** /**
* Usually used for onkeypress event, to submit a form on enter * Usually used for onkeypress event, to submit a form on enter
*/ */
@ -326,8 +359,7 @@ function submit_default_button(event, selector, class_name)
if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode)) if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode))
event.which = event.charCode || event.keyCode; event.which = event.charCode || event.keyCode;
// Keycode is not return, then return. ;) if (phpbb_check_key(event))
if (event.which != 13)
return true; return true;
var current = selector['parentNode']; var current = selector['parentNode'];
@ -373,6 +405,9 @@ function apply_onkeypress_event()
if (!default_button || default_button.length <= 0) if (!default_button || default_button.length <= 0)
return true; return true;
if (phpbb_check_key(e))
return true;
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13))
{ {
default_button.click(); default_button.click();

View file

@ -1,9 +1,13 @@
<script type="text/javascript"> <script type="text/javascript">
// <![CDATA[ // <![CDATA[
function hide_qr() function hide_qr(show)
{ {
dE('qr_editor_div'); dE('qr_editor_div');
dE('qr_showeditor_div'); dE('qr_showeditor_div');
if (show && document.getElementById('qr_editor_div').style.display != 'none')
{
document.getElementsByName('message')[0].focus();
}
return true; return true;
} }
@ -62,7 +66,7 @@
<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp; <input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />&nbsp;
<input type="submit" accesskey="f" tabindex="6" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp; <input type="submit" accesskey="f" tabindex="6" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />&nbsp;
</fieldset> </fieldset>
<a href="" class="right-box up" onclick="hide_qr(); return false;" title="{L_COLLAPSE_QR}">{L_COLLAPSE_QR}</a> <a href="" class="right-box up" onclick="hide_qr(false); return false;" title="{L_COLLAPSE_QR}">{L_COLLAPSE_QR}</a>
</div> </div>
<span class="corners-bottom"><span></span></span></div> <span class="corners-bottom"><span></span></span></div>
</div> </div>
@ -71,7 +75,7 @@
<div class="content"> <div class="content">
<fieldset class="submit-buttons"> <fieldset class="submit-buttons">
<input type="submit" name="show_qr" tabindex="1" class="button2" value="{L_SHOW_QR}" onclick="hide_qr();return false;"/> <input type="submit" name="show_qr" tabindex="1" class="button2" value="{L_SHOW_QR}" onclick="hide_qr(true);return false;"/>
</fieldset> </fieldset>
</div> </div>
<span class="corners-bottom"><span></span></span></div> <span class="corners-bottom"><span></span></span></div>