mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-24 02:48:56 +00:00
fix r10076 for #48615 - Ability to specify amount of time user is able to delete his last post in topic.
Authorised by: AcydBurn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10080 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d7925595dc
commit
139f1d3530
7 changed files with 15 additions and 4 deletions
|
@ -201,7 +201,6 @@
|
|||
<li>[Fix] Sort private messages by message time and not message id. (Bug #50015)</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 "Add friend" and "Add foe" links if the specific module is enabled. (Bug #50475)</li>
|
||||
<li>[Fix] Do not take edit post time into account for determining permission to delete last post in topic. (Bug #48615)</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 topcis", "merge topics" and "merge posts". (Bug #50035)</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>
|
||||
|
@ -234,6 +233,7 @@
|
|||
<li>[Change] Require user to be registered and logged in to search for unread posts if topic read tracking is disabled for guests (Bug #49525)</li>
|
||||
<li>[Change] Allow three-digit hex notation in Color BBcode. (Bug #39965 - Patch by m0rpha)</li>
|
||||
<li>[Change] Simplified login_box() and redirection after login. S_LOGIN_ACTION can now be used on every page. (Bug #50285)</li>
|
||||
<li>[Change] Do not take edit post time into account for determining permission to delete last post in topic. (Bug #48615)</li>
|
||||
<li>[Feature] Add language selection on the registration terms page (Bug #15085 - Patch by leviatan21)</li>
|
||||
<li>[Feature] Backported 3.2 captcha plugins.
|
||||
<ul>
|
||||
|
@ -289,6 +289,7 @@
|
|||
<li>[Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset...</li>
|
||||
<li>[Feature] Added function to generate Email hash. (Bug #49195)</li>
|
||||
<li>[Feature] Style authors are now able to define the default submit button used for form submission on ENTER keypress on forms using more than one. Prosilver uses this for the posting page(s) and registration screen.</li>
|
||||
<li>[Feature] Ability to specify amount of time user is able to delete his last post in topic.</li>
|
||||
</ul>
|
||||
<a name="v304"></a><h3>1.ii. Changes since 3.0.4</h3>
|
||||
|
||||
|
|
|
@ -177,6 +177,7 @@ class acp_board
|
|||
'legend2' => 'POSTING',
|
||||
'bump_type' => false,
|
||||
'edit_time' => array('lang' => 'EDIT_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
||||
'delete_time' => array('lang' => 'DELETE_TIME', 'validate' => 'int:0', 'type' => 'text:5:5', 'explain' => true, 'append' => ' ' . $user->lang['MINUTES']),
|
||||
'display_last_edited' => array('lang' => 'DISPLAY_LAST_EDITED', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
|
||||
'flood_interval' => array('lang' => 'FLOOD_INTERVAL', 'validate' => 'int:0', 'type' => 'text:3:10', 'explain' => true, 'append' => ' ' . $user->lang['SECONDS']),
|
||||
'bump_interval' => array('lang' => 'BUMP_INTERVAL', 'validate' => 'int:0', 'type' => 'custom', 'method' => 'bump_interval', 'explain' => true),
|
||||
|
|
|
@ -1498,6 +1498,11 @@ function change_database_data(&$no_updates, $version)
|
|||
_sql($sql, $errored, $error_ary);
|
||||
}
|
||||
|
||||
if (!isset($config['delete_time']))
|
||||
{
|
||||
set_config('delete_time', $config['edit_time']);
|
||||
}
|
||||
|
||||
$no_updates = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('default_style', '1
|
|||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_last_edited', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('display_order', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('edit_time', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('delete_time', '0');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_check_mx', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable', '1');
|
||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_function_name', 'mail');
|
||||
|
|
|
@ -152,6 +152,8 @@ $lang = array_merge($lang, array(
|
|||
'BUMP_INTERVAL_EXPLAIN' => 'Number of minutes, hours or days between the last post to a topic and the ability to bump this topic.',
|
||||
'CHAR_LIMIT' => 'Maximum characters per post/message',
|
||||
'CHAR_LIMIT_EXPLAIN' => 'The number of characters allowed within a post/private message. Set to 0 for unlimited characters.',
|
||||
'DELETE_TIME' => 'Limit deleting time',
|
||||
'DELETE_TIME_EXPLAIN' => 'Limits the time available to delete a new post. Setting the value to 0 disables this behaviour.',
|
||||
'DISPLAY_LAST_EDITED' => 'Display last edited time information',
|
||||
'DISPLAY_LAST_EDITED_EXPLAIN' => 'Choose if the last edited by information to be displayed on posts.',
|
||||
'EDIT_TIME' => 'Limit editing time',
|
||||
|
|
|
@ -1433,7 +1433,7 @@ $template->assign_vars(array(
|
|||
'S_EDIT_REASON' => ($mode == 'edit' && $auth->acl_get('m_edit', $forum_id)) ? true : false,
|
||||
'S_DISPLAY_USERNAME' => (!$user->data['is_registered'] || ($mode == 'edit' && $post_data['poster_id'] == ANONYMOUS)) ? true : false,
|
||||
'S_SHOW_TOPIC_ICONS' => $s_topic_icons,
|
||||
'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && !$post_data['post_edit_locked']) || $auth->acl_get('m_delete', $forum_id))) ? true : false,
|
||||
'S_DELETE_ALLOWED' => ($mode == 'edit' && (($post_id == $post_data['topic_last_post_id'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id) && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])) || $auth->acl_get('m_delete', $forum_id))) ? true : false,
|
||||
'S_BBCODE_ALLOWED' => $bbcode_status,
|
||||
'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '',
|
||||
'S_SMILIES_ALLOWED' => $smilies_status,
|
||||
|
@ -1545,7 +1545,7 @@ function handle_post_delete($forum_id, $topic_id, $post_id, &$post_data)
|
|||
global $phpbb_root_path, $phpEx;
|
||||
|
||||
// If moderator removing post or user itself removing post, present a confirmation screen
|
||||
if ($auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked']))
|
||||
if ($auth->acl_get('m_delete', $forum_id) || ($post_data['poster_id'] == $user->data['user_id'] && $user->data['is_registered'] && $auth->acl_get('f_delete', $forum_id) && $post_id == $post_data['topic_last_post_id'] && !$post_data['post_edit_locked'] && ($post_data['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time'])))
|
||||
{
|
||||
$s_hidden_fields = build_hidden_fields(array(
|
||||
'p' => $post_id,
|
||||
|
|
|
@ -1476,7 +1476,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
|||
$user->data['user_id'] == $poster_id &&
|
||||
$auth->acl_get('f_delete', $forum_id) &&
|
||||
$topic_data['topic_last_post_id'] == $row['post_id'] &&
|
||||
// we do not want to allowe removal of the last post if a moderator locked it!
|
||||
($row['post_time'] > time() - ($config['delete_time'] * 60) || !$config['delete_time']) &&
|
||||
// we do not want to allow removal of the last post if a moderator locked it!
|
||||
!$row['post_edit_locked']
|
||||
)));
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue