1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-01 22:40:39 +02:00

some fixes

git-svn-id: file:///svn/phpbb/trunk@6538 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2006-10-30 16:20:11 +00:00
parent 7e55e53d10
commit c44f6ca080
10 changed files with 71 additions and 23 deletions

View File

@@ -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 . "

View File

@@ -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);

View File

@@ -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)];
}

View File

@@ -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']))

View File

@@ -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);