mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
- fixing a bunch of bugs
- moved the install trigger error to sessions and also disabled it for those having DEBUG_EXTRA enabled. i hope not having introduced too many new bugs. git-svn-id: file:///svn/phpbb/trunk@6628 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
5be570b1f0
commit
ab9ec8064a
39 changed files with 289 additions and 120 deletions
|
@ -83,9 +83,15 @@
|
|||
<legend>{L_ACP_USER_OVERVIEW}</legend>
|
||||
<dl>
|
||||
<dt><label for="user">{L_USERNAME}:</label><br /><span>{L_NAME_CHARS_EXPLAIN}</span></dt>
|
||||
<dd><input type="text" id="user" name="user" value="{USER}" /><!-- IF S_USER_INACTIVE --> [{L_USER_IS_INACTIVE}]<!-- ENDIF --></dd>
|
||||
<dd><input type="text" id="user" name="user" value="{USER}" /></dd>
|
||||
<!-- IF U_SWITCH_PERMISSIONS --><dd>[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</dd><!-- ENDIF -->
|
||||
</dl>
|
||||
<!-- IF S_USER_INACTIVE -->
|
||||
<dl>
|
||||
<dt><label>{L_USER_IS_INACTIVE}:</label></dt>
|
||||
<dd><strong>{USER_INACTIVE_REASON}</strong></dd>
|
||||
</dl>
|
||||
<!-- ENDIF -->
|
||||
<dl>
|
||||
<dt><label>{L_REGISTERED}:</label></dt>
|
||||
<dd><strong>{USER_REGISTERED}</strong></dd>
|
||||
|
|
|
@ -199,11 +199,4 @@ unset($dbpasswd);
|
|||
// Grab global variables, re-cache if necessary
|
||||
$config = $cache->obtain_config();
|
||||
|
||||
// Disable board if the install/ directory is still present
|
||||
if (file_exists($phpbb_root_path . 'install') && !defined('ADMIN_START'))
|
||||
{
|
||||
$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
?>
|
|
@ -582,7 +582,8 @@ class acp_modules
|
|||
|
||||
if (!$ignore_acl && $row['module_auth'])
|
||||
{
|
||||
if (!p_master::module_auth($row['module_auth']))
|
||||
// We use zero as the forum id to check - global setting.
|
||||
if (!p_master::module_auth($row['module_auth'], 0))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ class acp_users
|
|||
// Prevent normal users/admins change/view founders if they are not a founder by themselves
|
||||
if ($user->data['user_type'] != USER_FOUNDER && $user_row['user_type'] == USER_FOUNDER)
|
||||
{
|
||||
trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action . '&u=' . $user_id), E_USER_WARNING);
|
||||
trigger_error($user->lang['NOT_MANAGE_FOUNDER'] . adm_back_link($this->u_action), E_USER_WARNING);
|
||||
}
|
||||
|
||||
switch ($mode)
|
||||
|
@ -620,8 +620,8 @@ class acp_users
|
|||
$data = array(
|
||||
'username' => request_var('user', $user_row['username'], true),
|
||||
'user_founder' => request_var('user_founder', ($user_row['user_type'] == USER_FOUNDER) ? 1 : 0),
|
||||
'email' => request_var('user_email', $user_row['user_email']),
|
||||
'email_confirm' => request_var('email_confirm', ''),
|
||||
'email' => strtolower(request_var('user_email', $user_row['user_email'])),
|
||||
'email_confirm' => strtolower(request_var('email_confirm', '')),
|
||||
'user_password' => request_var('user_password', '', true),
|
||||
'password_confirm' => request_var('password_confirm', '', true),
|
||||
'warnings' => request_var('warnings', $user_row['user_warnings']),
|
||||
|
@ -841,6 +841,31 @@ class acp_users
|
|||
|
||||
$last_visit = (!empty($user_row['session_time'])) ? $user_row['session_time'] : $user_row['user_lastvisit'];
|
||||
|
||||
$inactive_reason = '';
|
||||
if ($user_row['user_type'] == USER_INACTIVE)
|
||||
{
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_UNKNOWN'];
|
||||
|
||||
switch ($user_row['user_inactive_reason'])
|
||||
{
|
||||
case INACTIVE_REGISTER:
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_REGISTER'];
|
||||
break;
|
||||
|
||||
case INACTIVE_PROFILE:
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_PROFILE'];
|
||||
break;
|
||||
|
||||
case INACTIVE_MANUAL:
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_MANUAL'];
|
||||
break;
|
||||
|
||||
case INACTIVE_REMIND:
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_REMIND'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_NAME_CHARS_EXPLAIN' => sprintf($user->lang[$user_char_ary[str_replace('\\\\', '\\', $config['allow_name_chars'])] . '_EXPLAIN'], $config['min_name_chars'], $config['max_name_chars']),
|
||||
'L_CHANGE_PASSWORD_EXPLAIN' => sprintf($user->lang[$pass_char_ary[str_replace('\\\\', '\\', $config['pass_complex'])] . '_EXPLAIN'], $config['min_pass_chars'], $config['max_pass_chars']),
|
||||
|
@ -865,6 +890,7 @@ class acp_users
|
|||
'USER_EMAIL' => $user_row['user_email'],
|
||||
'USER_WARNINGS' => $user_row['user_warnings'],
|
||||
'USER_POSTS' => $user_row['user_posts'],
|
||||
'USER_INACTIVE_REASON' => $inactive_reason,
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -2433,8 +2433,8 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_
|
|||
include("{$phpbb_root_path}includes/functions_display.$phpEx");
|
||||
}
|
||||
|
||||
$attachments = display_attachments($forum_id, NULL, $attachments, $update_count, false, true);
|
||||
$tpl_size = sizeof($attachments);
|
||||
$attachment_tpl = display_attachments($forum_id, NULL, $attachments, $update_count, false, true);
|
||||
$tpl_size = sizeof($attachment_tpl);
|
||||
|
||||
$unset_tpl = array();
|
||||
|
||||
|
@ -2447,7 +2447,7 @@ function parse_inline_attachments(&$text, &$attachments, &$update_count, $forum_
|
|||
$index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num];
|
||||
|
||||
$replace['from'][] = $matches[0][$num];
|
||||
$replace['to'][] = (isset($attachments[$index])) ? $attachments[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]);
|
||||
$replace['to'][] = (isset($attachment_tpl[$index])) ? $attachment_tpl[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]);
|
||||
|
||||
$unset_tpl[] = $index;
|
||||
}
|
||||
|
|
|
@ -597,8 +597,8 @@ function gen_forum_auth_level($mode, $forum_id, $forum_status)
|
|||
$rules = array(
|
||||
($auth->acl_get('f_post', $forum_id) && !$locked) ? $user->lang['RULES_POST_CAN'] : $user->lang['RULES_POST_CANNOT'],
|
||||
($auth->acl_get('f_reply', $forum_id) && !$locked) ? $user->lang['RULES_REPLY_CAN'] : $user->lang['RULES_REPLY_CANNOT'],
|
||||
($auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
|
||||
($auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
|
||||
($user->data['is_registered'] && $auth->acl_gets('f_edit', 'm_edit', $forum_id) && !$locked) ? $user->lang['RULES_EDIT_CAN'] : $user->lang['RULES_EDIT_CANNOT'],
|
||||
($user->data['is_registered'] && $auth->acl_gets('f_delete', 'm_delete', $forum_id) && !$locked) ? $user->lang['RULES_DELETE_CAN'] : $user->lang['RULES_DELETE_CANNOT'],
|
||||
);
|
||||
|
||||
if ($config['allow_attachments'])
|
||||
|
@ -744,7 +744,17 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_
|
|||
$attachment_data[$attach_ids[$row['attach_id']]] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
|
||||
// Sort correctly (please note that the attachment_data array itself get changed by this
|
||||
if ($config['display_order'])
|
||||
{
|
||||
// Ascending sort
|
||||
krsort($attachment_data);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Descending sort
|
||||
ksort($attachment_data);
|
||||
}
|
||||
|
||||
|
|
|
@ -214,7 +214,7 @@ class p_master
|
|||
/**
|
||||
* Check module authorisation
|
||||
*/
|
||||
function module_auth($module_auth)
|
||||
function module_auth($module_auth, $forum_id = false)
|
||||
{
|
||||
global $auth, $config;
|
||||
|
||||
|
@ -261,8 +261,12 @@ class p_master
|
|||
// Make sure $id seperation is working fine
|
||||
$module_auth = str_replace(' , ', ',', $module_auth);
|
||||
|
||||
$forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id;
|
||||
|
||||
$test = preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']'), $module_auth);
|
||||
|
||||
$is_auth = false;
|
||||
eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#'), array('(int) $auth->acl_get(\'\\1\'\\2)', '(int) $this->acl_forum_id', '(int) $auth->acl_getf_global(\'\\1\')', '(int) $config[\'\\1\']'), $module_auth) . ');');
|
||||
eval('$is_auth = (int) (' . $test . ');');
|
||||
|
||||
return $is_auth;
|
||||
}
|
||||
|
|
|
@ -692,7 +692,7 @@ function posting_gen_inline_attachments(&$attachment_data)
|
|||
/**
|
||||
* Generate inline attachment entry
|
||||
*/
|
||||
function posting_gen_attachment_entry(&$attachment_data, &$filename_data)
|
||||
function posting_gen_attachment_entry($attachment_data, &$filename_data)
|
||||
{
|
||||
global $template, $config, $phpbb_root_path, $phpEx, $user;
|
||||
|
||||
|
@ -706,8 +706,10 @@ function posting_gen_attachment_entry(&$attachment_data, &$filename_data)
|
|||
'S_HAS_ATTACHMENTS' => true)
|
||||
);
|
||||
|
||||
$count = 0;
|
||||
foreach ($attachment_data as $attach_row)
|
||||
// We display the posted attachments within the desired order.
|
||||
($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data);
|
||||
|
||||
foreach ($attachment_data as $count => $attach_row)
|
||||
{
|
||||
$hidden = '';
|
||||
$attach_row['real_filename'] = basename($attach_row['real_filename']);
|
||||
|
@ -729,8 +731,6 @@ function posting_gen_attachment_entry(&$attachment_data, &$filename_data)
|
|||
'U_VIEW_ATTACHMENT' => $download_link,
|
||||
'S_HIDDEN' => $hidden)
|
||||
);
|
||||
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1166,15 +1166,30 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false)
|
|||
{
|
||||
foreach ($adr_ary as $id => $row)
|
||||
{
|
||||
$template->assign_block_vars($check_type . '_recipient', array(
|
||||
'NAME' => $row['name'],
|
||||
'IS_GROUP' => ($type == 'group'),
|
||||
'IS_USER' => ($type == 'user'),
|
||||
'COLOUR' => ($row['colour']) ? $row['colour'] : '',
|
||||
$tpl_ary = array(
|
||||
'IS_GROUP' => ($type == 'group') ? true : false,
|
||||
'IS_USER' => ($type == 'user') ? true : false,
|
||||
'UG_ID' => $id,
|
||||
'U_VIEW' => ($type == 'user') ? (($id != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $id) : '') : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $id),
|
||||
'TYPE' => $type)
|
||||
'NAME' => $row['name'],
|
||||
'COLOUR' => ($row['colour']) ? '#' . $row['colour'] : '',
|
||||
'TYPE' => $type,
|
||||
);
|
||||
|
||||
if ($type == 'user')
|
||||
{
|
||||
$tpl_ary = array_merge($tpl_ary, array(
|
||||
'U_VIEW' => get_username_string('profile', $id, $row['name'], $row['colour']),
|
||||
'NAME_FULL' => get_username_string('full', $id, $row['name'], $row['colour']),
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl_ary = array_merge($tpl_ary, array(
|
||||
'U_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $id),
|
||||
));
|
||||
}
|
||||
|
||||
$template->assign_block_vars($check_type . '_recipient', $tpl_ary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ function user_add($user_row, $cp_data = false)
|
|||
'username' => $user_row['username'],
|
||||
'username_clean' => utf8_clean_string($user_row['username']),
|
||||
'user_password' => (isset($user_row['user_password'])) ? $user_row['user_password'] : '',
|
||||
'user_email' => $user_row['user_email'],
|
||||
'user_email' => strtolower($user_row['user_email']),
|
||||
'user_email_hash' => (int) crc32(strtolower($user_row['user_email'])) . strlen($user_row['user_email']),
|
||||
'group_id' => $user_row['group_id'],
|
||||
'user_type' => $user_row['user_type'],
|
||||
|
@ -1217,7 +1217,9 @@ function validate_email($email)
|
|||
{
|
||||
global $config, $db, $user;
|
||||
|
||||
if (strtolower($user->data['user_email']) == strtolower($email))
|
||||
$email = strtolower($email);
|
||||
|
||||
if (strtolower($user->data['user_email']) == $email)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -1248,7 +1250,7 @@ function validate_email($email)
|
|||
{
|
||||
$sql = 'SELECT user_email_hash
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE user_email_hash = " . crc32(strtolower($email)) . strlen($email);
|
||||
WHERE user_email_hash = " . crc32($email) . strlen($email);
|
||||
$result = $db->sql_query($sql);
|
||||
$row = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
|
|
@ -68,6 +68,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
'REPORTED_IMG' => $user->img('icon_topic_reported', 'TOPIC_REPORTED'),
|
||||
'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'TOPIC_UNAPPROVED'),
|
||||
|
||||
'S_CAN_REPORT' => $auth->acl_get('m_report', $forum_id),
|
||||
'S_CAN_DELETE' => $auth->acl_get('m_delete', $forum_id),
|
||||
'S_CAN_MOVE' => $auth->acl_get('m_move', $forum_id),
|
||||
'S_CAN_FORK' => $auth->acl_get('m_', $forum_id),
|
||||
|
@ -127,7 +128,7 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
|
|||
'S_SELECT_TOPIC' => ($action == 'merge_select' && $row['topic_id'] != $topic_id) ? true : false,
|
||||
'U_SELECT_TOPIC' => $url . "&i=$id&mode=topic_view&action=merge&to_topic_id=" . $row['topic_id'] . $selected_ids,
|
||||
'U_MCP_QUEUE' => $u_mcp_queue,
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&t=' . $row['topic_id'] . '&action=reports'),
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=main&mode=topic_view&t=' . $row['topic_id'] . '&action=reports') : '',
|
||||
|
||||
'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $auth->acl_get('f_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '',
|
||||
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||
|
|
|
@ -81,10 +81,11 @@ function mcp_topic_view($id, $mode, $action)
|
|||
|
||||
$sql = 'SELECT u.username, u.user_colour, p.*
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . "
|
||||
p.topic_id = {$topic_id}
|
||||
WHERE ' . (($action == 'reports') ? 'p.post_reported = 1 AND ' : '') . '
|
||||
p.topic_id = ' . $topic_id . ' ' .
|
||||
((!$auth->acl_get('m_approve', $topic_info['forum_id'])) ? ' AND p.post_approved = 1 ' : '') . '
|
||||
AND p.poster_id = u.user_id
|
||||
ORDER BY $sort_order_sql";
|
||||
ORDER BY ' . $sort_order_sql;
|
||||
$result = $db->sql_query_limit($sql, $posts_per_page, $start);
|
||||
|
||||
$rowset = array();
|
||||
|
@ -141,8 +142,8 @@ function mcp_topic_view($id, $mode, $action)
|
|||
'S_CHECKED' => ($post_id_list && in_array(intval($row['post_id']), $post_id_list)) ? true : false,
|
||||
|
||||
'U_POST_DETAILS' => "$url&i=$id&p={$row['post_id']}&mode=post_details",
|
||||
'U_MCP_APPROVE' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']),
|
||||
'U_MCP_REPORT' => append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']))
|
||||
'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=queue&mode=approve_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '',
|
||||
'U_MCP_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=reports&mode=report_details&f=' . $topic_info['forum_id'] . '&p=' . $row['post_id']) : '')
|
||||
);
|
||||
|
||||
unset($rowset[$i]);
|
||||
|
@ -198,6 +199,7 @@ function mcp_topic_view($id, $mode, $action)
|
|||
'S_CAN_DELETE' => ($auth->acl_get('m_delete', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_APPROVE' => ($has_unapproved_posts && $auth->acl_get('m_approve', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_LOCK' => ($auth->acl_get('m_lock', $topic_info['forum_id'])) ? true : false,
|
||||
'S_CAN_REPORT' => ($auth->acl_get('m_report', $topic_info['forum_id'])) ? true : false,
|
||||
'S_REPORT_VIEW' => ($action == 'reports') ? true : false,
|
||||
'S_MERGE_VIEW' => ($action == 'merge') ? true : false,
|
||||
|
||||
|
|
|
@ -1208,6 +1208,23 @@ class user extends session
|
|||
|
||||
$this->img_lang = (file_exists($phpbb_root_path . 'styles/' . $this->theme['imageset_path'] . '/imageset/' . $this->lang_name)) ? $this->lang_name : $config['default_lang'];
|
||||
|
||||
// Disable board if the install/ directory is still present
|
||||
// For the brave development army we do not care about this, else we need to comment out this everytime we develop locally
|
||||
if (!defined('DEBUG_EXTRA') && !defined('ADMIN_START') && !defined('IN_LOGIN') && file_exists($phpbb_root_path . 'install'))
|
||||
{
|
||||
// Adjust the message slightly according to the permissions
|
||||
if ($auth->acl_gets('a_', 'm_'))
|
||||
{
|
||||
$message = 'REMOVE_INSTALL';
|
||||
}
|
||||
else
|
||||
{
|
||||
$message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE';
|
||||
}
|
||||
|
||||
trigger_error($message);
|
||||
}
|
||||
|
||||
// Is board disabled and user not an admin or moderator?
|
||||
if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_'))
|
||||
{
|
||||
|
|
|
@ -345,7 +345,7 @@ function compose_pm($id, $mode, $action)
|
|||
WHERE post_msg_id = $msg_id
|
||||
AND in_message = 1
|
||||
AND is_orphan = 0
|
||||
ORDER BY filetime " . ((!$config['display_order']) ? 'DESC' : 'ASC');
|
||||
ORDER BY filetime DESC";
|
||||
$result = $db->sql_query($sql);
|
||||
$message_parser->attachment_data = array_merge($message_parser->attachment_data, $db->sql_fetchrowset($result));
|
||||
$db->sql_freeresult($result);
|
||||
|
@ -750,15 +750,30 @@ function compose_pm($id, $mode, $action)
|
|||
$type = ($type == 'u') ? 'u' : 'g';
|
||||
$id = (int) $id;
|
||||
|
||||
$template->assign_block_vars($field . '_recipient', array(
|
||||
'NAME' => ${$type}[$id]['name'],
|
||||
'IS_GROUP' => ($type == 'g'),
|
||||
'IS_USER' => ($type == 'u'),
|
||||
'COLOUR' => (${$type}[$id]['colour']) ? ${$type}[$id]['colour'] : '',
|
||||
$tpl_ary = array(
|
||||
'IS_GROUP' => ($type == 'g') ? true : false,
|
||||
'IS_USER' => ($type == 'u') ? true : false,
|
||||
'UG_ID' => $id,
|
||||
'U_VIEW' => ($type == 'u') ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $id) : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $id),
|
||||
'TYPE' => $type)
|
||||
'NAME' => ${$type}[$id]['name'],
|
||||
'COLOUR' => (${$type}[$id]['colour']) ? '#' . ${$type}[$id]['colour'] : '',
|
||||
'TYPE' => $type,
|
||||
);
|
||||
|
||||
if ($type == 'u')
|
||||
{
|
||||
$tpl_ary = array_merge($tpl_ary, array(
|
||||
'U_VIEW' => get_username_string('profile', $id, ${$type}[$id]['name'], ${$type}[$id]['colour']),
|
||||
'NAME_FULL' => get_username_string('full', $id, ${$type}[$id]['name'], ${$type}[$id]['colour']),
|
||||
));
|
||||
}
|
||||
else
|
||||
{
|
||||
$tpl_ary = array_merge($tpl_ary, array(
|
||||
'U_VIEW' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $id),
|
||||
));
|
||||
}
|
||||
|
||||
$template->assign_block_vars($field . '_recipient', $tpl_ary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -191,7 +191,6 @@ function view_folder($id, $mode, $folder_id, $folder)
|
|||
$folder_alt = ($row['pm_unread']) ? 'NEW_MESSAGES' : 'NO_NEW_MESSAGES';
|
||||
|
||||
// Generate all URIs ...
|
||||
$message_author = ($row['author_id'] != ANONYMOUS) ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['author_id']) . '">' . $row['username'] . '</a>' : $row['username'];
|
||||
$view_message_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&mode=view&f=$folder_id&p=$message_id");
|
||||
$remove_message_url = append_sid("{$phpbb_root_path}ucp.$phpEx", "i=$id&mode=compose&action=delete&p=$message_id");
|
||||
|
||||
|
@ -211,9 +210,13 @@ function view_folder($id, $mode, $folder_id, $folder)
|
|||
$template->assign_block_vars('messagerow', array(
|
||||
'PM_CLASS' => ($row_indicator) ? 'pm_' . $row_indicator . '_colour' : '',
|
||||
|
||||
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $row['author_id'], $row['username'], $row['user_colour'], $row['username']),
|
||||
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $row['author_id'], $row['username'], $row['user_colour'], $row['username']),
|
||||
'MESSAGE_AUTHOR' => get_username_string('username', $row['author_id'], $row['username'], $row['user_colour'], $row['username']),
|
||||
'U_MESSAGE_AUTHOR' => get_username_string('profile', $row['author_id'], $row['username'], $row['user_colour'], $row['username']),
|
||||
|
||||
'FOLDER_ID' => $folder_id,
|
||||
'MESSAGE_ID' => $message_id,
|
||||
'MESSAGE_AUTHOR' => $message_author,
|
||||
'SENT_TIME' => $user->format_date($row['message_time']),
|
||||
'SUBJECT' => censor_text($row['message_subject']),
|
||||
'FOLDER' => (isset($folder[$row['folder_id']])) ? $folder[$row['folder_id']]['folder_name'] : '',
|
||||
|
@ -516,7 +519,7 @@ function get_pm_from($folder_id, $folder, $user_id)
|
|||
$sql_start = $start;
|
||||
}
|
||||
|
||||
$sql = 'SELECT t.*, p.author_id, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username
|
||||
$sql = 'SELECT t.*, p.author_id, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username, u.user_colour
|
||||
FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . " u
|
||||
WHERE t.user_id = $user_id
|
||||
AND p.author_id = u.user_id
|
||||
|
|
|
@ -92,7 +92,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
FROM ' . ATTACHMENTS_TABLE . "
|
||||
WHERE post_msg_id = $msg_id
|
||||
AND in_message = 1
|
||||
ORDER BY filetime " . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC';
|
||||
ORDER BY filetime DESC, post_msg_id ASC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
@ -165,7 +165,11 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
$url = append_sid("{$phpbb_root_path}ucp.$phpEx", 'i=pm');
|
||||
|
||||
$template->assign_vars(array(
|
||||
'AUTHOR_NAME' => ($user_info['user_colour']) ? '<span style="color:#' . $user_info['user_colour'] . '">' . $user_info['username'] . '</span>' : $user_info['username'],
|
||||
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
|
||||
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
|
||||
'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
|
||||
'U_MESSAGE_AUTHOR' => get_username_string('profile', $author_id, $user_info['username'], $user_info['user_colour'], $user_info['username']),
|
||||
|
||||
'AUTHOR_RANK' => $user_info['rank_title'],
|
||||
'RANK_IMAGE' => $user_info['rank_image'],
|
||||
'AUTHOR_AVATAR' => (isset($user_info['avatar'])) ? $user_info['avatar'] : '',
|
||||
|
@ -192,7 +196,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row)
|
|||
|
||||
'U_INFO' => ($auth->acl_get('m_info') && $message_row['pm_forwarded']) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'mode=pm_details&p=' . $message_row['msg_id'], true, $user->session_id) : '',
|
||||
'U_DELETE' => ($auth->acl_get('u_pm_delete')) ? "$url&mode=compose&action=delete&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_AUTHOR_PROFILE' => ($author_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $author_id) : '',
|
||||
'U_EMAIL' => $user_info['email'],
|
||||
'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
'U_EDIT' => (($message_row['message_time'] > time() - ($config['pm_edit_time'] * 60) || !$config['pm_edit_time']) && $folder_id == PRIVMSGS_OUTBOX && $auth->acl_get('u_pm_edit')) ? "$url&mode=compose&action=edit&f=$folder_id&p=" . $message_row['msg_id'] : '',
|
||||
|
@ -314,7 +317,6 @@ function message_history($msg_id, $user_id, $message_row, $folder)
|
|||
foreach ($rowset as $id => $row)
|
||||
{
|
||||
$author_id = $row['author_id'];
|
||||
$author = $row['username'];
|
||||
$folder_id = (int) $row['folder_id'];
|
||||
|
||||
$subject = $row['message_subject'];
|
||||
|
@ -340,7 +342,11 @@ function message_history($msg_id, $user_id, $message_row, $folder)
|
|||
}
|
||||
|
||||
$template->assign_block_vars('history_row', array(
|
||||
'AUTHOR_NAME' => $author,
|
||||
'MESSAGE_AUTHOR_FULL' => get_username_string('full', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
'MESSAGE_AUTHOR_COLOUR' => get_username_string('colour', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
'MESSAGE_AUTHOR' => get_username_string('username', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
'U_MESSAGE_AUTHOR' => get_username_string('profile', $author_id, $row['username'], $row['user_colour'], $row['username']),
|
||||
|
||||
'SUBJECT' => $subject,
|
||||
'SENT_DATE' => $user->format_date($row['message_time']),
|
||||
'MESSAGE' => $message,
|
||||
|
@ -351,7 +357,6 @@ function message_history($msg_id, $user_id, $message_row, $folder)
|
|||
|
||||
'U_MSG_ID' => $row['msg_id'],
|
||||
'U_VIEW_MESSAGE' => "$url&f=$folder_id&p=" . $row['msg_id'],
|
||||
'U_AUTHOR_PROFILE' => ($author_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$author_id") : '',
|
||||
'U_QUOTE' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS && $author_id != $user->data['user_id']) ? "$url&mode=compose&action=quote&f=" . $folder_id . "&p=" . $row['msg_id'] : '',
|
||||
'U_POST_REPLY_PM' => ($author_id != $user->data['user_id'] && $author_id != ANONYMOUS && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $row['msg_id'] : '')
|
||||
);
|
||||
|
|
|
@ -140,13 +140,13 @@ class ucp_prefs
|
|||
case 'view':
|
||||
|
||||
$data = array(
|
||||
'topic_sk' => (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't',
|
||||
'topic_sd' => (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd',
|
||||
'topic_st' => (!empty($user->data['user_topic_show_days'])) ? $user->data['user_topic_show_days'] : 0,
|
||||
'topic_sk' => request_var('topic_sk', (!empty($user->data['user_topic_sortby_type'])) ? $user->data['user_topic_sortby_type'] : 't'),
|
||||
'topic_sd' => request_var('topic_sd', (!empty($user->data['user_topic_sortby_dir'])) ? $user->data['user_topic_sortby_dir'] : 'd'),
|
||||
'topic_st' => request_var('topic_st', (!empty($user->data['user_topic_show_days'])) ? $user->data['user_topic_show_days'] : 0),
|
||||
|
||||
'post_sk' => (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't',
|
||||
'post_sd' => (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a',
|
||||
'post_st' => (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0,
|
||||
'post_sk' => request_var('post_sk', (!empty($user->data['user_post_sortby_type'])) ? $user->data['user_post_sortby_type'] : 't'),
|
||||
'post_sd' => request_var('post_sd', (!empty($user->data['user_post_sortby_dir'])) ? $user->data['user_post_sortby_dir'] : 'a'),
|
||||
'post_st' => request_var('post_st', (!empty($user->data['user_post_show_days'])) ? $user->data['user_post_show_days'] : 0),
|
||||
|
||||
'images' => request_var('images', (bool) $user->optionget('viewimg')),
|
||||
'flash' => request_var('flash', (bool) $user->optionget('viewflash')),
|
||||
|
|
|
@ -35,8 +35,8 @@ class ucp_profile
|
|||
|
||||
$data = array(
|
||||
'username' => request_var('username', $user->data['username'], true),
|
||||
'email' => request_var('email', $user->data['user_email']),
|
||||
'email_confirm' => request_var('email_confirm', ''),
|
||||
'email' => strtolower(request_var('email', $user->data['user_email'])),
|
||||
'email_confirm' => strtolower(request_var('email_confirm', '')),
|
||||
'new_password' => request_var('new_password', '', true),
|
||||
'cur_password' => request_var('cur_password', '', true),
|
||||
'password_confirm' => request_var('password_confirm', '', true),
|
||||
|
@ -93,7 +93,7 @@ class ucp_profile
|
|||
'username' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? $data['username'] : $user->data['username'],
|
||||
'username_clean' => ($auth->acl_get('u_chgname') && $config['allow_namechange']) ? utf8_clean_string($data['username']) : $user->data['username_clean'],
|
||||
'user_email' => ($auth->acl_get('u_chgemail')) ? $data['email'] : $user->data['user_email'],
|
||||
'user_email_hash' => ($auth->acl_get('u_chgemail')) ? crc32(strtolower($data['email'])) . strlen($data['email']) : $user->data['user_email_hash'],
|
||||
'user_email_hash' => ($auth->acl_get('u_chgemail')) ? crc32($data['email']) . strlen($data['email']) : $user->data['user_email_hash'],
|
||||
'user_password' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? md5($data['new_password']) : $user->data['user_password'],
|
||||
'user_passchg' => ($auth->acl_get('u_chgpasswd') && $data['new_password']) ? time() : 0,
|
||||
);
|
||||
|
@ -173,6 +173,7 @@ class ucp_profile
|
|||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($username),
|
||||
'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}",
|
||||
'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u={$user->data['user_id']}&k=$user_actkey")
|
||||
);
|
||||
|
||||
|
|
|
@ -115,8 +115,8 @@ class ucp_register
|
|||
'password_confirm' => request_var('password_confirm', '', true),
|
||||
'new_password' => request_var('new_password', '', true),
|
||||
'cur_password' => request_var('cur_password', '', true),
|
||||
'email' => request_var('email', ''),
|
||||
'email_confirm' => request_var('email_confirm', ''),
|
||||
'email' => strtolower(request_var('email', '')),
|
||||
'email_confirm' => strtolower(request_var('email_confirm', '')),
|
||||
'confirm_code' => request_var('confirm_code', ''),
|
||||
'lang' => request_var('lang', $user->lang_name),
|
||||
'tz' => request_var('tz', (float) $timezone),
|
||||
|
@ -365,6 +365,7 @@ class ucp_register
|
|||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($data['username']),
|
||||
'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
|
||||
'U_ACTIVATE' => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")
|
||||
);
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class ucp_remind
|
|||
global $db, $user, $auth, $template;
|
||||
|
||||
$username = request_var('username', '', true);
|
||||
$email = request_var('email', '');
|
||||
$email = strtolower(request_var('email', ''));
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
if ($submit)
|
||||
|
|
|
@ -23,7 +23,7 @@ class ucp_resend
|
|||
global $db, $user, $auth, $template;
|
||||
|
||||
$username = request_var('username', '', true);
|
||||
$email = request_var('email', '');
|
||||
$email = strtolower(request_var('email', ''));
|
||||
$submit = (isset($_POST['submit'])) ? true : false;
|
||||
|
||||
if ($submit)
|
||||
|
@ -113,6 +113,7 @@ class ucp_resend
|
|||
|
||||
$messenger->assign_vars(array(
|
||||
'USERNAME' => htmlspecialchars_decode($user_row['username']),
|
||||
'U_USER_DETAILS' => "$server_url/memberlist.$phpEx?mode=viewprofile&u={$user->data['user_id']}",
|
||||
'U_ACTIVATE' => generate_board_url() . "/ucp.$phpEx?mode=activate&u={$user_row['user_id']}&k={$user_row['user_actkey']}")
|
||||
);
|
||||
|
||||
|
|
|
@ -291,7 +291,7 @@ class module
|
|||
$module = $this->filename;
|
||||
if (!class_exists($module))
|
||||
{
|
||||
$this->error('Module not accessible', __LINE__, __FILE__);
|
||||
$this->error('Module "' . htmlspecialchars($module) . '" not accessible.', __LINE__, __FILE__);
|
||||
}
|
||||
$this->module = new $module($this);
|
||||
|
||||
|
|
|
@ -575,6 +575,9 @@ class install_install extends module
|
|||
|
||||
$default_lang = ($default_lang !== '') ? $default_lang : $language;
|
||||
|
||||
$board_email1 = strtolower($board_email1);
|
||||
$board_email2 = strtolower($board_email2);
|
||||
|
||||
if (isset($_POST['check']))
|
||||
{
|
||||
$error = array();
|
||||
|
|
|
@ -354,6 +354,8 @@ $lang = array_merge($lang, array(
|
|||
'SORT_LAST_VISIT' => 'Last visit',
|
||||
'SORT_REASON' => 'Reason',
|
||||
'SORT_REG_DATE' => 'Registration date',
|
||||
|
||||
'USER_IS_INACTIVE' => 'User is inactive',
|
||||
));
|
||||
|
||||
// Log Entries
|
||||
|
|
|
@ -109,7 +109,6 @@ $lang = array_merge($lang, array(
|
|||
'USER_GROUP_NORMAL' => 'Normal groups user is a member of',
|
||||
'USER_GROUP_PENDING' => 'Groups user is in pending mode',
|
||||
'USER_GROUP_SPECIAL' => 'Special groups user is a member of',
|
||||
'USER_IS_INACTIVE' => 'User is inactive',
|
||||
'USER_OVERVIEW_UPDATED' => 'User details updated.',
|
||||
'USER_POSTS_DELETED' => 'Successfully removed all posts made by this user.',
|
||||
'USER_POSTS_MOVED' => 'Successfully moved users posts to target forum.',
|
||||
|
|
|
@ -2,8 +2,13 @@ Subject: Activate user account
|
|||
|
||||
Hello,
|
||||
|
||||
The account owned by “{USERNAME}” has been deactivated or newly created, you should check the details of this user (if required) and activate it using the following link:
|
||||
The account owned by “{USERNAME}” has been deactivated or newly created, you should check the details of this user (if required) and handle it appropiatly.
|
||||
|
||||
Use this link to view the users profile:
|
||||
{U_USER_DETAILS}
|
||||
|
||||
Use this link to activate the account:
|
||||
{U_ACTIVATE}
|
||||
|
||||
|
||||
{EMAIL_SIG}
|
|
@ -107,8 +107,11 @@ $lang = array_merge($lang, array(
|
|||
'LOAD' => 'Load',
|
||||
'LOAD_DRAFT' => 'Load draft',
|
||||
'LOAD_DRAFT_EXPLAIN' => 'Here you are able to select the draft you want to continue writing. Your current post will be canceled, all current post contents will be deleted. View, edit and delete drafts within your User Control Panel.',
|
||||
'LOGIN_EXPLAIN_POST' => 'You need to login in order to post within this forum',
|
||||
'LOGIN_EXPLAIN_REPLY' => 'You need to login in order to reply to topics within this forum',
|
||||
'LOGIN_EXPLAIN_BUMP' => 'You need to login in order to bump topics within this forum.',
|
||||
'LOGIN_EXPLAIN_DELETE' => 'You need to login in order to delete posts within this forum.',
|
||||
'LOGIN_EXPLAIN_POST' => 'You need to login in order to post within this forum.',
|
||||
'LOGIN_EXPLAIN_QUOTE' => 'You need to login in order to quote posts within this forum.',
|
||||
'LOGIN_EXPLAIN_REPLY' => 'You need to login in order to reply to topics within this forum.',
|
||||
|
||||
'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %1$d.',
|
||||
'MAX_FLASH_HEIGHT_EXCEEDED' => 'Your flash files may only be up to %1$d pixels high.',
|
||||
|
|
|
@ -346,15 +346,20 @@ switch ($mode)
|
|||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'
|
||||
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
|
||||
WHERE username_clean = '" . $db->sql_escape(utf8_clean_string($username)) . "'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = 'SELECT *
|
||||
FROM ' . USERS_TABLE . "
|
||||
WHERE user_id = $user_id
|
||||
AND user_type IN (" . USER_NORMAL . ', ' . USER_FOUNDER . ')';
|
||||
WHERE user_id = $user_id";
|
||||
}
|
||||
|
||||
// a_user admins and founder are able to view inactive users and bots to be able to
|
||||
// manage them more easily
|
||||
if (!$auth->acl_get('a_user') && $user->data['user_type'] != USER_FOUNDER)
|
||||
{
|
||||
$sql .= ' AND user_type IN (' . USER_NORMAL . ', ' . USER_FOUNDER . ')';
|
||||
}
|
||||
|
||||
$result = $db->sql_query($sql);
|
||||
|
@ -530,6 +535,38 @@ switch ($mode)
|
|||
}
|
||||
}
|
||||
|
||||
// Inactive reason/account?
|
||||
if ($member['user_type'] == USER_INACTIVE)
|
||||
{
|
||||
$user->add_lang('acp/common');
|
||||
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_UNKNOWN'];
|
||||
|
||||
switch ($member['user_inactive_reason'])
|
||||
{
|
||||
case INACTIVE_REGISTER:
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_REGISTER'];
|
||||
break;
|
||||
|
||||
case INACTIVE_PROFILE:
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_PROFILE'];
|
||||
break;
|
||||
|
||||
case INACTIVE_MANUAL:
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_MANUAL'];
|
||||
break;
|
||||
|
||||
case INACTIVE_REMIND:
|
||||
$inactive_reason = $user->lang['INACTIVE_REASON_REMIND'];
|
||||
break;
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_USER_INACTIVE' => true,
|
||||
'USER_INACTIVE_REASON' => $inactive_reason)
|
||||
);
|
||||
}
|
||||
|
||||
// Now generate page tilte
|
||||
$page_title = sprintf($user->lang['VIEWING_PROFILE'], $member['username']);
|
||||
$template_html = 'memberlist_view.html';
|
||||
|
@ -799,8 +836,21 @@ switch ($mode)
|
|||
$template_html = 'memberlist_body.html';
|
||||
|
||||
// Sorting
|
||||
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_LOCATION'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'e' => $user->lang['SORT_EMAIL'], 'f' => $user->lang['WEBSITE'], 'g' => $user->lang['ICQ'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER'], 'l' => $user->lang['SORT_LAST_ACTIVE'], 'm' => $user->lang['SORT_RANK'] );
|
||||
$sort_key_sql = array('a' => 'u.username', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'e' => 'u.user_email', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber', 'l' => 'u.user_lastvisit', 'm' => 'u.user_rank DESC, u.user_posts');
|
||||
$sort_key_text = array('a' => $user->lang['SORT_USERNAME'], 'b' => $user->lang['SORT_LOCATION'], 'c' => $user->lang['SORT_JOINED'], 'd' => $user->lang['SORT_POST_COUNT'], 'e' => $user->lang['SORT_EMAIL'], 'f' => $user->lang['WEBSITE'], 'g' => $user->lang['ICQ'], 'h' => $user->lang['AIM'], 'i' => $user->lang['MSNM'], 'j' => $user->lang['YIM'], 'k' => $user->lang['JABBER']);
|
||||
|
||||
if ($auth->acl_get('u_viewonline'))
|
||||
{
|
||||
$sort_key_text['l'] = $user->lang['SORT_LAST_ACTIVE'];
|
||||
}
|
||||
$sort_key_text['m'] = $user->lang['SORT_RANK'];
|
||||
|
||||
$sort_key_sql = array('a' => 'u.username', 'b' => 'u.user_from', 'c' => 'u.user_regdate', 'd' => 'u.user_posts', 'e' => 'u.user_email', 'f' => 'u.user_website', 'g' => 'u.user_icq', 'h' => 'u.user_aim', 'i' => 'u.user_msnm', 'j' => 'u.user_yim', 'k' => 'u.user_jabber');
|
||||
|
||||
if ($auth->acl_get('u_viewonline'))
|
||||
{
|
||||
$sort_key_sql['l'] = 'u.user_lastvisit';
|
||||
}
|
||||
$sort_key_sql['m'] = 'u.user_rank DESC, u.user_posts';
|
||||
|
||||
$sort_dir_text = array('a' => $user->lang['ASCENDING'], 'd' => $user->lang['DESCENDING']);
|
||||
|
||||
|
@ -828,7 +878,7 @@ switch ($mode)
|
|||
if ($mode == 'searchuser' && ($config['load_search'] || $auth->acl_get('a_')))
|
||||
{
|
||||
$username = request_var('username', '', true);
|
||||
$email = request_var('email', '');
|
||||
$email = strtolower(request_var('email', ''));
|
||||
$icq = request_var('icq', '');
|
||||
$aim = request_var('aim', '');
|
||||
$yahoo = request_var('yahoo', '');
|
||||
|
@ -1345,8 +1395,6 @@ function show_profile($data)
|
|||
$email = '';
|
||||
}
|
||||
|
||||
$last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
|
||||
|
||||
if ($config['load_onlinetrack'])
|
||||
{
|
||||
$update_time = $config['load_online_time'] * 60;
|
||||
|
@ -1357,6 +1405,15 @@ function show_profile($data)
|
|||
$online = false;
|
||||
}
|
||||
|
||||
if ($data['user_allow_viewonline'] || $auth->acl_get('u_viewonline'))
|
||||
{
|
||||
$last_visit = (!empty($data['session_time'])) ? $data['session_time'] : $data['user_lastvisit'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_visit = '';
|
||||
}
|
||||
|
||||
$age = '';
|
||||
|
||||
if ($data['user_birthday'])
|
||||
|
|
|
@ -370,7 +370,7 @@ if ($post_data['post_attachment'] && !$submit && !$refresh && !$preview && $mode
|
|||
WHERE post_msg_id = $post_id
|
||||
AND in_message = 0
|
||||
AND is_orphan = 0
|
||||
ORDER BY filetime " . ((!$config['display_order']) ? 'DESC' : 'ASC');
|
||||
ORDER BY filetime DESC";
|
||||
$result = $db->sql_query($sql);
|
||||
$message_parser->attachment_data = array_merge($message_parser->attachment_data, $db->sql_fetchrowset($result));
|
||||
$db->sql_freeresult($result);
|
||||
|
|
|
@ -657,7 +657,7 @@ if ($keywords || $author || $author_id || $search_id || $submit)
|
|||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . '
|
||||
AND in_message = 0
|
||||
ORDER BY filetime ' . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC';
|
||||
ORDER BY filetime DESC, post_msg_id ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
<!-- IF topicrow.S_TOPIC_UNAPPROVED or topicrow.S_POSTS_UNAPPROVED -->
|
||||
<a href="{topicrow.U_MCP_QUEUE}">{topicrow.UNAPPROVED_IMG}</a>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF topicrow.S_TOPIC_REPORTED -->
|
||||
<!-- IF topicrow.S_TOPIC_REPORTED and topicrow.U_MCP_REPORT -->
|
||||
<a href="{topicrow.U_MCP_REPORT}">{REPORTED_IMG}</a>
|
||||
<!-- ENDIF -->
|
||||
</p>
|
||||
|
|
|
@ -103,8 +103,8 @@
|
|||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr valign="middle">
|
||||
<td width="100%">
|
||||
<!-- IF postrow.S_POST_UNAPPROVED -->{UNAPPROVED_IMG} <span class="postapprove"><a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span><!-- ENDIF -->
|
||||
<!-- IF postrow.S_POST_REPORTED -->{REPORTED_IMG}<span class="postreported"><a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF -->
|
||||
<!-- IF postrow.S_POST_UNAPPROVED and postrow.U_MCP_APPROVE -->{UNAPPROVED_IMG} <span class="postapprove"><a href="{postrow.U_MCP_APPROVE}">{L_POST_UNAPPROVED}</a></span><!-- ENDIF -->
|
||||
<!-- IF postrow.S_POST_REPORTED and postrow.U_MCP_REPORT -->{REPORTED_IMG}<span class="postreported"><a href="{postrow.U_MCP_REPORT}">{L_POST_REPORTED}</a></span><!-- ENDIF -->
|
||||
</td>
|
||||
<td width="10" nowrap="nowrap">{postrow.MINI_POST_IMG}</td>
|
||||
<td class="gensmall" nowrap="nowrap"><b>{L_POSTED}:</b> {postrow.POST_DATE}</td>
|
||||
|
|
|
@ -16,6 +16,11 @@
|
|||
<td class="row1" align="center">
|
||||
|
||||
<table cellspacing="1" cellpadding="2" border="0">
|
||||
<!-- IF S_USER_INACTIVE -->
|
||||
<tr>
|
||||
<td align="center" style="color: red;"><b class="gen">{L_USER_IS_INACTIVE}</b><br />{L_INACTIVE_REASON}: {USER_INACTIVE_REASON}<br /><br /></td>
|
||||
</tr>
|
||||
<!-- ENDIF -->
|
||||
<tr>
|
||||
<td align="center"><!-- IF USER_COLOR --><b class="gen" style="color: #{USER_COLOR}"><!-- ELSE --><b class="gen"><!-- ENDIF -->{USERNAME}</b><!-- IF U_USER_ADMIN --><span class="genmed"> [ <a href="{U_USER_ADMIN}">{L_USER_ADMIN}</a> ]</span><!-- ENDIF --></td>
|
||||
</tr>
|
||||
|
|
|
@ -197,8 +197,8 @@ function checkForm()
|
|||
<td class="row2">
|
||||
{S_HIDDEN_ADDRESS_FIELD}
|
||||
<!-- BEGIN to_recipient -->
|
||||
<span class="genmed">
|
||||
<a href="{to_recipient.U_VIEW}"<!-- IF to_recipient.COLOUR --> style="color:#{to_recipient.COLOUR}"<!-- ELSEIF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><b>{to_recipient.NAME}</b></a> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="{L_REMOVE}" /> <!-- ENDIF -->
|
||||
<span class="genmed"><strong>
|
||||
<!-- IF to_recipient.IS_GROUP --><a href="{to_recipient.U_VIEW}"><span class="blue">{to_recipient.NAME}</span></a><!-- ELSE -->{to_recipient.NAME_FULL}<!-- ENDIF --></strong> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{to_recipient.TYPE}[{to_recipient.UG_ID}]" value="{L_REMOVE}" /> <!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
<span class="genmed">{L_NO_TO_RECIPIENT}</span>
|
||||
<!-- END to_recipient -->
|
||||
|
@ -208,8 +208,8 @@ function checkForm()
|
|||
<td class="row1"><b class="genmed">{L_BCC}:</b></td>
|
||||
<td class="row2">
|
||||
<!-- BEGIN bcc_recipient -->
|
||||
<span class="genmed">
|
||||
<a href="{bcc_recipient.U_VIEW}"<!-- IF bcc_recipient.COLOUR --> style="color:#{bcc_recipient.COLOUR}"<!-- ELSEIF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><b>{bcc_recipient.NAME}</b></a> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="Remove" /> <!-- ENDIF -->
|
||||
<span class="genmed"><strong>
|
||||
<!-- IF bcc_recipient.IS_GROUP --><a href="{bcc_recipient.U_VIEW}"><span class="blue">{bcc_recipient.NAME}</span></a><!-- ELSE -->{bcc_recipient.NAME_FULL}<!-- ENDIF --></strong> </span><!-- IF not S_EDIT_POST --><input class="post" type="submit" name="remove_{bcc_recipient.TYPE}[{bcc_recipient.UG_ID}]" value="Remove" /> <!-- ENDIF -->
|
||||
<!-- BEGINELSE -->
|
||||
<span class="genmed">{L_NO_BCC_RECIPIENT}</span>
|
||||
<!-- END bcc_recipient -->
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<td rowspan="2" align="left" valign="top"><a name="{history_row.U_POST_ID}"></a>
|
||||
<table width="150" cellspacing="0">
|
||||
<tr>
|
||||
<td align="center" colspan="2"><b class="postauthor">{history_row.AUTHOR_NAME}</b></td>
|
||||
<td align="center" colspan="2"><b class="postauthor">{history_row.MESSAGE_AUTHOR_FULL}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<!-- ENDIF -->
|
||||
</span></td>
|
||||
|
||||
<td class="row1" width="100" align="center"><p class="topicauthor"><!-- IF S_SHOW_RECIPIENTS -->{messagerow.RECIPIENTS}<!-- ELSE -->{messagerow.MESSAGE_AUTHOR}<!-- ENDIF --></p></td>
|
||||
<td class="row1" width="100" align="center"><p class="topicauthor"><!-- IF S_SHOW_RECIPIENTS -->{messagerow.RECIPIENTS}<!-- ELSE -->{messagerow.MESSAGE_AUTHOR_FULL}<!-- ENDIF --></p></td>
|
||||
<td class="row1" width="120" align="center"><p class="topicdetails">{messagerow.SENT_TIME}</p></td>
|
||||
<td class="row1" width="20" align="center"><p class="topicdetails"><input type="checkbox" class="radio" name="marked_msg_id[]" value="{messagerow.MESSAGE_ID}" /></p></td>
|
||||
</tr>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
<tr class="row1">
|
||||
<td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_FROM}:</b></td>
|
||||
<td class="gen"><!-- IF U_AUTHOR_PROFILE --><a href="{U_AUTHOR_PROFILE}">{AUTHOR_NAME}</a><!-- ELSE -->{AUTHOR_NAME}<!-- ENDIF --></td>
|
||||
<td class="gen">{MESSAGE_AUTHOR_FULL}</td>
|
||||
</tr>
|
||||
|
||||
<tr class="row1">
|
||||
|
@ -27,11 +27,7 @@
|
|||
<td class="genmed" nowrap="nowrap" width="150"><b>{L_TO}:</b></td>
|
||||
<td class="gen">
|
||||
<!-- BEGIN to_recipient -->
|
||||
<!-- IF not to_recipient.U_VIEW -->
|
||||
<span<!-- IF to_recipient.COLOUR --> style="color:#{to_recipient.COLOUR}"<!-- ELSEIF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->{to_recipient.NAME}</span>
|
||||
<!-- ELSE -->
|
||||
<a href="{to_recipient.U_VIEW}"<!-- IF to_recipient.COLOUR --> style="color:#{to_recipient.COLOUR}"<!-- ELSEIF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->>{to_recipient.NAME}</a>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF to_recipient.IS_GROUP --><span class="blue"><a href="{to_recipient.U_VIEW}">{to_recipient.NAME}</a></span><!-- ELSE -->{to_recipient.NAME_FULL} <!-- ENDIF -->
|
||||
<!-- END to_recipient -->
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -42,11 +38,7 @@
|
|||
<td class="genmed" nowrap="nowrap" width="150"><b>{L_BCC}:</b></td>
|
||||
<td class="gen">
|
||||
<!-- BEGIN bcc_recipient -->
|
||||
<!-- IF not bcc_recipient.U_VIEW -->
|
||||
<span<!-- IF bcc_recipient.COLOUR --> style="color:#{bcc_recipient.COLOUR}"<!-- ELSEIF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->{bcc_recipient.NAME}</span>
|
||||
<!-- ELSE -->
|
||||
<a href="{bcc_recipient.U_VIEW}"<!-- IF bcc_recipient.COLOUR --> style="color:#{bcc_recipient.COLOUR}"<!-- ELSEIF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->>{bcc_recipient.NAME}</a>
|
||||
<!-- ENDIF -->
|
||||
<!-- IF bcc_recipient.IS_GROUP --><span class="blue"><a href="{bcc_recipient.U_VIEW}">{bcc_recipient.NAME}</a></span><!-- ELSE -->{bcc_recipient.NAME_FULL} <!-- ENDIF -->
|
||||
<!-- END bcc_recipient -->
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -77,7 +77,7 @@ hr.sep {
|
|||
<table width="85%" cellspacing="3" cellpadding="0" border="0" align="center">
|
||||
<tr>
|
||||
<td width="10%" nowrap="nowrap">{L_PM_FROM}: </td>
|
||||
<td><b>{AUTHOR_NAME}</b> [ {SENT_DATE} ]</td>
|
||||
<td><b>{MESSAGE_AUTHOR}</b> [ {SENT_DATE} ]</td>
|
||||
</tr>
|
||||
|
||||
<!-- IF S_TO_RECIPIENT -->
|
||||
|
@ -85,7 +85,7 @@ hr.sep {
|
|||
<td width="10%" nowrap="nowrap">{L_TO}:</td>
|
||||
<td>
|
||||
<!-- BEGIN to_recipient -->
|
||||
<!-- IF to_recipient.COLOUR --><span style="color:#{to_recipient.COLOUR}"><!-- ELSE --><span<!-- IF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</span>
|
||||
<!-- IF to_recipient.COLOUR --><span style="color:{to_recipient.COLOUR}"><!-- ELSE --><span<!-- IF to_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{to_recipient.NAME}</span>
|
||||
<!-- END to_recipient -->
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -96,7 +96,7 @@ hr.sep {
|
|||
<td width="10%" nowrap="nowrap">{L_BCC}:</td>
|
||||
<td>
|
||||
<!-- BEGIN bcc_recipient -->
|
||||
<!-- IF bcc_recipient.COLOUR --><span style="color:#{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span>
|
||||
<!-- IF bcc_recipient.COLOUR --><span style="color:{bcc_recipient.COLOUR}"><!-- ELSE --><span<!-- IF bcc_recipient.IS_GROUP --> class="blue"<!-- ENDIF -->><!-- ENDIF -->{bcc_recipient.NAME}</span>
|
||||
<!-- END bcc_recipient -->
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
@ -1152,7 +1152,7 @@ if (sizeof($attach_list))
|
|||
FROM ' . ATTACHMENTS_TABLE . '
|
||||
WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . '
|
||||
AND in_message = 0
|
||||
ORDER BY filetime ' . ((!$config['display_order']) ? 'DESC' : 'ASC') . ', post_msg_id ASC';
|
||||
ORDER BY filetime DESC, post_msg_id ASC';
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
|
@ -1411,10 +1411,10 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
|
|||
'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')),
|
||||
'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false),
|
||||
|
||||
'U_EDIT' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : '',
|
||||
'U_EDIT' => (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_edit', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=edit&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
'U_QUOTE' => ($auth->acl_get('f_reply', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=quote&f=$forum_id&p={$row['post_id']}") : '',
|
||||
'U_INFO' => ($auth->acl_get('m_info', $forum_id)) ? append_sid("{$phpbb_root_path}mcp.$phpEx", "i=main&mode=post_details&f=$forum_id&p=" . $row['post_id'], true, $user->session_id) : '',
|
||||
'U_DELETE' => (($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : '',
|
||||
'U_DELETE' => (!$user->data['is_registered']) ? '' : ((($user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $topic_data['topic_last_post_id'] == $row['post_id'] && ($row['post_time'] > time() - ($config['edit_time'] * 60) || !$config['edit_time'])) || $auth->acl_get('m_delete', $forum_id)) ? append_sid("{$phpbb_root_path}posting.$phpEx", "mode=delete&f=$forum_id&p={$row['post_id']}") : ''),
|
||||
|
||||
'U_PROFILE' => $user_cache[$poster_id]['profile'],
|
||||
'U_SEARCH' => $user_cache[$poster_id]['search'],
|
||||
|
|
Loading…
Add table
Reference in a new issue