mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 21:38:54 +00:00
some fixes
git-svn-id: file:///svn/phpbb/trunk@6538 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7e55e53d10
commit
c44f6ca080
10 changed files with 71 additions and 23 deletions
|
@ -27,10 +27,17 @@
|
|||
<dt><label>{L_FIELD_TYPE}:</label><br /><span>{L_FIELD_TYPE_EXPLAIN}</span></dt>
|
||||
<dd><b>{FIELD_TYPE}</b></dd>
|
||||
</dl>
|
||||
<!-- IF S_EDIT_MODE -->
|
||||
<dl>
|
||||
<dt><label>{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
|
||||
<dd><input type="hidden" name="field_ident" value="{FIELD_IDENT}" /><strong>{FIELD_IDENT}</strong></dd>
|
||||
</dl>
|
||||
<!-- ELSE -->
|
||||
<dl>
|
||||
<dt><label for="field_ident">{L_FIELD_IDENT}:</label><br /><span>{L_FIELD_IDENT_EXPLAIN}</span></dt>
|
||||
<dd><input class="medium" type="text" id="field_ident" name="field_ident" value="{FIELD_IDENT}" /></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label for="field_no_view">{L_DISPLAY_PROFILE_FIELD}:</label><br /><span>{L_DISPLAY_PROFILE_FIELD_EXPLAIN}</span></dt>
|
||||
<dd><input type="radio" class="radio" id="field_no_view" name="field_no_view" value="0"<!-- IF not S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="field_no_view" value="1"<!-- IF S_FIELD_NO_VIEW --> checked="checked"<!-- ENDIF --> /> {L_NO}</dd>
|
||||
|
|
|
@ -1741,7 +1741,12 @@ class acp_users
|
|||
$s_sort_dir .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
|
||||
}
|
||||
|
||||
$order_by = $sk_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
|
||||
if (!isset($sk_sql[$sort_key]))
|
||||
{
|
||||
$sort_key = 'a';
|
||||
}
|
||||
|
||||
$order_by = $sk_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
|
||||
|
||||
$sql = 'SELECT COUNT(attach_id) as num_attachments
|
||||
FROM ' . ATTACHMENTS_TABLE . "
|
||||
|
|
|
@ -78,11 +78,17 @@ class ucp_attachments
|
|||
$s_sort_dir .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
|
||||
}
|
||||
|
||||
if (!isset($sort_key_sql[$sort_key]))
|
||||
{
|
||||
$sort_key = 'a';
|
||||
}
|
||||
|
||||
$order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
|
||||
|
||||
$sql = 'SELECT COUNT(attach_id) as num_attachments
|
||||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE poster_id = ' . $user->data['user_id'];
|
||||
WHERE poster_id = ' . $user->data['user_id'] . '
|
||||
AND is_orphan = 0';
|
||||
$result = $db->sql_query($sql);
|
||||
$num_attachments = $db->sql_fetchfield('num_attachments');
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -92,6 +98,7 @@ class ucp_attachments
|
|||
LEFT JOIN ' . TOPICS_TABLE . ' t ON (a.topic_id = t.topic_id AND a.in_message = 0)
|
||||
LEFT JOIN ' . PRIVMSGS_TABLE . ' p ON (a.post_msg_id = p.msg_id AND a.in_message = 1)
|
||||
WHERE a.poster_id = ' . $user->data['user_id'] . "
|
||||
AND a.is_orphan = 0
|
||||
ORDER BY $order_by";
|
||||
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
|
||||
|
||||
|
|
|
@ -77,12 +77,21 @@ class ucp_confirm
|
|||
|
||||
if ($change_lang)
|
||||
{
|
||||
$lang = $change_lang;
|
||||
$user->lang_name = $lang = $change_lang;
|
||||
$user->lang_path = $phpbb_root_path . 'language/' . $lang . '/';
|
||||
$user->lang = array();
|
||||
$user->add_lang(array('common', 'ucp'));
|
||||
$change_lang = basename($change_lang);
|
||||
|
||||
if (file_exists($phpbb_root_path . 'language/' . $change_lang . '/'))
|
||||
{
|
||||
$user->lang_name = $lang = $change_lang;
|
||||
$user->lang_path = $phpbb_root_path . 'language/' . $lang . '/';
|
||||
$user->lang = array();
|
||||
$user->add_lang(array('common', 'ucp'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$change_lang = '';
|
||||
}
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'includes/captcha/captcha_gd.' . $phpEx);
|
||||
$policy = $policy_modules[array_rand($policy_modules)];
|
||||
}
|
||||
|
|
|
@ -479,6 +479,11 @@ function message_options($id, $mode, $global_privmsgs_rules, $global_rule_condit
|
|||
}
|
||||
|
||||
// Check
|
||||
if (!isset($global_privmsgs_rules[$check_option]))
|
||||
{
|
||||
$check_option = 0;
|
||||
}
|
||||
|
||||
define_check_option(($check_option && !isset($back['rule'])) ? true : false, $check_option, $check_lang);
|
||||
|
||||
if ($check_option && !isset($back['rule']))
|
||||
|
|
|
@ -440,8 +440,6 @@ function get_pm_from($folder_id, $folder, $user_id)
|
|||
$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 's' => $user->lang['SUBJECT']);
|
||||
$sort_by_sql = array('a' => 'u.username', 't' => 'p.message_time', 's' => 'p.message_subject');
|
||||
|
||||
$sort_key = (!in_array($sort_key, array('a', 't', 's'))) ? 't' : $sort_key;
|
||||
|
||||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
||||
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ $lang = array_merge($lang, array(
|
|||
'GROUP_RESIGNED_PENDING' => 'Your pending membership was successfully removed from the selected group',
|
||||
'GROUP_TYPE' => 'Group type',
|
||||
'GROUP_UNDISCLOSED' => 'Hidden group',
|
||||
'FORUM_UNDISCLOSED' => 'Moderating hidden forum(s)',
|
||||
|
||||
'LOGIN_EXPLAIN_GROUP' => 'You need to login to view group details',
|
||||
|
||||
|
|
|
@ -52,7 +52,8 @@ switch ($mode)
|
|||
$start = request_var('start', 0);
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
$sort_key = request_var('sk', 'c');
|
||||
$default_key = 'c';
|
||||
$sort_key = request_var('sk', $default_key);
|
||||
$sort_dir = request_var('sd', 'a');
|
||||
|
||||
|
||||
|
@ -168,6 +169,7 @@ switch ($mode)
|
|||
}
|
||||
|
||||
$s_forum_select = '';
|
||||
$undisclosed_forum = false;
|
||||
|
||||
if (isset($forum_id_ary[$row['user_id']]))
|
||||
{
|
||||
|
@ -175,14 +177,28 @@ switch ($mode)
|
|||
{
|
||||
foreach ($forum_id_ary[$row['user_id']] as $forum_id)
|
||||
{
|
||||
if (isset($forums[$forum_id]) && $auth->acl_get('f_list', $forum_id))
|
||||
if (isset($forums[$forum_id]))
|
||||
{
|
||||
$s_forum_select .= '<option value="">' . $forums[$forum_id] . '</option>';
|
||||
if ($auth->acl_get('f_list', $forum_id))
|
||||
{
|
||||
$s_forum_select .= '<option value="">' . $forums[$forum_id] . '</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$undisclosed_forum = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If the mod is only moderating non-viewable forums let us display this circumstance
|
||||
// instead of saying they are moderating all forums
|
||||
if (!$s_forum_select && $undisclosed_forum)
|
||||
{
|
||||
$s_forum_select = $user->lang['FORUM_UNDISCLOSED'];
|
||||
}
|
||||
|
||||
if ($row['group_type'] == GROUP_HIDDEN && !$auth->acl_gets('a_group', 'a_groupadd', 'a_groupdel') && $row['ug_user_id'] != $user->data['user_id'])
|
||||
{
|
||||
$group_name = $user->lang['GROUP_UNDISCLOSED'];
|
||||
|
@ -1049,6 +1065,11 @@ switch ($mode)
|
|||
}
|
||||
|
||||
// Sorting and order
|
||||
if (!isset($sort_key_sql[$sort_key]))
|
||||
{
|
||||
$sort_key = $default_key;
|
||||
}
|
||||
|
||||
$order_by .= $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
|
||||
|
||||
// Count the users ...
|
||||
|
|
|
@ -194,8 +194,6 @@ $limit_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7
|
|||
$sort_by_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']);
|
||||
$sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
|
||||
|
||||
$sort_key = (!in_array($sort_key, array('a', 't', 'r', 's', 'v'))) ? 't' : $sort_key;
|
||||
|
||||
$s_limit_days = $s_sort_key = $s_sort_dir = $u_sort_param = '';
|
||||
gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir, $u_sort_param);
|
||||
|
||||
|
@ -225,15 +223,7 @@ if ($sort_days)
|
|||
}
|
||||
else
|
||||
{
|
||||
if ($auth->acl_get('m_approve', $forum_id))
|
||||
{
|
||||
$topics_count = ($forum_data['forum_topics_real']) ? $forum_data['forum_topics_real'] : 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$topics_count = ($forum_data['forum_topics']) ? $forum_data['forum_topics'] : 1;
|
||||
}
|
||||
|
||||
$topics_count = ($auth->acl_get('m_approve', $forum_id)) ? $forum_data['forum_topics_real'] : $forum_data['forum_topics'];
|
||||
$sql_limit_time = '';
|
||||
}
|
||||
|
||||
|
|
|
@ -33,6 +33,11 @@ $sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['
|
|||
$sort_key_sql = array('a' => 'u.username', 'b' => 's.session_time', 'c' => 's.session_page');
|
||||
|
||||
// Sorting and order
|
||||
if (!isset($sort_key_text[$sort_key]))
|
||||
{
|
||||
$sort_key = 'b';
|
||||
}
|
||||
|
||||
$order_by = $sort_key_sql[$sort_key] . ' ' . (($sort_dir == 'a') ? 'ASC' : 'DESC');
|
||||
|
||||
// Whois requested
|
||||
|
|
Loading…
Add table
Reference in a new issue