diff options
-rw-r--r-- | phpBB/adm/style/acp_main.html | 280 | ||||
-rw-r--r-- | phpBB/adm/style/acp_users.html | 2 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_forums.php | 26 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_main.php | 29 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_profile.php | 14 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_users.php | 3 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 5 | ||||
-rw-r--r-- | phpBB/includes/functions_module.php | 4 | ||||
-rw-r--r-- | phpBB/includes/functions_privmsgs.php | 45 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 59 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm.php | 11 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_compose.php | 12 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewfolder.php | 14 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_pm_viewmessage.php | 20 | ||||
-rw-r--r-- | phpBB/includes/utf/utf_tools.php | 1 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 2 | ||||
-rw-r--r-- | phpBB/language/en/acp/common.php | 18 | ||||
-rw-r--r-- | phpBB/language/en/acp/users.php | 1 | ||||
-rw-r--r-- | phpBB/language/en/ucp.php | 1 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/ucp_pm_viewfolder.html | 3 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/ucp_pm_viewmessage.html | 14 |
21 files changed, 387 insertions, 177 deletions
diff --git a/phpBB/adm/style/acp_main.html b/phpBB/adm/style/acp_main.html index a3a3e90c00..bd1e4740f4 100644 --- a/phpBB/adm/style/acp_main.html +++ b/phpBB/adm/style/acp_main.html @@ -1,166 +1,178 @@ <!-- INCLUDE overall_header.html --> -<a name="maincontent"></a><h1>{L_WELCOME_PHPBB}</h1> +<a name="maincontent"></a> -<p>{L_ADMIN_INTRO}</p> +<!-- IF S_RESTORE_PERMISSIONS --> -<!-- IF S_DEBUG_EXTRA --> - <div class="errorbox"> - <h3>{L_WARNING}</h3> - <p>{L_DEBUG_EXTRA_WARNING}</p> - </div> -<!-- ENDIF --> + <h1>{L_PERMISSIONS_TRANSFERED}</h1> -<!-- IF S_REMOVE_INSTALL --> - <div class="errorbox"> - <h3>{L_WARNING}</h3> - <p>{L_REMOVE_INSTALL}</p> - </div> -<!-- ENDIF --> + <p>{L_PERMISSIONS_TRANSFERED_EXPLAIN}</p> -<table cellspacing="1"> - <caption>{L_FORUM_STATS}</caption> - <col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" /> -<thead> -<tr> - <th>{L_STATISTIC}</th> - <th>{L_VALUE}</th> - <th>{L_STATISTIC}</th> - <th>{L_VALUE}</th> -</tr> -</thead> -<tbody> -<tr> - <td>{L_NUMBER_POSTS}: </td> - <td><b>{TOTAL_POSTS}</b></td> - <td>{L_POSTS_PER_DAY}: </td> - <td><b>{POSTS_PER_DAY}</b></td> -</tr> -<tr> - <td>{L_NUMBER_TOPICS}: </td> - <td><b>{TOTAL_TOPICS}</b></td> - <td>{L_TOPICS_PER_DAY}: </td> - <td><b>{TOPICS_PER_DAY}</b></td> -</tr> -<tr> - <td>{L_NUMBER_USERS}: </td> - <td><b>{TOTAL_USERS}</b></td> - <td>{L_USERS_PER_DAY}: </td> - <td><b>{USERS_PER_DAY}</b></td> -</tr> -<tr> - <td>{L_NUMBER_FILES}: </td> - <td><b>{TOTAL_FILES}</b></td> - <td>{L_FILES_PER_DAY}: </td> - <td><b>{FILES_PER_DAY}</b></td> -</tr> -<tr> - <td>{L_BOARD_STARTED}: </td> - <td><b>{START_DATE}</b></td> - <td>{L_AVATAR_DIR_SIZE}: </td> - <td><b>{AVATAR_DIR_SIZE}</b></td> -</tr> -<tr> - <td>{L_DATABASE_SIZE}: </td> - <td><b>{DBSIZE}</b></td> - <td>{L_UPLOAD_DIR_SIZE}: </td> - <td><b>{UPLOAD_DIR_SIZE}</b></td> -</tr> -<tr> - <td>{L_DATABASE_SERVER_INFO}: </td> - <td><b>{DATABASE_INFO}</b></td> - <td>{L_GZIP_COMPRESSION}: </td> - <td><b>{GZIP_COMPRESSION}</b></td> -</tr> -</tbody> -</table> - -<!-- IF S_ACTION_OPTIONS --> - <form id="stats" method="post" action="{U_ACTION}"> - <fieldset class="quick"> - <select name="action">{S_ACTION_OPTIONS}</select> - - <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" /> - </fieldset> - </form> -<!-- ENDIF --> +<!-- ELSE --> -<!-- IF .log --> - <h2>{L_ADMIN_LOG}</h2> + <h1>{L_WELCOME_PHPBB}</h1> + + <p>{L_ADMIN_INTRO}</p> + + <!-- IF S_DEBUG_EXTRA --> + <div class="errorbox"> + <h3>{L_WARNING}</h3> + <p>{L_DEBUG_EXTRA_WARNING}</p> + </div> + <!-- ENDIF --> - <p>{L_ADMIN_LOG_INDEX_EXPLAIN}</p> + <!-- IF S_REMOVE_INSTALL --> + <div class="errorbox"> + <h3>{L_WARNING}</h3> + <p>{L_REMOVE_INSTALL}</p> + </div> + <!-- ENDIF --> <table cellspacing="1"> + <caption>{L_FORUM_STATS}</caption> + <col class="col1" /><col class="col2" /><col class="col1" /><col class="col2" /> <thead> <tr> - <th>{L_USERNAME}</th> - <th>{L_IP}</th> - <th>{L_TIME}</th> - <th>{L_ACTION}</th> + <th>{L_STATISTIC}</th> + <th>{L_VALUE}</th> + <th>{L_STATISTIC}</th> + <th>{L_VALUE}</th> </tr> </thead> <tbody> - <!-- BEGIN log --> - <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> - - <td>{log.USERNAME}</td> - <td style="text-align: center;">{log.IP}</td> - <td style="text-align: center;">{log.DATE}</td> - <td>{log.ACTION}</td> - </tr> - <!-- END log --> + <tr> + <td>{L_NUMBER_POSTS}: </td> + <td><b>{TOTAL_POSTS}</b></td> + <td>{L_POSTS_PER_DAY}: </td> + <td><b>{POSTS_PER_DAY}</b></td> + </tr> + <tr> + <td>{L_NUMBER_TOPICS}: </td> + <td><b>{TOTAL_TOPICS}</b></td> + <td>{L_TOPICS_PER_DAY}: </td> + <td><b>{TOPICS_PER_DAY}</b></td> + </tr> + <tr> + <td>{L_NUMBER_USERS}: </td> + <td><b>{TOTAL_USERS}</b></td> + <td>{L_USERS_PER_DAY}: </td> + <td><b>{USERS_PER_DAY}</b></td> + </tr> + <tr> + <td>{L_NUMBER_FILES}: </td> + <td><b>{TOTAL_FILES}</b></td> + <td>{L_FILES_PER_DAY}: </td> + <td><b>{FILES_PER_DAY}</b></td> + </tr> + <tr> + <td>{L_BOARD_STARTED}: </td> + <td><b>{START_DATE}</b></td> + <td>{L_AVATAR_DIR_SIZE}: </td> + <td><b>{AVATAR_DIR_SIZE}</b></td> + </tr> + <tr> + <td>{L_DATABASE_SIZE}: </td> + <td><b>{DBSIZE}</b></td> + <td>{L_UPLOAD_DIR_SIZE}: </td> + <td><b>{UPLOAD_DIR_SIZE}</b></td> + </tr> + <tr> + <td>{L_DATABASE_SERVER_INFO}: </td> + <td><b>{DATABASE_INFO}</b></td> + <td>{L_GZIP_COMPRESSION}: </td> + <td><b>{GZIP_COMPRESSION}</b></td> + </tr> </tbody> </table> - <br /> - <div style="text-align: right;"><a href="{U_ADMIN_LOG}">» {L_VIEW_ADMIN_LOG}</a></div> + <!-- IF S_ACTION_OPTIONS --> + <form id="stats" method="post" action="{U_ACTION}"> + <fieldset class="quick"> + <select name="action">{S_ACTION_OPTIONS}</select> + + <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" /> + </fieldset> + </form> + <!-- ENDIF --> -<!-- ENDIF --> + <!-- IF .log --> + <h2>{L_ADMIN_LOG}</h2> -<!-- IF S_INACTIVE_USERS --> - <h2>{L_INACTIVE_USERS}</h2> + <p>{L_ADMIN_LOG_INDEX_EXPLAIN}</p> - <p>{L_INACTIVE_USERS_EXPLAIN}</p> + <table cellspacing="1"> + <thead> + <tr> + <th>{L_USERNAME}</th> + <th>{L_IP}</th> + <th>{L_TIME}</th> + <th>{L_ACTION}</th> + </tr> + </thead> + <tbody> + <!-- BEGIN log --> + <!-- IF log.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> + + <td>{log.USERNAME}</td> + <td style="text-align: center;">{log.IP}</td> + <td style="text-align: center;">{log.DATE}</td> + <td>{log.ACTION}</td> + </tr> + <!-- END log --> + </tbody> + </table> + + <br /> + <div style="text-align: right;"><a href="{U_ADMIN_LOG}">» {L_VIEW_ADMIN_LOG}</a></div> - <form id="inactive" method="post" action="{U_ACTION}"> + <!-- ENDIF --> - <table cellspacing="1"> - <thead> - <tr> - <th>{L_USERNAME}</th> - <th>{L_JOINED}</th> - <th>{L_LAST_VISIT}</th> - <th>{L_MARK}</th> - </tr> - </thead> - <tbody> - <!-- BEGIN inactive --> - <!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> + <!-- IF S_INACTIVE_USERS --> + <h2>{L_INACTIVE_USERS}</h2> - <td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td> - <td>{inactive.DATE}</td> - <td>{inactive.LAST_VISIT}</td> - <td> <input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" /> </td> - </tr> - <!-- BEGINELSE --> + <p>{L_INACTIVE_USERS_EXPLAIN}</p> + + <form id="inactive" method="post" action="{U_ACTION}"> + + <table cellspacing="1"> + <thead> <tr> - <td colspan="3" style="text-align: center;">{L_NO_INACTIVE_USERS}</td> + <th>{L_USERNAME}</th> + <th>{L_JOINED}</th> + <th>{L_LAST_VISIT}</th> + <th>{L_MARK}</th> </tr> - <!-- END inactive --> - </tbody> - </table> - - <!-- IF .inactive --> - <fieldset class="quick"> - <p><a href="javascript:marklist('inactive', 'mark', true);">{L_MARK_ALL}</a> • <a href="javascript:marklist('inactive', 'mark', false);">{L_UNMARK_ALL}</a></p> - <select name="action">{S_INACTIVE_OPTIONS}</select> + </thead> + <tbody> + <!-- BEGIN inactive --> + <!-- IF inactive.S_ROW_COUNT is even --><tr class="row1"><!-- ELSE --><tr class="row2"><!-- ENDIF --> + + <td><a href="{inactive.U_USER_ADMIN}">{inactive.USERNAME}</a></td> + <td>{inactive.DATE}</td> + <td>{inactive.LAST_VISIT}</td> + <td> <input type="checkbox" class="radio" name="mark[]" value="{inactive.USER_ID}" /> </td> + </tr> + <!-- BEGINELSE --> + <tr> + <td colspan="3" style="text-align: center;">{L_NO_INACTIVE_USERS}</td> + </tr> + <!-- END inactive --> + </tbody> + </table> + + <!-- IF .inactive --> + <fieldset class="quick"> + <p><a href="javascript:marklist('inactive', 'mark', true);">{L_MARK_ALL}</a> • <a href="javascript:marklist('inactive', 'mark', false);">{L_UNMARK_ALL}</a></p> + <select name="action">{S_INACTIVE_OPTIONS}</select> + + <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" /> + </fieldset> + <!-- ENDIF --> + + </form> - <input class="button2" type="submit" name="submit" value="{L_SUBMIT}" /> - </fieldset> <!-- ENDIF --> - </form> - <!-- ENDIF --> <!-- INCLUDE overall_footer.html -->
\ No newline at end of file diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 3b6d6388de..b10a87a8ea 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -83,7 +83,7 @@ <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}" /></dd> + <dd><input type="text" id="user" name="user" value="{USER}" /><!-- IF S_USER_INACTIVE --> [{L_USER_IS_INACTIVE}]<!-- ENDIF --></dd> <!-- IF U_SWITCH_PERMISSIONS --><dd>[ <a href="{U_SWITCH_PERMISSIONS}">{L_USE_PERMISSIONS}</a> ]</dd><!-- ENDIF --> </dl> <dl> diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index e9e75ed57d..aad3306f3e 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -1315,6 +1315,20 @@ class acp_forums delete_attachments('topic', $topic_ids, false); + // Before we remove anything we make sure we are able to adjust the post counts later. ;) + $sql = 'SELECT poster_id + FROM ' . POSTS_TABLE . ' + WHERE forum_id = ' . $forum_id . ' + AND post_postcount = 1'; + $result = $db->sql_query($sql); + + $post_counts = array(); + while ($row = $db->sql_fetchrow($result)) + { + $post_counts[$row['poster_id']] = (!empty($post_counts[$row['poster_id']])) ? $post_counts[$row['poster_id']] + 1 : 1; + } + $db->sql_freeresult($result); + switch (SQL_LAYER) { case 'mysql4': @@ -1416,6 +1430,18 @@ class acp_forums $db->sql_query("UPDATE $table SET forum_id = 0 WHERE forum_id = $forum_id"); } + // Adjust users post counts + if (sizeof($post_counts)) + { + foreach ($post_counts as $poster_id => $substract) + { + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_posts = user_posts - ' . $substract . ' + WHERE user_id = ' . $poster_id; + $db->sql_query($sql); + } + } + $db->sql_transaction('commit'); // Make sure the overall post/topic count is correct... diff --git a/phpBB/includes/acp/acp_main.php b/phpBB/includes/acp/acp_main.php index 93f8733daa..7246395ecc 100644 --- a/phpBB/includes/acp/acp_main.php +++ b/phpBB/includes/acp/acp_main.php @@ -20,6 +20,35 @@ class acp_main global $config, $db, $user, $auth, $template; global $phpbb_root_path, $phpbb_admin_path, $phpEx, $table_prefix; + // Show restore permissions notice + if ($user->data['user_perm_from'] && $auth->acl_get('a_switchperm')) + { + $this->tpl_name = 'acp_main'; + $this->page_title = 'ACP_MAIN'; + + $sql = 'SELECT user_id, username, user_colour + FROM ' . USERS_TABLE . ' + WHERE user_id = ' . $user->data['user_perm_from']; + $result = $db->sql_query($sql); + $user_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $perm_from = '<strong' . (($user_row['user_colour']) ? ' style="color: #' . $user_row['user_colour'] . '">' : '>'); + $perm_from .= ($user_row['user_id'] != ANONYMOUS) ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $user_row['user_id']) . '">' : ''; + $perm_from .= $user_row['username']; + $perm_from .= ($user_row['user_id'] != ANONYMOUS) ? '</a>' : ''; + $perm_from .= '</strong>'; + + $template->assign_vars(array( + 'S_RESTORE_PERMISSIONS' => true, + 'U_RESTORE_PERMISSIONS' => append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm'), + 'PERM_FROM' => $perm_from, + 'L_PERMISSIONS_TRANSFERED_EXPLAIN' => sprintf($user->lang['PERMISSIONS_TRANSFERED_EXPLAIN'], $perm_from, append_sid("{$phpbb_root_path}ucp.$phpEx", 'mode=restore_perm')), + )); + + return; + } + $action = request_var('action', ''); $mark = (isset($_REQUEST['mark'])) ? request_var('mark', array(0)) : array(); diff --git a/phpBB/includes/acp/acp_profile.php b/phpBB/includes/acp/acp_profile.php index 756a94cb2c..e0339ddccb 100644 --- a/phpBB/includes/acp/acp_profile.php +++ b/phpBB/includes/acp/acp_profile.php @@ -831,12 +831,11 @@ class acp_profile $lang_options[$lang_id]['lang_iso'] = $lang_iso; foreach ($options as $field => $field_type) { - $value = ($action == 'create') ? request_var('l_' . $field, '', true) : $cp->vars['l_' . $field]; + $value = ($action == 'create') ? request_var('l_' . $field, array(0 => ''), true) : $cp->vars['l_' . $field]; if ($field == 'lang_options') { - - $var = ($action == 'create' || !is_array($cp->vars['lang_options'][$lang_id])) ? $cp->vars['lang_options'] : $cp->vars['lang_options'][$lang_id]; + $var = ($action == 'create' || !is_array($cp->vars['l_lang_options'][$lang_id])) ? $cp->vars['l_lang_options'] : $cp->vars['l_lang_options'][$lang_id]; switch ($field_type) { @@ -1003,10 +1002,11 @@ class acp_profile } } - $cp->vars['l_lang_name'] = request_var('l_lang_name', '', true); - $cp->vars['l_lang_explain'] = request_var('l_lang_explain', '', true); - $cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', '', true); - $cp->vars['l_lang_options'] = request_var('l_lang_options', '', true); + // These are always arrays because the key is the language id... + $cp->vars['l_lang_name'] = request_var('l_lang_name', array(0 => ''), true); + $cp->vars['l_lang_explain'] = request_var('l_lang_explain', array(0 => ''), true); + $cp->vars['l_lang_default_value'] = request_var('l_lang_default_value', array(0 => ''), true); + $cp->vars['l_lang_options'] = request_var('l_lang_options', array(0 => ''), true); if ($cp->vars['lang_options']) { diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index bd4b0b1407..12fb528830 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -806,6 +806,7 @@ class acp_users 'S_USER_FOUNDER' => ($user_row['user_type'] == USER_FOUNDER) ? true : false, 'S_ACTION_OPTIONS' => $s_action_options, 'S_OWN_ACCOUNT' => ($user_id == $user->data['user_id']) ? true : false, + 'S_USER_INACTIVE' => ($user_row['user_type'] == USER_IGNORE || $user_row['user_type'] == USER_INACTIVE) ? true : false, 'U_SHOW_IP' => $this->u_action . "&u=$user_id&ip=" . (($ip == 'ip') ? 'hostname' : 'ip'), 'U_WHOIS' => $this->u_action . "&action=whois&user_ip={$user_row['user_ip']}", @@ -924,7 +925,7 @@ class acp_users $sql = 'SELECT lang_id FROM ' . LANG_TABLE . " - WHERE lang_iso = '" . $db->sql_escape($user_row['user_lang']) . "'"; + WHERE lang_iso = '" . $db->sql_escape($user->data['user_lang']) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 02f1553c43..ef01263abc 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -3294,7 +3294,10 @@ function garbage_collection() } // Close our DB connection. - $db->sql_close(); + if (!empty($db)) + { + $db->sql_close(); + } } /** diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index 9541c9f4cf..5d5f004064 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -309,14 +309,14 @@ class p_master { if (!file_exists("$module_path/{$this->p_class}_$this->p_name.$phpEx")) { - trigger_error('Cannot find module', E_USER_ERROR); + trigger_error("Cannot find module $module_path/{$this->p_class}_$this->p_name.$phpEx", E_USER_ERROR); } include("$module_path/{$this->p_class}_$this->p_name.$phpEx"); if (!class_exists("{$this->p_class}_$this->p_name")) { - trigger_error('Module does not contain correct class', E_USER_ERROR); + trigger_error("Module file $module_path/{$this->p_class}_$this->p_name.$phpEx does not contain correct class [{$this->p_class}_$this->p_name]", E_USER_ERROR); } if (!empty($mode)) diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index fe38b6276b..6b2acb1dfd 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -279,9 +279,30 @@ function check_rule(&$rules, &$rule_row, &$message_row, $user_id) case ACTION_MARK_AS_READ: case ACTION_MARK_AS_IMPORTANT: - case ACTION_DELETE_MESSAGE: return array('action' => $rule_row['rule_action'], 'pm_unread' => $message_row['pm_unread'], 'pm_marked' => $message_row['pm_marked']); break; + + case ACTION_DELETE_MESSAGE: + + // Check for admins/mods - users are not allowed to remove those messages... + // We do the check here to make sure the data we use is consistent + $sql = 'SELECT user_id, user_type, user_permissions + FROM ' . USERS_TABLE . ' + WHERE user_id = ' . (int) $message_row['author_id']; + $result = $db->sql_query($sql); + $userdata = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $auth2 = new auth(); + $auth2->acl($userdata); + + if (!$auth2->acl_get('a_') && !$auth->acl_get('m_') && !$auth2->acl_getf_global('m_')) + { + return array('action' => $rule_row['rule_action'], 'pm_unread' => $message_row['pm_unread'], 'pm_marked' => $message_row['pm_marked']); + } + + return false; + break; default: return false; @@ -486,8 +507,8 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) } } - $num_new += sizeof(array_unique($delete_ids)); - $num_unread += sizeof(array_unique($delete_ids)); +// $num_new += sizeof(array_unique($delete_ids)); +// $num_unread += sizeof(array_unique($delete_ids)); $num_unread += sizeof(array_unique($unread_ids)); // Do not change the order of processing @@ -668,6 +689,7 @@ function place_pm_into_folder(&$global_privmsgs_rules, $release = false) } $db->sql_query('UPDATE ' . USERS_TABLE . " SET $set_sql WHERE user_id = $user_id"); + $user->data['user_new_privmsg'] -= $num_new; $user->data['user_unread_privmsg'] -= $num_unread; } @@ -778,7 +800,7 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id) return; } - global $db; + global $db, $user; $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . " SET pm_unread = 0 @@ -791,6 +813,11 @@ function update_unread_status($unread, $msg_id, $user_id, $folder_id) SET user_unread_privmsg = user_unread_privmsg - 1 WHERE user_id = $user_id"; $db->sql_query($sql); + + if ($user->data['user_id'] == $user_id) + { + $user->data['user_unread_privmsg']--; + } } /** @@ -860,7 +887,7 @@ function handle_mark_actions($user_id, $mark_action) */ function delete_pm($user_id, $msg_ids, $folder_id) { - global $db; + global $db, $user; $user_id = (int) $user_id; $folder_id = (int) $folder_id; @@ -957,6 +984,7 @@ function delete_pm($user_id, $msg_ids, $folder_id) if ($num_unread || $num_new) { $set_sql = ($num_unread) ? 'user_unread_privmsg = user_unread_privmsg - ' . $num_unread : ''; + if ($num_new) { $set_sql .= ($set_sql != '') ? ', ' : ''; @@ -964,6 +992,9 @@ function delete_pm($user_id, $msg_ids, $folder_id) } $db->sql_query('UPDATE ' . USERS_TABLE . " SET $set_sql WHERE user_id = $user_id"); + + $user->data['user_new_privmsg'] -= $num_new; + $user->data['user_unread_privmsg'] -= $num_unread; } // Now we have to check which messages we can delete completely @@ -1141,7 +1172,7 @@ function write_pm_addresses($check_ary, $author_id, $plaintext = false) 'IS_USER' => ($type == 'user'), 'COLOUR' => ($row['colour']) ? $row['colour'] : '', 'UG_ID' => $id, - 'U_VIEW' => ($type == 'user') ? append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $id) : append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $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) ); } @@ -1223,7 +1254,7 @@ function submit_pm($mode, $subject, &$data, $update_message, $put_in_outbox = tr $id = (int) $id; // Do not rely on the address list being "valid" - if (!$id) + if (!$id || ($ug_type == 'u' && $id == ANONYMOUS)) { continue; } diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index b5dfecb45f..7183c96e1b 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -343,6 +343,65 @@ function user_delete($mode, $user_id, $post_username = false) $db->sql_query($sql); } + include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx); + + // Remove any undelivered mails... + $sql = 'SELECT msg_id, user_id + FROM ' . PRIVMSGS_TO_TABLE . ' + WHERE author_id = ' . $user_id . ' + AND folder_id = ' . PRIVMSGS_NO_BOX; + $result = $db->sql_query($sql); + + $undelivered_msg = $undelivered_user = array(); + while ($row = $db->sql_fetchrow($result)) + { + $undelivered_msg[] = $row['msg_id']; + $undelivered_user[$row['user_id']][] = true; + } + $db->sql_freeresult($result); + + if (sizeof($undelivered_msg)) + { + $sql = 'DELETE FROM ' . PRIVMSGS_TABLE . ' + WHERE ' . $db->sql_in_set('msg_id', $undelivered_msg); + $db->sql_query($sql); + } + + $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . ' + WHERE author_id = ' . $user_id . ' + AND folder_id = ' . PRIVMSGS_NO_BOX; + $db->sql_query($sql); + + // Delete all to-informations + $sql = 'DELETE FROM ' . PRIVMSGS_TO_TABLE . ' + WHERE user_id = ' . $user_id; + $db->sql_query($sql); + + // Set the remaining author id to anonymous - this way users are still able to read messages from users being removed + $sql = 'UPDATE ' . PRIVMSGS_TO_TABLE . ' + SET author_id = ' . ANONYMOUS . ' + WHERE author_id = ' . $user_id; + $db->sql_query($sql); + + $sql = 'UPDATE ' . PRIVMSGS_TABLE . ' + SET author_id = ' . ANONYMOUS . ' + WHERE author_id = ' . $user_id; + $db->sql_query($sql); + + foreach ($undelivered_user as $_user_id => $ary) + { + if ($_user_id == $user_id) + { + continue; + } + + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_new_privmsg = user_new_privmsg - ' . sizeof($ary) . ', + user_unread_privmsg = user_unread_privmsg - ' . sizeof($ary) . ' + WHERE user_id = ' . $_user_id; + $db->sql_query($sql); + } + // Reset newest user info if appropriate if ($config['newest_user_id'] == $user_id) { diff --git a/phpBB/includes/ucp/ucp_pm.php b/phpBB/includes/ucp/ucp_pm.php index 5d1a4297ee..ace879c3d9 100644 --- a/phpBB/includes/ucp/ucp_pm.php +++ b/phpBB/includes/ucp/ucp_pm.php @@ -246,6 +246,17 @@ class ucp_pm { place_pm_into_folder($global_privmsgs_rules, request_var('release', 0)); $num_not_moved = $user->data['user_new_privmsg']; + + // Make sure num_not_moved is valid. + if ($num_not_moved < 0) + { + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_new_privmsg = 0, user_unread_privmsg = 0 + WHERE user_id = ' . $user->data['user_id']; + $db->sql_query($sql); + + $num_not_moved = $user->data['user_new_privmsg'] = $user->data['user_unread_privmsg'] = 0; + } } if (!$msg_id && $folder_id == PRIVMSGS_NO_BOX) diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index ff95bfc307..cd495535ec 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -177,7 +177,7 @@ function compose_pm($id, $mode, $action) $folder_id = (isset($post['folder_id'])) ? $post['folder_id'] : 0; $message_text = (isset($post['message_text'])) ? $post['message_text'] : ''; - if (!$post['author_id'] && $msg_id) + if ((!$post['author_id'] || ($post['author_id'] == ANONYMOUS && $action != 'delete')) && $msg_id) { trigger_error('NO_AUTHOR'); } @@ -900,6 +900,11 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_ while ($row = $db->sql_fetchrow($result)) { + if ($row['user_id'] == ANONYMOUS) + { + continue; + } + $address_list['u'][$row['user_id']] = $type; } $db->sql_freeresult($result); @@ -908,6 +913,11 @@ function handle_message_list_actions(&$address_list, $remove_u, $remove_g, $add_ { foreach ($user_id_ary as $user_id) { + if ($user_id == ANONYMOUS) + { + continue; + } + $address_list['u'][$user_id] = $type; } } diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index ab5318f9d8..db257b4cb0 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -166,7 +166,16 @@ function view_folder($id, $mode, $folder_id, $folder) { $user_colour = ($recipient_list[$type][$ug_id]['colour']) ? ' style="color:#' . $recipient_list[$type][$ug_id]['colour'] . '"' : ''; - $address_list[$message_id][] = (($type == 'u') ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $ug_id) . '"' . $user_colour . '>' : '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $ug_id) . '"' . $user_colour . '>') . $recipient_list[$type][$ug_id]['name'] . '</a>'; + if ($type == 'u') + { + $link = ($ug_id != ANONYMOUS) ? '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $ug_id) . '"' . $user_colour . '>' : ''; + } + else + { + $link = '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&g=' . $ug_id) . '"' . $user_colour . '>'; + } + + $address_list[$message_id][] = $link . $recipient_list[$type][$ug_id]['name'] . (($link) ? '</a>' : ''); } } } @@ -183,7 +192,7 @@ function view_folder($id, $mode, $folder_id, $folder) $folder_alt = ($row['pm_unread']) ? 'NEW_MESSAGES' : 'NO_NEW_MESSAGES'; // Generate all URIs ... - $message_author = '<a href="' . append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $row['author_id']) . '">' . $row['username'] . '</a>'; + $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"); @@ -217,6 +226,7 @@ function view_folder($id, $mode, $folder_id, $folder) 'ATTACH_ICON_IMG' => ($auth->acl_get('u_pm_download') && $row['message_attachment'] && $config['allow_pm_attach']) ? $user->img('icon_topic_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', 'S_PM_DELETED' => ($row['pm_deleted']) ? true : false, + 'S_AUTHOR_DELETED' => ($row['author_id'] == ANONYMOUS) ? true : false, 'U_VIEW_PM' => ($row['pm_deleted']) ? '' : $view_message_url, 'U_REMOVE_PM' => ($row['pm_deleted']) ? $remove_message_url : '', diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 3ffc19df55..5e6917073f 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -193,16 +193,17 @@ 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' => append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile&u=' . $author_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')) ? "$url&mode=compose&action=quote&f=$folder_id&p=" . $message_row['msg_id'] : '', + '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'] : '', - 'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '', + 'U_POST_REPLY_PM' => ($auth->acl_get('u_sendpm') && $author_id != ANONYMOUS) ? "$url&mode=compose&action=reply&f=$folder_id&p=" . $message_row['msg_id'] : '', 'U_PREVIOUS_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=previous", 'U_NEXT_PM' => "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=next", 'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false, 'S_DISPLAY_NOTICE' => $display_notice && $message_row['message_attachment'], + 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false, 'U_PRINT_PM' => ($config['print_pm'] && $auth->acl_get('u_pm_printpm')) ? "$url&f=$folder_id&p=" . $message_row['msg_id'] . "&view=print" : '', 'U_FORWARD_PM' => ($config['forward_pm'] && $auth->acl_get('u_pm_forward')) ? "$url&mode=compose&action=forward&f=$folder_id&p=" . $message_row['msg_id'] : '') @@ -321,7 +322,7 @@ function message_history($msg_id, $user_id, $message_row, $folder) $message = $row['message_text']; $message = censor_text($message); - $message = str_replace("\n", '<br />', $message) + $message = str_replace("\n", '<br />', $message); if ($row['bbcode_bitfield']) { @@ -346,13 +347,14 @@ function message_history($msg_id, $user_id, $message_row, $folder) 'MESSAGE' => $message, 'FOLDER' => implode(', ', $row['folder']), - 'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id), - + 'S_CURRENT_MSG' => ($row['msg_id'] == $msg_id), + 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false, + 'U_MSG_ID' => $row['msg_id'], 'U_VIEW_MESSAGE' => "$url&f=$folder_id&p=" . $row['msg_id'], - 'U_AUTHOR_PROFILE' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$author_id"), - 'U_QUOTE' => ($auth->acl_get('u_sendpm') && $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'] && $auth->acl_get('u_sendpm')) ? "$url&mode=compose&action=reply&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'] : '') ); unset($rowset[$id]); $prev_id = $id; diff --git a/phpBB/includes/utf/utf_tools.php b/phpBB/includes/utf/utf_tools.php index ede1dd85ea..a187253bca 100644 --- a/phpBB/includes/utf/utf_tools.php +++ b/phpBB/includes/utf/utf_tools.php @@ -38,6 +38,7 @@ function utf8_strlen($text) return mb_strlen($text, 'utf-8'); } + // Since utf8_decode is replacing multibyte characters to ? strlen works fine return strlen(utf8_decode($text)); } diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index ee40c0ff2c..7525c67971 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -383,7 +383,7 @@ INSERT INTO phpbb_acl_roles (role_name, role_description, role_type, role_order) INSERT INTO phpbb_styles (style_name, style_copyright, template_id, theme_id, imageset_id) VALUES ('subSilver', '© phpBB Group', 1, 1, 1); # -- phpbb_styles_imageset -INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path, site_logo, upload_bar, poll_left, poll_center, poll_right, icon_friend, icon_foe, forum_link, forum_read, forum_read_locked, forum_read_subforum, forum_unread, forum_unread_locked, forum_unread_subforum, topic_moved, topic_read, topic_read_mine, topic_read_hot, topic_read_hot_mine, topic_read_locked, topic_read_locked_mine, topic_unread, topic_unread_mine, topic_unread_hot, topic_unread_hot_mine, topic_unread_locked, topic_unread_locked_mine, sticky_read, sticky_read_mine, sticky_read_locked, sticky_read_locked_mine, sticky_unread, sticky_unread_mine, sticky_unread_locked, sticky_unread_locked_mine, announce_read, announce_read_mine, announce_read_locked, announce_read_locked_mine, announce_unread, announce_unread_mine, announce_unread_locked, announce_unread_locked_mine, global_read, global_read_mine, global_read_locked, global_read_locked_mine, global_unread, global_unread_mine, global_unread_locked, global_unread_locked_mine, pm_read, pm_unread, icon_contact_aim, icon_contact_email, icon_contact_icq, icon_contact_jabber, icon_contact_msnm, icon_contact_pm, icon_contact_yahoo, icon_contact_www, icon_post_delete, icon_post_edit, icon_post_info, icon_post_quote, icon_post_report, icon_post_target, icon_post_target_unread, icon_topic_attach, icon_topic_latest, icon_topic_newest, icon_topic_reported, icon_topic_unapproved, icon_user_online, icon_user_offline, icon_user_profile, icon_user_search, icon_user_warn, button_pm_forward, button_pm_new, button_pm_reply, button_topic_locked, button_topic_new, button_topic_reply, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10) VALUES ('subSilver', '© phpBB Group, 2003', 'subSilver', 'site_logo.gif*94*170', 'upload_bar.gif*16*280', 'poll_left.gif*12*4', 'poll_center.gif*12*', 'poll_right.gif*12*4', '', '', 'forum_link.gif*25*46', 'forum_read.gif*25*46', 'forum_read_locked.gif*25*46', 'forum_read_subforum.gif*25*46', 'forum_unread.gif*25*46', 'forum_unread_locked.gif*25*46', 'forum_unread_subforum.gif*25*46', 'topic_moved.gif*18*19', 'topic_read.gif*18*19', 'topic_read_mine.gif*18*19', 'topic_read_hot.gif*18*19', 'topic_read_hot_mine.gif*18*19', 'topic_read_locked.gif*18*19', 'topic_read_locked_mine.gif*18*19', 'topic_unread.gif*18*19', 'topic_unread_mine.gif*18*19', 'topic_unread_hot.gif*18*19', 'topic_unread_hot_mine.gif*18*19', 'topic_unread_locked.gif*18*19', 'topic_unread_locked_mine.gif*18*19', 'sticky_read.gif*18*19', 'sticky_read_mine.gif*18*19', 'sticky_read_locked.gif*18*19', 'sticky_read_locked_mine.gif*18*19', 'sticky_unread.gif*18*19', 'sticky_unread_mine.gif*18*19', 'sticky_unread_locked.gif*18*19', 'sticky_unread_locked_mine.gif*18*19', 'announce_read.gif*18*19', 'announce_read_mine.gif*18*19', 'announce_read_locked.gif*18*19', 'announce_read_locked_mine.gif*18*19', 'announce_unread.gif*18*19', 'announce_unread_mine.gif*18*19', 'announce_unread_locked.gif*18*19', 'announce_unread_locked_mine.gif*18*19', 'announce_read.gif*18*19', 'announce_read_mine.gif*18*19', 'announce_read_locked.gif*18*19', 'announce_read_locked_mine.gif*18*19', 'announce_unread.gif*18*19', 'announce_unread_mine.gif*18*19', 'announce_unread_locked.gif*18*19', 'announce_unread_locked_mine.gif*18*19', 'topic_read.gif*18*19', 'topic_unread.gif*18*19', '{LANG}/icon_contact_aim.gif*20*72', '{LANG}/icon_contact_email.gif*20*72', '{LANG}/icon_contact_icq.gif*20*72', '{LANG}/icon_contact_jabber.gif*20*72', '{LANG}/icon_contact_msnm.gif*20*72', '{LANG}/icon_contact_pm.gif*20*72', '{LANG}/icon_contanct_yahoo.gif*20*72', '{LANG}/icon_contact_www.gif*20*72', '{LANG}/icon_post_delete.gif*20*20', '{LANG}/icon_post_edit.gif*20*90', '{LANG}/icon_post_info.gif*20*20', '{LANG}/icon_post_quote.gif*20*90', '{LANG}/icon_post_report.gif*20*20', 'icon_post_target.gif*9*12', 'icon_post_target_unread.gif*9*12', 'icon_topic_attach.gif*18*14', 'icon_topic_latest.gif*9*18', 'icon_topic_newest.gif*9*18', 'icon_topic_reported.gif*18*19', 'icon_topic_unapproved.gif*18*19', '{LANG}/icon_user_online.gif*20*72', '{LANG}/icon_user_offline.gif*20*72', '{LANG}/icon_user_profile.gif*20*72', '{LANG}/icon_user_search.gif*20*72', '{LANG}/icon_user_warn.gif*20*20', '', '{LANG}/button_pm_new.gif*27*97', '{LANG}/button_pm_reply.gif*20*90', '{LANG}/button_topic_locked.gif*27*97', '{LANG}/button_topic_new.gif*27*97', '{LANG}/button_topic_reply.gif*27*97', '', '', '', '', '', '', '', '', '', ''); +INSERT INTO phpbb_styles_imageset (imageset_name, imageset_copyright, imageset_path, site_logo, upload_bar, poll_left, poll_center, poll_right, icon_friend, icon_foe, forum_link, forum_read, forum_read_locked, forum_read_subforum, forum_unread, forum_unread_locked, forum_unread_subforum, topic_moved, topic_read, topic_read_mine, topic_read_hot, topic_read_hot_mine, topic_read_locked, topic_read_locked_mine, topic_unread, topic_unread_mine, topic_unread_hot, topic_unread_hot_mine, topic_unread_locked, topic_unread_locked_mine, sticky_read, sticky_read_mine, sticky_read_locked, sticky_read_locked_mine, sticky_unread, sticky_unread_mine, sticky_unread_locked, sticky_unread_locked_mine, announce_read, announce_read_mine, announce_read_locked, announce_read_locked_mine, announce_unread, announce_unread_mine, announce_unread_locked, announce_unread_locked_mine, global_read, global_read_mine, global_read_locked, global_read_locked_mine, global_unread, global_unread_mine, global_unread_locked, global_unread_locked_mine, pm_read, pm_unread, icon_contact_aim, icon_contact_email, icon_contact_icq, icon_contact_jabber, icon_contact_msnm, icon_contact_pm, icon_contact_yahoo, icon_contact_www, icon_post_delete, icon_post_edit, icon_post_info, icon_post_quote, icon_post_report, icon_post_target, icon_post_target_unread, icon_topic_attach, icon_topic_latest, icon_topic_newest, icon_topic_reported, icon_topic_unapproved, icon_user_online, icon_user_offline, icon_user_profile, icon_user_search, icon_user_warn, button_pm_forward, button_pm_new, button_pm_reply, button_topic_locked, button_topic_new, button_topic_reply, user_icon1, user_icon2, user_icon3, user_icon4, user_icon5, user_icon6, user_icon7, user_icon8, user_icon9, user_icon10) VALUES ('subSilver', '© phpBB Group, 2003', 'subSilver', 'site_logo.gif*94*170', 'upload_bar.gif*16*280', 'poll_left.gif*12*4', 'poll_center.gif*12*', 'poll_right.gif*12*4', '', '', 'forum_link.gif*25*46', 'forum_read.gif*25*46', 'forum_read_locked.gif*25*46', 'forum_read_subforum.gif*25*46', 'forum_unread.gif*25*46', 'forum_unread_locked.gif*25*46', 'forum_unread_subforum.gif*25*46', 'topic_moved.gif*18*19', 'topic_read.gif*18*19', 'topic_read_mine.gif*18*19', 'topic_read_hot.gif*18*19', 'topic_read_hot_mine.gif*18*19', 'topic_read_locked.gif*18*19', 'topic_read_locked_mine.gif*18*19', 'topic_unread.gif*18*19', 'topic_unread_mine.gif*18*19', 'topic_unread_hot.gif*18*19', 'topic_unread_hot_mine.gif*18*19', 'topic_unread_locked.gif*18*19', 'topic_unread_locked_mine.gif*18*19', 'sticky_read.gif*18*19', 'sticky_read_mine.gif*18*19', 'sticky_read_locked.gif*18*19', 'sticky_read_locked_mine.gif*18*19', 'sticky_unread.gif*18*19', 'sticky_unread_mine.gif*18*19', 'sticky_unread_locked.gif*18*19', 'sticky_unread_locked_mine.gif*18*19', 'announce_read.gif*18*19', 'announce_read_mine.gif*18*19', 'announce_read_locked.gif*18*19', 'announce_read_locked_mine.gif*18*19', 'announce_unread.gif*18*19', 'announce_unread_mine.gif*18*19', 'announce_unread_locked.gif*18*19', 'announce_unread_locked_mine.gif*18*19', 'announce_read.gif*18*19', 'announce_read_mine.gif*18*19', 'announce_read_locked.gif*18*19', 'announce_read_locked_mine.gif*18*19', 'announce_unread.gif*18*19', 'announce_unread_mine.gif*18*19', 'announce_unread_locked.gif*18*19', 'announce_unread_locked_mine.gif*18*19', 'topic_read.gif*18*19', 'topic_unread.gif*18*19', '{LANG}/icon_contact_aim.gif*20*72', '{LANG}/icon_contact_email.gif*20*72', '{LANG}/icon_contact_icq.gif*20*72', '{LANG}/icon_contact_jabber.gif*20*72', '{LANG}/icon_contact_msnm.gif*20*72', '{LANG}/icon_contact_pm.gif*20*72', '{LANG}/icon_contact_yahoo.gif*20*72', '{LANG}/icon_contact_www.gif*20*72', '{LANG}/icon_post_delete.gif*20*20', '{LANG}/icon_post_edit.gif*20*90', '{LANG}/icon_post_info.gif*20*20', '{LANG}/icon_post_quote.gif*20*90', '{LANG}/icon_post_report.gif*20*20', 'icon_post_target.gif*9*12', 'icon_post_target_unread.gif*9*12', 'icon_topic_attach.gif*18*14', 'icon_topic_latest.gif*9*18', 'icon_topic_newest.gif*9*18', 'icon_topic_reported.gif*18*19', 'icon_topic_unapproved.gif*18*19', '{LANG}/icon_user_online.gif*20*72', '{LANG}/icon_user_offline.gif*20*72', '{LANG}/icon_user_profile.gif*20*72', '{LANG}/icon_user_search.gif*20*72', '{LANG}/icon_user_warn.gif*20*20', '', '{LANG}/button_pm_new.gif*27*97', '{LANG}/button_pm_reply.gif*20*90', '{LANG}/button_topic_locked.gif*27*97', '{LANG}/button_topic_new.gif*27*97', '{LANG}/button_topic_reply.gif*27*97', '', '', '', '', '', '', '', '', '', ''); # -- phpbb_styles_template INSERT INTO phpbb_styles_template (template_name, template_copyright, template_path) VALUES ('subSilver', '© phpBB Group', 'subSilver'); diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 0847ff44c9..9ffba39d6a 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -241,14 +241,16 @@ $lang = array_merge($lang, array( 'OFF' => 'OFF', 'ON' => 'ON', - 'PARSE_BBCODE' => 'Parse BBCode', - 'PARSE_SMILIES' => 'Parse Smilies', - 'PARSE_URLS' => 'Parse Links', - 'PROCEED_TO_ACP' => '%sProceed to the ACP%s', - 'REMIND' => 'Remind', - 'REORDER' => 'Reorder', - 'RESYNC' => 'Sync', - 'RETURN_TO' => 'Return to ...', + 'PARSE_BBCODE' => 'Parse BBCode', + 'PARSE_SMILIES' => 'Parse Smilies', + 'PARSE_URLS' => 'Parse Links', + 'PERMISSIONS_TRANSFERED' => 'Permissions transfered', + 'PERMISSIONS_TRANSFERED_EXPLAIN' => 'You are currently having the permissions from %1$s. You are able to browse the forum with the users permissions but not access the administration control panel since admin permissions were not transfered. You are able to <a href="%2$s"><strong>revert to your permission set</strong></a> at any time.', + 'PROCEED_TO_ACP' => '%sProceed to the ACP%s', + 'REMIND' => 'Remind', + 'REORDER' => 'Reorder', + 'RESYNC' => 'Sync', + 'RETURN_TO' => 'Return to ...', 'SELECT_ANONYMOUS' => 'Select Anonymous User', 'SELECT_OPTION' => 'Select option', diff --git a/phpBB/language/en/acp/users.php b/phpBB/language/en/acp/users.php index 6398ff8f70..3f36325ab5 100644 --- a/phpBB/language/en/acp/users.php +++ b/phpBB/language/en/acp/users.php @@ -100,6 +100,7 @@ $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', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index c9c22c6221..579642e08a 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -323,6 +323,7 @@ $lang = array_merge($lang, array( 'PERMISSIONS_TRANSFERED' => 'Successfully transfered permissions from <strong>%s</strong>, you are now able to browse the forum with the users permissions.<br />Please note that admin permissions were not transfered. You are able to revert to your permission set at any time.', 'PM_DISABLED' => 'Private messaging has been disabled on this board', 'PM_FROM' => 'From', + 'PM_FROM_REMOVED_AUTHOR' => 'This message was sent by a user no longer registered.', 'PM_ICON' => 'PM icon', 'PM_INBOX' => 'Inbox', 'PM_OUTBOX' => 'Outbox', diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html b/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html index 5173341047..62e2a84260 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html @@ -72,6 +72,9 @@ <!-- ELSE --> <a href="{messagerow.U_VIEW_PM}">{messagerow.SUBJECT}</a> <!-- ENDIF --> + <!-- IF messagerow.S_AUTHOR_DELETED --> + <br /><em class="gensmall">{L_PM_FROM_REMOVED_AUTHOR}</em> + <!-- 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> diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html index 868cb063c9..0d29d32283 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html @@ -14,7 +14,7 @@ <tr class="row1"> <td class="genmed" nowrap="nowrap" width="150"><b>{L_PM_FROM}:</b></td> - <td class="gen"><a href="{U_AUTHOR_PROFILE}">{AUTHOR_NAME}</a></td> + <td class="gen"><!-- IF U_AUTHOR_PROFILE --><a href="{U_AUTHOR_PROFILE}">{AUTHOR_NAME}</a><!-- ELSE -->{AUTHOR_NAME}<!-- ENDIF --></td> </tr> <tr class="row1"> @@ -27,7 +27,11 @@ <td class="genmed" nowrap="nowrap" width="150"><b>{L_TO}:</b></td> <td class="gen"> <!-- BEGIN to_recipient --> - <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> + <!-- 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 --> <!-- END to_recipient --> </td> </tr> @@ -38,7 +42,11 @@ <td class="genmed" nowrap="nowrap" width="150"><b>{L_BCC}:</b></td> <td class="gen"> <!-- BEGIN bcc_recipient --> - <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> + <!-- 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 --> <!-- END bcc_recipient --> </td> </tr> |