mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Move outputting of TO box since it's only relevant to one module and this will ensure it is displayed however that module is loaded [#4866]
git-svn-id: file:///svn/phpbb/trunk@6515 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
1df3ccc836
commit
7470dcf709
2 changed files with 28 additions and 28 deletions
|
@ -66,6 +66,34 @@ function compose_pm($id, $mode, $action)
|
||||||
redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'));
|
redirect(append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Output PM_TO box if message composing
|
||||||
|
if ($action != 'edit')
|
||||||
|
{
|
||||||
|
if ($config['allow_mass_pm'] && $auth->acl_get('u_masspm'))
|
||||||
|
{
|
||||||
|
$sql = 'SELECT group_id, group_name, group_type
|
||||||
|
FROM ' . GROUPS_TABLE . '
|
||||||
|
WHERE group_type NOT IN (' . GROUP_HIDDEN . ', ' . GROUP_CLOSED . ')
|
||||||
|
AND group_receive_pm = 1
|
||||||
|
ORDER BY group_type DESC';
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
|
|
||||||
|
$group_options = '';
|
||||||
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
{
|
||||||
|
$group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="blue"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
||||||
|
}
|
||||||
|
$db->sql_freeresult($result);
|
||||||
|
}
|
||||||
|
|
||||||
|
$template->assign_vars(array(
|
||||||
|
'S_SHOW_PM_BOX' => true,
|
||||||
|
'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false,
|
||||||
|
'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? $group_options : '',
|
||||||
|
'U_SEARCH_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=post&field=username_list'))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$sql = '';
|
$sql = '';
|
||||||
|
|
||||||
// What is all this following SQL for? Well, we need to know
|
// What is all this following SQL for? Well, we need to know
|
||||||
|
|
|
@ -283,34 +283,6 @@ while ($row = $db->sql_fetchrow($result))
|
||||||
}
|
}
|
||||||
$db->sql_freeresult($result);
|
$db->sql_freeresult($result);
|
||||||
|
|
||||||
// Output PM_TO box if message composing
|
|
||||||
if ($mode == 'compose' && $auth->acl_get('u_sendpm') && request_var('action', '') != 'edit')
|
|
||||||
{
|
|
||||||
if ($config['allow_mass_pm'] && $auth->acl_get('u_masspm'))
|
|
||||||
{
|
|
||||||
$sql = 'SELECT group_id, group_name, group_type
|
|
||||||
FROM ' . GROUPS_TABLE . '
|
|
||||||
WHERE group_type NOT IN (' . GROUP_HIDDEN . ', ' . GROUP_CLOSED . ')
|
|
||||||
AND group_receive_pm = 1
|
|
||||||
ORDER BY group_type DESC';
|
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
$group_options = '';
|
|
||||||
while ($row = $db->sql_fetchrow($result))
|
|
||||||
{
|
|
||||||
$group_options .= '<option' . (($row['group_type'] == GROUP_SPECIAL) ? ' class="blue"' : '') . ' value="' . $row['group_id'] . '">' . (($row['group_type'] == GROUP_SPECIAL) ? $user->lang['G_' . $row['group_name']] : $row['group_name']) . '</option>';
|
|
||||||
}
|
|
||||||
$db->sql_freeresult($result);
|
|
||||||
}
|
|
||||||
|
|
||||||
$template->assign_vars(array(
|
|
||||||
'S_SHOW_PM_BOX' => true,
|
|
||||||
'S_ALLOW_MASS_PM' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? true : false,
|
|
||||||
'S_GROUP_OPTIONS' => ($config['allow_mass_pm'] && $auth->acl_get('u_masspm')) ? $group_options : '',
|
|
||||||
'U_SEARCH_USER' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=searchuser&form=post&field=username_list'))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Instantiate module system and generate list of available modules
|
// Instantiate module system and generate list of available modules
|
||||||
$module->list_modules('ucp');
|
$module->list_modules('ucp');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue