- fix some bugs...

git-svn-id: file:///svn/phpbb/trunk@5643 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2006-03-17 12:51:32 +00:00
parent 59ba11f18f
commit 4962db5f67
22 changed files with 141 additions and 50 deletions

View file

@ -301,7 +301,7 @@ class cache extends acm
foreach ($parsed_items as $key => $parsed_array) foreach ($parsed_items as $key => $parsed_array)
{ {
$parsed_array = $this->get('_cfg_' . $key); $parsed_array = $this->get('_cfg_' . $key . '_' . $theme[$key . '_path']);
if (!$parsed_array) if (!$parsed_array)
{ {
@ -327,7 +327,7 @@ class cache extends acm
$parsed_array = parse_cfg_file($filename); $parsed_array = parse_cfg_file($filename);
$parsed_array['filetime'] = @filemtime($filename); $parsed_array['filetime'] = @filemtime($filename);
$this->put('_cfg_' . $key, $parsed_array); $this->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array);
} }
$parsed_items[$key] = $parsed_array; $parsed_items[$key] = $parsed_array;
} }

View file

@ -18,7 +18,7 @@ class acp_forums
function main($id, $mode) function main($id, $mode)
{ {
global $db, $user, $auth, $template; global $db, $user, $auth, $template, $cache;
global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $SID; global $config, $phpbb_admin_path, $phpbb_root_path, $phpEx, $SID;
$user->add_lang('acp/forums'); $user->add_lang('acp/forums');

View file

@ -809,7 +809,7 @@ class acp_permissions
} }
/** /**
* Update foes * Update foes - remove moderators and administrators from foe lists...
*/ */
function update_foes() function update_foes()
{ {
@ -827,7 +827,8 @@ class acp_permissions
if (sizeof($perms)) if (sizeof($perms))
{ {
$sql = 'DELETE FROM ' . ZEBRA_TABLE . ' $sql = 'DELETE FROM ' . ZEBRA_TABLE . '
WHERE zebra_id IN (' . implode(', ', $perms) . ')'; WHERE zebra_id IN (' . implode(', ', $perms) . ')
AND foe = 1';
$db->sql_query($sql); $db->sql_query($sql);
} }
unset($perms); unset($perms);

View file

@ -220,15 +220,15 @@ class acp_search
} }
$action = &$this->state[1]; $action = &$this->state[1];
@set_time_limit(0); @set_time_limit(0);
$this->max_post_id = $this->get_max_post_id(); $this->max_post_id = $this->get_max_post_id();
$post_counter = (isset($this->state[2])) ? $this->state[2] : 0; $post_counter = (isset($this->state[2])) ? $this->state[2] : 0;
$this->state[2] = &$post_counter; $this->state[2] = &$post_counter;
$this->save_state(); $this->save_state();
if ($action == 'delete') if ($action == 'delete')
{ {
if (method_exists($this->search, 'delete_index')) if (method_exists($this->search, 'delete_index'))
@ -251,7 +251,7 @@ class acp_search
$posters[] = $row['poster_id']; $posters[] = $row['poster_id'];
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
if (sizeof($ids)) if (sizeof($ids))
{ {
$this->search->index_remove($ids, $posters); $this->search->index_remove($ids, $posters);
@ -296,13 +296,13 @@ class acp_search
WHERE post_id >= ' . (int) ($post_counter + 1) . ' WHERE post_id >= ' . (int) ($post_counter + 1) . '
AND post_id < ' . (int) ($post_counter + $this->batch_size); AND post_id < ' . (int) ($post_counter + $this->batch_size);
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
while (false !== ($row = $db->sql_fetchrow($result))) while (false !== ($row = $db->sql_fetchrow($result)))
{ {
$this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id']); $this->search->index('post', $row['post_id'], $row['post_text'], $row['post_subject'], $row['poster_id']);
} }
$db->sql_freeresult($result); $db->sql_freeresult($result);
$post_counter += $this->batch_size; $post_counter += $this->batch_size;
// save the current state // save the current state
@ -452,8 +452,10 @@ class acp_search
$sql = 'SELECT MAX(post_id) as max_post_id $sql = 'SELECT MAX(post_id) as max_post_id
FROM '. POSTS_TABLE; FROM '. POSTS_TABLE;
$result = $db->sql_query($sql); $result = $db->sql_query($sql);
$max_post_id = (int) $db->sql_fetchfield('max_post_id', 0, $result);
$db->sql_freeresult($result);
return $db->sql_fetchfield('max_post_id', 0, $result); return $max_post_id;
} }
function save_state($state = false) function save_state($state = false)

View file

@ -616,16 +616,13 @@ class acp_users
// Which updates do we need to do? // Which updates do we need to do?
$update_warning = ($user_row['user_warnings'] != $data['warnings']) ? true : false; $update_warning = ($user_row['user_warnings'] != $data['warnings']) ? true : false;
$update_username = ($user_row['username'] != $data['username']) ? $data['username'] : false; $update_username = ($user_row['username'] != $data['username']) ? $data['username'] : false;
$update_password = ($user_row['user_password'] != $data['user_password']) ? true : false; $update_password = ($data['user_password'] && $user_row['user_password'] != md5($data['user_password'])) ? true : false;
$update_email = ($data['user_email'] != $user_row['user_email']) ? $data['user_email'] : false;
if (!sizeof($error)) if (!sizeof($error))
{ {
$sql_ary = array( $sql_ary = array();
'username' => $data['username'],
'user_email' => $data['user_email'],
'user_email_hash' => crc32(strtolower($data['user_email'])) . strlen($data['user_email'])
);
if ($user_row['user_type'] != USER_FOUNDER || $user->data['user_type'] == USER_FOUNDER) if ($user_row['user_type'] != USER_FOUNDER || $user->data['user_type'] == USER_FOUNDER)
{ {
if ($update_warning) if ($update_warning)
@ -639,6 +636,25 @@ class acp_users
} }
} }
if ($update_username !== false)
{
$sql_ary['username'] = $update_username;
add_log('admin', 'LOG_USER_UPDATE_NAME', $user_row['username'], $update_username);
add_log('user', $user_id, 'LOG_USER_UPDATE_NAME', $user_row['username'], $update_username);
}
if ($update_email !== false)
{
$sql_ary += array(
'user_email' => $update_email,
'user_email_hash' => crc32(strtolower($update_email)) . strlen($update_email)
);
add_log('admin', 'LOG_USER_UPDATE_EMAIL', $user_row['username'], $user_row['user_email'], $update_email);
add_log('user', $user_id, 'LOG_USER_UPDATE_EMAIL', $user_row['username'], $user_row['user_email'], $update_email);
}
if ($update_password) if ($update_password)
{ {
$sql_ary += array( $sql_ary += array(
@ -647,6 +663,7 @@ class acp_users
); );
add_log('admin', 'LOG_USER_NEW_PASSWORD', $user_row['username']); add_log('admin', 'LOG_USER_NEW_PASSWORD', $user_row['username']);
add_log('user', $user_id, 'LOG_USER_NEW_PASSWORD', $user_row['username']);
} }
$sql = 'UPDATE ' . USERS_TABLE . ' $sql = 'UPDATE ' . USERS_TABLE . '
@ -664,9 +681,6 @@ class acp_users
if ($update_username) if ($update_username)
{ {
user_update_name($user_row['username'], $update_username); user_update_name($user_row['username'], $update_username);
add_log('admin', 'LOG_USER_UPDATE_NAME', $user_row['username'], $update_username);
add_log('user', $user_id, 'LOG_USER_UPDATE_NAME', $user_row['username'], $update_username);
} }
add_log('admin', 'LOG_USER_USER_UPDATE', $data['username']); add_log('admin', 'LOG_USER_USER_UPDATE', $data['username']);

View file

@ -106,7 +106,7 @@ class dbal_firebird extends dbal
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
$cache->sql_save($query, $this->query_result, $cache_ttl); $cache->sql_save($query, $this->query_result, $cache_ttl);
} }
else if (strpos($query, 'SELECT') !== false && $this->query_result) else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{ {
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
} }

View file

@ -118,7 +118,7 @@ class dbal_mssql extends dbal
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
$cache->sql_save($query, $this->query_result, $cache_ttl); $cache->sql_save($query, $this->query_result, $cache_ttl);
} }
else if (strpos($query, 'SELECT') !== false && $this->query_result) else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{ {
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
} }

View file

@ -116,7 +116,7 @@ class dbal_mssql_odbc extends dbal
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
$cache->sql_save($query, $this->query_result, $cache_ttl); $cache->sql_save($query, $this->query_result, $cache_ttl);
} }
else if (strpos($query, 'SELECT') !== false && $this->query_result) else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{ {
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
} }

View file

@ -118,7 +118,7 @@ class dbal_mysql extends dbal
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
$cache->sql_save($query, $this->query_result, $cache_ttl); $cache->sql_save($query, $this->query_result, $cache_ttl);
} }
else if (strpos($query, 'SELECT') !== false && $this->query_result) else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{ {
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
} }

View file

@ -120,7 +120,7 @@ class dbal_mysql4 extends dbal
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
$cache->sql_save($query, $this->query_result, $cache_ttl); $cache->sql_save($query, $this->query_result, $cache_ttl);
} }
else if (strpos($query, 'SELECT') !== false && $this->query_result) else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{ {
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
} }

View file

@ -132,7 +132,7 @@ class dbal_oracle extends dbal
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
$cache->sql_save($query, $this->query_result, $cache_ttl); $cache->sql_save($query, $this->query_result, $cache_ttl);
} }
else if (strpos($query, 'SELECT') !== false && $this->query_result) else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{ {
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
} }

View file

@ -153,7 +153,7 @@ class dbal_postgres extends dbal
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
$cache->sql_save($query, $this->query_result, $cache_ttl); $cache->sql_save($query, $this->query_result, $cache_ttl);
} }
else if (strpos($query, 'SELECT') !== false && $this->query_result) else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{ {
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
} }

View file

@ -117,7 +117,7 @@ class dbal_sqlite extends dbal
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
$cache->sql_save($query, $this->query_result, $cache_ttl); $cache->sql_save($query, $this->query_result, $cache_ttl);
} }
else if (strpos($query, 'SELECT') !== false && $this->query_result) else if (strpos($query, 'SELECT') === 0 && $this->query_result)
{ {
$this->open_queries[(int) $this->query_result] = $this->query_result; $this->open_queries[(int) $this->query_result] = $this->query_result;
} }

View file

@ -2295,7 +2295,7 @@ function page_footer()
$template->assign_vars(array( $template->assign_vars(array(
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '', 'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : '',
'U_ACP' => ($auth->acl_get('a_') && $user->data['is_registered']) ? "{$phpbb_root_path}adm/index.$phpEx?sid=" . $user->data['session_id'] : '') 'U_ACP' => ($auth->acl_get('a_') && $user->data['is_registered']) ? "{$phpbb_root_path}adm/index.$phpEx?sid=" . $user->session_id : '')
); );
// Call cron-type script // Call cron-type script
@ -2419,6 +2419,9 @@ function get_backtrace()
} }
} }
$trace['class'] = (!isset($trace['class'])) ? '' : $trace['class'];
$trace['type'] = (!isset($trace['type'])) ? '' : $trace['type'];
$output .= '<br />'; $output .= '<br />';
$output .= '<b>FILE:</b> ' . htmlspecialchars($trace['file']) . '<br />'; $output .= '<b>FILE:</b> ' . htmlspecialchars($trace['file']) . '<br />';
$output .= '<b>LINE:</b> ' . $trace['line'] . '<br />'; $output .= '<b>LINE:</b> ' . $trace['line'] . '<br />';

View file

@ -103,7 +103,7 @@ class filespec
$this->realname = rawurlencode(str_replace($bad_chars, '_', strtolower($this->realname))); $this->realname = rawurlencode(str_replace($bad_chars, '_', strtolower($this->realname)));
$this->realname = preg_replace("/%(\w{2})/", '_', $this->realname); $this->realname = preg_replace("/%(\w{2})/", '_', $this->realname);
$this->realname = $prefix . $this->realname . '_.' . $this->extension; $this->realname = $prefix . $this->realname . '.' . $this->extension;
break; break;
case 'unique': case 'unique':

View file

