mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
Merge commit 'release-3.0.6'
This commit is contained in:
commit
6606e4bffe
@ -212,6 +212,8 @@
|
||||
<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] 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] 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>
|
||||
|
@ -75,13 +75,6 @@ class acp_forums
|
||||
trigger_error($user->lang['NO_PERMISSION_FORUM_ADD'] . adm_back_link($this->u_action . '&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 . '&parent_id=' . $this->parent_id), E_USER_WARNING);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ if (!defined('IN_PHPBB'))
|
||||
*/
|
||||
|
||||
// phpBB Version
|
||||
define('PHPBB_VERSION', '3.0.6-RC4');
|
||||
define('PHPBB_VERSION', '3.0.6');
|
||||
|
||||
// QA-related
|
||||
// define('PHPBB_QA', 1);
|
||||
|
@ -2361,8 +2361,8 @@ function cache_moderators()
|
||||
'FROM' => array(
|
||||
ACL_OPTIONS_TABLE => 'o',
|
||||
USER_GROUP_TABLE => 'ug',
|
||||
ACL_GROUPS_TABLE => 'a',
|
||||
GROUPS_TABLE => 'g',
|
||||
ACL_GROUPS_TABLE => 'a',
|
||||
),
|
||||
|
||||
'LEFT_JOIN' => array(
|
||||
|
@ -105,6 +105,7 @@ class mcp_queue
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_TOPIC_REVIEW' => true,
|
||||
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
|
||||
'TOPIC_TITLE' => $post_info['topic_title'])
|
||||
);
|
||||
}
|
||||
|
@ -116,6 +116,7 @@ class mcp_reports
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_TOPIC_REVIEW' => true,
|
||||
'S_BBCODE_ALLOWED' => $post_info['enable_bbcode'],
|
||||
'TOPIC_TITLE' => $post_info['topic_title'])
|
||||
);
|
||||
}
|
||||
@ -429,7 +430,7 @@ class mcp_reports
|
||||
'PAGE_NUMBER' => on_page($total, $config['topics_per_page'], $start),
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'TOTAL' => $total,
|
||||
'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
|
||||
'TOTAL_REPORTS' => ($total == 1) ? $user->lang['LIST_REPORT'] : sprintf($user->lang['LIST_REPORTS'], $total),
|
||||
)
|
||||
);
|
||||
|
||||
@ -671,7 +672,7 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
$messenger->send($reporter['user_notify_type']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!$pm)
|
||||
{
|
||||
foreach ($post_info as $post)
|
||||
@ -712,13 +713,13 @@ function close_report($report_id_list, $mode, $action, $pm = false)
|
||||
{
|
||||
$return_forum = sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
|
||||
}
|
||||
|
||||
|
||||
if (sizeof($topic_ids) === 1)
|
||||
{
|
||||
$return_topic = sprintf($user->lang['RETURN_TOPIC'], '<a href="' . append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . current($topic_ids) . '&f=' . current($forum_ids)) . '">', '</a>') . '<br /><br />';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
trigger_error($user->lang[$success_msg] . '<br /><br />' . $return_forum . $return_topic . sprintf($user->lang['RETURN_PAGE'], "<a href=\"$redirect\">", '</a>'));
|
||||
}
|
||||
}
|
||||
|
@ -811,7 +811,7 @@ function compose_pm($id, $mode, $action)
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
||||
|
@ -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.
|
||||
$debug_from_version = false;
|
||||
@ -891,6 +891,8 @@ function database_update_info()
|
||||
'3.0.6-RC2' => array(),
|
||||
// No changes from 3.0.6-RC3 to 3.0.6-RC4
|
||||
'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
|
||||
case '3.0.6-RC3':
|
||||
break;
|
||||
|
||||
// No changes from 3.0.6-RC4 to 3.0.6
|
||||
case '3.0.6-RC4':
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -927,7 +927,7 @@ class install_update extends module
|
||||
{
|
||||
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')
|
||||
|
@ -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-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_gc', '14400');
|
||||
|
||||
|
@ -976,9 +976,11 @@ switch ($mode)
|
||||
$jabber = request_var('jabber', '');
|
||||
$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');
|
||||
$active_select = request_var('active_select', 'lt');
|
||||
$count_select = request_var('count_select', 'eq');
|
||||
|
||||
$joined = explode('-', request_var('joined', ''));
|
||||
$active = explode('-', request_var('active', ''));
|
||||
$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 .= ($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 .= (is_numeric($count)) ? ' 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 .= ($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 .= (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 && 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 && 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 " : '';
|
||||
|
||||
if ($search_group_id)
|
||||
|
@ -95,8 +95,8 @@ switch ($mode)
|
||||
FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f
|
||||
WHERE t.topic_id = $topic_id
|
||||
AND (f.forum_id = t.forum_id
|
||||
OR f.forum_id = $forum_id)
|
||||
AND t.topic_approved = 1";
|
||||
OR f.forum_id = $forum_id)" .
|
||||
(($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1');
|
||||
break;
|
||||
|
||||
case 'quote':
|
||||
@ -125,7 +125,7 @@ switch ($mode)
|
||||
AND u.user_id = p.poster_id
|
||||
AND (f.forum_id = t.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;
|
||||
|
||||
case 'smilies':
|
||||
@ -171,6 +171,13 @@ if (!$post_data)
|
||||
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')
|
||||
{
|
||||
upload_popup($post_data['forum_style']);
|
||||
|
@ -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
|
||||
*/
|
||||
@ -326,8 +359,7 @@ function submit_default_button(event, selector, class_name)
|
||||
if (!event.which && ((event.charCode || event.charCode === 0) ? event.charCode : event.keyCode))
|
||||
event.which = event.charCode || event.keyCode;
|
||||
|
||||
// Keycode is not return, then return. ;)
|
||||
if (event.which != 13)
|
||||
if (phpbb_check_key(event))
|
||||
return true;
|
||||
|
||||
var current = selector['parentNode'];
|
||||
@ -373,6 +405,9 @@ function apply_onkeypress_event()
|
||||
if (!default_button || default_button.length <= 0)
|
||||
return true;
|
||||
|
||||
if (phpbb_check_key(e))
|
||||
return true;
|
||||
|
||||
if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13))
|
||||
{
|
||||
default_button.click();
|
||||
|
@ -1,12 +1,16 @@
|
||||
<script type="text/javascript">
|
||||
// <![CDATA[
|
||||
function hide_qr()
|
||||
function hide_qr(show)
|
||||
{
|
||||
dE('qr_editor_div');
|
||||
dE('qr_showeditor_div');
|
||||
if (show && document.getElementById('qr_editor_div').style.display != 'none')
|
||||
{
|
||||
document.getElementsByName('message')[0].focus();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function init_qr()
|
||||
{
|
||||
@ -62,7 +66,7 @@
|
||||
<input type="submit" accesskey="s" tabindex="6" name="post" value="{L_SUBMIT}" class="button1" />
|
||||
<input type="submit" accesskey="f" tabindex="6" name="full_editor" value="{L_FULL_EDITOR}" class="button2" />
|
||||
</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>
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
</div>
|
||||
@ -71,7 +75,7 @@
|
||||
|
||||
<div class="content">
|
||||
<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>
|
||||
</div>
|
||||
<span class="corners-bottom"><span></span></span></div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user