1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 15:45:34 +02:00
#15119


git-svn-id: file:///svn/phpbb/trunk@8236 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Henry Sudhof 2007-11-15 19:54:37 +00:00
parent e5238fc1a9
commit e907def5ff
4 changed files with 39 additions and 19 deletions

View File

@ -99,6 +99,8 @@
<li>[Fix] Don't allow previous/next links for non-existing topics (Bug #15039)</li> <li>[Fix] Don't allow previous/next links for non-existing topics (Bug #15039)</li>
<li>[Change] Do not assign converted votes to the first option in a vote.</li> <li>[Change] Do not assign converted votes to the first option in a vote.</li>
<li>[Fix] Use correct RFC 2822 date format in emails (Bug #15042)</li> <li>[Fix] Use correct RFC 2822 date format in emails (Bug #15042)</li>
<li>[Fix] Require founder status for sonme actions on founder-only groups (Bug #15119)</li>
<li>[Fix] Allow changing the "now" option of date CPFs (Bug #15111)</li>
</ul> </ul>
<a name="v30rc6"></a><h3>1.ii. Changes since 3.0.RC6</h3> <a name="v30rc6"></a><h3>1.ii. Changes since 3.0.RC6</h3>

View File

@ -480,9 +480,9 @@ class acp_profile
} }
else if ($field_type == FIELD_DATE && $key == 'field_default_value') else if ($field_type == FIELD_DATE && $key == 'field_default_value')
{ {
$always_now = request_var('always_now', 0); $always_now = request_var('always_now', -1);
if ($always_now || $var == 'now') if ($always_now == 1 || ($always_now === -1 && $var == 'now'))
{ {
$now = getdate(); $now = getdate();

View File

@ -1778,12 +1778,36 @@ class acp_users
$user->add_lang(array('groups', 'acp/groups')); $user->add_lang(array('groups', 'acp/groups'));
$group_id = request_var('g', 0); $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 . '&amp;u=' . $user_id), E_USER_WARNING);
}
}
else
{
$founder_manage = 0;
}
switch ($action) switch ($action)
{ {
case 'demote': case 'demote':
case 'promote': case 'promote':
case 'default': case 'default':
if (!$group_id)
{
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING);
}
group_user_attributes($action, $group_id, $user_id); group_user_attributes($action, $group_id, $user_id);
if ($action == 'default') if ($action == 'default')
@ -1836,19 +1860,6 @@ class acp_users
trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;u=' . $user_id), E_USER_WARNING); trigger_error($user->lang['NO_GROUP'] . adm_back_link($this->u_action . '&amp;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 . '&amp;u=' . $user_id), E_USER_WARNING);
}
// Add user/s to group // Add user/s to group
if ($error = group_user_add($group_id, $user_id)) if ($error = group_user_add($group_id, $user_id))
{ {

View File

@ -1062,8 +1062,15 @@ class custom_profile_admin extends custom_profile
'field_length' => $this->vars['field_length'] 'field_length' => $this->vars['field_length']
); );
$always_now = request_var('always_now', 0); $always_now = request_var('always_now', -1);
$s_checked = ($always_now || $this->vars['field_default_value'] == 'now') ? true : false; if ($always_now == -1)
{
$s_checked = ($this->vars['field_default_value'] == 'now') ? true : false;
}
else
{
$s_checked = ($always_now) ? true : false;
}
$options = array( $options = array(
0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)), 0 => array('TITLE' => $user->lang['DEFAULT_VALUE'], 'FIELD' => $this->process_field_row('preview', $profile_row)),