@ -321,7 +321,7 @@ class session
/* echo "<br />$sql"; /* echo "<br />$sql";
echo "<br />$user_id :: " . sizeof($this->data) . " :: " . (int) is_array($this->data) . " :: " . $db->sql_numrows(); echo "<br />$user_id :: " . sizeof($this->data) . " :: " . (int) is_array($this->data) . " :: " . $db->sql_numrows();
print_r($this->cookie_data); print_r($this->cookie_data);
print_r($this->data);*/ print_r($this->data);
if ($this->data['user_id'] != ANONYMOUS) if ($this->data['user_id'] != ANONYMOUS)
{ {
@ -345,6 +345,15 @@ class session
{ {
$this->data['session_last_visit'] = time(); $this->data['session_last_visit'] = time();
} }
*/
if ($this->data['user_id'] != ANONYMOUS)
{
$this->data['session_last_visit'] = (isset($this->data['session_time']) && $this->data['session_time']) ? $this->data['session_time'] : (($this->data['user_lastvisit']) ? $this->data['user_lastvisit'] : time());
}
else
{
$this->data['session_last_visit'] = time();
}
// At this stage we should have a filled data array, defined cookie u and k data. // At this stage we should have a filled data array, defined cookie u and k data.
// data array should contain recent session info if we're a real user and a recent // data array should contain recent session info if we're a real user and a recent
@ -867,6 +876,8 @@ class user extends session
// User has wrong style // User has wrong style
if (!$this->theme && $style == $this->data['user_style']) if (!$this->theme && $style == $this->data['user_style'])
{ {
echo "HERE";
exit;
$style = $this->data['user_style'] = $config['default_style']; $style = $this->data['user_style'] = $config['default_style'];
$sql = 'UPDATE ' . USERS_TABLE . " $sql = 'UPDATE ' . USERS_TABLE . "
@ -880,7 +891,7 @@ class user extends session
AND t.template_id = s.template_id AND t.template_id = s.template_id
AND c.theme_id = s.theme_id AND c.theme_id = s.theme_id
AND i.imageset_id = s.imageset_id"; AND i.imageset_id = s.imageset_id";
$result = $db->sql_query($sql); $result = $db->sql_query($sql, 3600);
$this->theme = $db->sql_fetchrow($result); $this->theme = $db->sql_fetchrow($result);
$db->sql_freeresult($result); $db->sql_freeresult($result);
} }
@ -892,7 +903,7 @@ class user extends session
// Now parse the cfg file and cache it // Now parse the cfg file and cache it
$parsed_items = $cache->obtain_cfg_items($this->theme); $parsed_items = $cache->obtain_cfg_items($this->theme);
// We are only interested in the theme configuration for now // We are only interested in the theme configuration for now
$parsed_items = $parsed_items['theme']; $parsed_items = $parsed_items['theme'];

View file

@ -182,7 +182,7 @@ function compose_pm($id, $mode, $action)
$message_attachment = (isset($post['message_attachement'])) ? $post['message_attachement'] : 0; $message_attachment = (isset($post['message_attachement'])) ? $post['message_attachement'] : 0;
$message_text = $post['message_text']; $message_text = $post['message_text'];
$message_subject = $post['message_subject']; $message_subject = $post['message_subject'];
$quote_username = $post['quote_username']; $quote_username = (isset($post['quote_username'])) ? $post['quote_username'] : '';
$message_time = $post['message_time']; $message_time = $post['message_time'];
$icon_id = (isset($post['icon_id'])) ? $post['icon_id'] : 0; $icon_id = (isset($post['icon_id'])) ? $post['icon_id'] : 0;
@ -821,7 +821,7 @@ function compose_pm($id, $mode, $action)
*/ */
function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_to, $add_bcc) function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_to, $add_bcc)
{ {
global $_REQUEST; global $auth;
// Delete User [TO/BCC] // Delete User [TO/BCC]
if ($remove_u) if ($remove_u)
@ -853,6 +853,9 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_
} }
} }
// User ID's to add...
$user_id_ary = array();
// Build usernames to add // Build usernames to add
$usernames = (isset($_REQUEST['username'])) ? array(request_var('username', '')) : array(); $usernames = (isset($_REQUEST['username'])) ? array(request_var('username', '')) : array();
$username_list = request_var('username_list', ''); $username_list = request_var('username_list', '');
@ -866,8 +869,31 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_
{ {
$user_id_ary = array(); $user_id_ary = array();
user_get_id_name($user_id_ary, $usernames); user_get_id_name($user_id_ary, $usernames);
}
if (sizeof($user_id_ary)) // Add Friends if specified
$friend_list = (is_array($_REQUEST['add_' . $type])) ? array_map('intval', array_keys($_REQUEST['add_' . $type])) : array();
$user_id_ary = array_merge($user_id_ary, $friend_list);
if (sizeof($user_id_ary))
{
// We need to check their PM status (do they want to receive PM's?)
// Only check if not a moderator or admin, since they are allowed to override this user setting
if (!$auth->acl_gets('a_', 'm_'))
{
$sql = 'SELECT user_id
FROM ' . USERS_TABLE . '
WHERE user_id IN (' . implode(', ', $user_id_ary) . ')
AND user_allow_pm = 1';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
{
$address_list['u'][$row['user_id']] = $type;
}
$db->sql_freeresult($result);
}
else
{ {
foreach ($user_id_ary as $user_id) foreach ($user_id_ary as $user_id)
{ {
@ -875,16 +901,7 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_
} }
} }
} }
// Add Friends if specified
$friend_list = (is_array($_REQUEST['add_' . $type])) ? array_map('intval', array_keys($_REQUEST['add_' . $type])) : array();
foreach ($friend_list as $user_id)
{
$address_list['u'][$user_id] = $type;
}
} }
} }
/** /**

View file

@ -86,9 +86,27 @@ class ucp_profile
'user_email' => ($auth->acl_get('u_chgemail')) ? $email : $user->data['user_email'], 'user_email' => ($auth->acl_get('u_chgemail')) ? $email : $user->data['user_email'],
'user_email_hash' => ($auth->acl_get('u_chgemail')) ? crc32(strtolower($email)) . strlen($email) : $user->data['user_email_hash'], 'user_email_hash' => ($auth->acl_get('u_chgemail')) ? crc32(strtolower($email)) . strlen($email) : $user->data['user_email_hash'],
'user_password' => ($auth->acl_get('u_chgpasswd') && $new_password) ? md5($new_password) : $user->data['user_password'], 'user_password' => ($auth->acl_get('u_chgpasswd') && $new_password) ? md5($new_password) : $user->data['user_password'],
'user_passchg' => time(), 'user_passchg' => ($auth->acl_get('u_chgpasswd') && $new_password) ? time() : 0,
); );
if ($auth->acl_get('u_chgname') && $config['allow_namechange'] && $username != $user->data['username'])
{
add_log('admin', 'LOG_USER_UPDATE_NAME', $user->data['username'], $username);
add_log('user', $user->data['user_id'], 'LOG_USER_UPDATE_NAME', $user->data['username'], $username);
}
if ($auth->acl_get('u_chgpasswd') && $new_password && md5($new_password) != $user->data['user_password'])
{
add_log('admin', 'LOG_USER_NEW_PASSWORD', $username);
add_log('user', $user->data['user_id'], 'LOG_USER_NEW_PASSWORD', $username);
}
if ($auth->acl_get('u_chgemail') && $email != $user->data['user_email'])
{
add_log('admin', 'LOG_USER_UPDATE_EMAIL', $username, $user->data['user_email'], $email);
add_log('user', $user->data['user_id'], 'LOG_USER_UPDATE_EMAIL', $username, $user->data['user_email'], $email);
}
if ($config['email_enable'] && $email != $user->data['user_email'] && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN)) if ($config['email_enable'] && $email != $user->data['user_email'] && ($config['require_activation'] == USER_ACTIVATION_SELF || $config['require_activation'] == USER_ACTIVATION_ADMIN))
{ {
include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx); include_once($phpbb_root_path . 'includes/functions_messenger.'.$phpEx);

View file

@ -108,6 +108,29 @@ class ucp_zebra
unset($perms); unset($perms);
} }
// Do not let add users to friends if the user is within the foes list of the to-be-added users
if ($mode == 'friends' && sizeof($user_id_ary))
{
$sql = 'SELECT user_id
FROM ' . ZEBRA_TABLE . '
WHERE user_id IN (' . implode(', ', $user_id_ary) . ')
AND zebra_id = ' . $user->data['user_id'] . '
AND foe = 1';
$result = $db->sql_query($sql);
$remove_user_ids = array();
while ($row = $db->sql_fetchrow($result))
{
$remove_user_ids[] = $row['user_id'];
}
if (sizeof($remove_user_ids))
{
$user_id_ary = array_diff($user_id_ary, $remove_user_ids);
}
unset($remove_user_ids);
}
if (sizeof($user_id_ary)) if (sizeof($user_id_ary))
{ {
$sql_mode = ($mode == 'friends') ? 'friend' : 'foe'; $sql_mode = ($mode == 'friends') ? 'friend' : 'foe';

View file

@ -503,6 +503,7 @@ $lang = array_merge($lang, array(
'LOG_USER_MOVE_POSTS' => '<b>Moved user posts</b><br />&#187; posts by "%s" to forum "%s"', 'LOG_USER_MOVE_POSTS' => '<b>Moved user posts</b><br />&#187; posts by "%s" to forum "%s"',
'LOG_USER_NEW_PASSWORD' => '<b>Changed user password</b><br />&#187; %s', 'LOG_USER_NEW_PASSWORD' => '<b>Changed user password</b><br />&#187; %s',
'LOG_USER_REACTIVATE' => '<b>Forced user account re-activation</b><br />&#187; %s', 'LOG_USER_REACTIVATE' => '<b>Forced user account re-activation</b><br />&#187; %s',
'LOG_USER_UPDATE_EMAIL' => '<b>User "%s" changed email</b>&#187; from "%s" to "%s"',
'LOG_USER_UPDATE_NAME' => '<b>Changed username</b><br />&#187; from "%s" to "%s"', 'LOG_USER_UPDATE_NAME' => '<b>Changed username</b><br />&#187; from "%s" to "%s"',
'LOG_USER_USER_UPDATE' => '<b>Updated user details</b><br />&#187; %s', 'LOG_USER_USER_UPDATE' => '<b>Updated user details</b><br />&#187; %s',

View file

@ -214,6 +214,7 @@ $lang = array_merge($lang, array(
'NOTIFY_METHOD_EXPLAIN' => 'Method for sending messages sent via this board.', 'NOTIFY_METHOD_EXPLAIN' => 'Method for sending messages sent via this board.',
'NOTIFY_METHOD_IM' => 'Jabber only', 'NOTIFY_METHOD_IM' => 'Jabber only',
'NOTIFY_ON_PM' => 'Email me on new private messages', 'NOTIFY_ON_PM' => 'Email me on new private messages',
'NOT_ADDED_FRIENDS' => 'Usernames not added to friends list because you are within their foes list.',
'NOT_ADDED_FOES' => 'Usernames not added to foes list because of administrator/moderator status.', 'NOT_ADDED_FOES' => 'Usernames not added to foes list because of administrator/moderator status.',
'NOT_AGREE' => 'I do not agree to these terms', 'NOT_AGREE' => 'I do not agree to these terms',
'NOT_ENOUGH_SPACE_FOLDER' => 'The Destination Folder "%s" seems to be full. The requested action has not been taken.', 'NOT_ENOUGH_SPACE_FOLDER' => 'The Destination Folder "%s" seems to be full. The requested action has not been taken.',

View file

@ -159,7 +159,7 @@ $result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) while ($row = $db->sql_fetchrow($result))
{ {
$which = (time() - $update_time < $row['online_time']) ? 'online' : 'offline'; $which = (time() - $update_time < $row['online_time'] && $row['viewonline']) ? 'online' : 'offline';
$template->assign_block_vars("friends_{$which}", array( $template->assign_block_vars("friends_{$which}", array(
'U_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&amp;mode=viewprofile&amp;u=" . $row['user_id'], 'U_PROFILE' => "{$phpbb_root_path}memberlist.$phpEx$SID&amp;mode=viewprofile&amp;u=" . $row['user_id'],