diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 72b94a97b9..04b7c62f88 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -99,6 +99,8 @@
  • [Fix] Don't allow previous/next links for non-existing topics (Bug #15039)
  • [Change] Do not assign converted votes to the first option in a vote.
  • [Fix] Use correct RFC 2822 date format in emails (Bug #15042)
  • +
  • [Fix] Require founder status for sonme actions on founder-only groups (Bug #15119)
  • +
  • [Fix] Allow changing the "now" option of date CPFs (Bug #15111)
  • 1.ii. Changes since 3.0.RC6

    diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 9acfbe41c1..309f5d5e74 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -480,9 +480,9 @@ class acp_profile } else if ($field_type == FIELD_DATE && $key == 'field_default_value') { - $always_now = request_var('always_now', 0); - - if ($always_now || $var == 'now') + $always_now = request_var('always_now', -1); + + if ($always_now == 1 || ($always_now === -1 && $var == 'now')) { $now = getdate(); diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index a05409a007..260acbbc52 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1778,12 +1778,36 @@ class acp_users $user->add_lang(array('groups', 'acp/groups')); $group_id = request_var('g', 0); - + + if ($group_id) + { + // Check the founder only entry for this group to make sure everything is well + $sql = 'SELECT group_founder_manage + FROM ' . GROUPS_TABLE . ' + WHERE group_id = ' . $group_id; + $result = $db->sql_query($sql); + $founder_manage = (int) $db->sql_fetchfield('group_founder_manage'); + $db->sql_freeresult($result); + + if ($user->data['user_type'] != USER_FOUNDER && $founder_manage) + { + trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + } + } + else + { + $founder_manage = 0; + } + switch ($action) { case 'demote': case 'promote': case 'default': + if (!$group_id) + { + trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); + } group_user_attributes($action, $group_id, $user_id); if ($action == 'default') @@ -1836,19 +1860,6 @@ class acp_users trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); } - // Check the founder only entry for this group to make sure everything is well - $sql = 'SELECT group_founder_manage - FROM ' . GROUPS_TABLE . ' - WHERE group_id = ' . $group_id; - $result = $db->sql_query($sql); - $founder_manage = (int) $db->sql_fetchfield('group_founder_manage'); - $db->sql_freeresult($result); - - if ($user->data['user_type'] != USER_FOUNDER && $founder_manage) - { - trigger_error($user->lang['NOT_ALLOWED_MANAGE_GROUP'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING); - } - // Add user/s to group if ($error = group_user_add($group_id, $user_id)) { diff --git a/phpBB/includes/functions_profile_fields.php b/phpBB/includes/functions_profile_fields.php index 97b71823ac..6cccd7ffe5 100644 --- a/phpBB/includes/functions_profile_fields.php +++ b/phpBB/includes/functions_profile_fields.php @@ -1062,8 +1062,15 @@ class custom_profile_admin extends custom_profile 'field_length' => $this->vars['field_length'] ); - $always_now = request_var('always_now', 0); - $s_checked = ($always_now || $this->vars['field_default_value'] == 'now') ? true : false; + $always_now = request_var('always_now', -1); + if ($always_now == -1) + { + $s_checked = ($this->vars['field_default_value'] == 'now') ? true : false; + } + else + { + $s_checked = ($always_now) ? true : false; + } $options = array( 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)),