aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_posting.php26
-rw-r--r--phpBB/includes/session.php3
-rw-r--r--phpBB/includes/ucp/ucp_profile.php2
3 files changed, 14 insertions, 17 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 333dac8b56..6274cdd394 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -1478,24 +1478,22 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
case 'edit_first_post':
case 'edit':
- if (!$auth->acl_get('m_edit', $data['forum_id']) || $data['post_edit_reason'])
- {
- $sql_data[POSTS_TABLE]['sql'] = array(
- 'post_edit_time' => $current_time
- );
-
- $sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1';
- }
-
- // no break
-
case 'edit_last_post':
case 'edit_topic':
- if (($post_mode == 'edit_last_post' || $post_mode == 'edit_topic') && $data['post_edit_reason'])
+ // If edit reason is given always display edit info
+
+ // If editing last post then display no edit info
+ // If m_edit permission then display no edit info
+ // If normal edit display edit info
+
+ // Display edit info if edit reason given or user is editing his post, which is not the last within the topic.
+ if ($data['post_edit_reason'] || (!$auth->acl_get('m_edit', $data['forum_id']) && ($post_mode == 'edit' || $post_mode == 'edit_first_post')))
{
$sql_data[POSTS_TABLE]['sql'] = array(
- 'post_edit_time' => $current_time
+ 'post_edit_time' => $current_time,
+ 'post_edit_reason' => $data['post_edit_reason'],
+ 'post_edit_user' => (int) $data['post_edit_user'],
);
$sql_data[POSTS_TABLE]['stat'][] = 'post_edit_count = post_edit_count + 1';
@@ -1517,8 +1515,6 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll, &$data, $u
'enable_sig' => $data['enable_sig'],
'post_username' => ($username && $data['poster_id'] == ANONYMOUS) ? $username : '',
'post_subject' => $subject,
- 'post_edit_reason' => $data['post_edit_reason'],
- 'post_edit_user' => (int) $data['post_edit_user'],
'post_checksum' => $data['message_md5'],
'post_attachment' => (!empty($data['attachment_data'])) ? 1 : 0,
'bbcode_bitfield' => $data['bbcode_bitfield'],
diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php
index 37b251cdaf..467b9258b6 100644
--- a/phpBB/includes/session.php
+++ b/phpBB/includes/session.php
@@ -198,7 +198,7 @@ class session
$this->load = false;
// Load limit check (if applicable)
- if ($config['limit_load'])
+ if ($config['limit_load'] || $config['limit_search_load'])
{
if ($load = @file_get_contents('/proc/loadavg'))
{
@@ -208,6 +208,7 @@ class session
else
{
set_config('limit_load', '0');
+ set_config('limit_search_load', '0');
}
}
diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php
index e8b37e6b9a..a7ce7ac024 100644
--- a/phpBB/includes/ucp/ucp_profile.php
+++ b/phpBB/includes/ucp/ucp_profile.php
@@ -500,7 +500,7 @@ class ucp_profile
// Build custom bbcodes array
display_custom_bbcodes();
-
+
break;
case 'avatar':