diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-15 13:03:57 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-03-15 13:03:57 +0000 |
commit | d907d066f2e0d7974766370b11dab69a59962f97 (patch) | |
tree | 146a203caa445298e084088c30311b959d00c9f1 | |
parent | 8c3f94f9ae8a1333be8c01dd2e0be74dffc91831 (diff) | |
download | forums-d907d066f2e0d7974766370b11dab69a59962f97.tar forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.gz forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.bz2 forums-d907d066f2e0d7974766370b11dab69a59962f97.tar.xz forums-d907d066f2e0d7974766370b11dab69a59962f97.zip |
- adding ability to assign moderator specific ban options
- fixing destroying of sql caches
- fixing referencing of sql cached queries if more than one are active on one page
- other fixes
git-svn-id: file:///svn/phpbb/trunk@5633 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r-- | phpBB/adm/style/acp_ban.html | 2 | ||||
-rw-r--r-- | phpBB/includes/acm/acm_file.php | 21 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_ban.php | 71 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_forums.php | 7 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_icons.php | 4 | ||||
-rw-r--r-- | phpBB/includes/acp/acp_modules.php | 3 | ||||
-rw-r--r-- | phpBB/includes/functions.php | 2 | ||||
-rw-r--r-- | phpBB/includes/functions_module.php | 13 | ||||
-rw-r--r-- | phpBB/includes/functions_user.php | 35 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_ban.php | 140 | ||||
-rw-r--r-- | phpBB/includes/mcp/mcp_queue.php | 2 | ||||
-rw-r--r-- | phpBB/includes/session.php | 18 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_main.php | 26 | ||||
-rw-r--r-- | phpBB/install/schemas/schema_data.sql | 52 | ||||
-rw-r--r-- | phpBB/language/en/acp/ban.php | 1 | ||||
-rw-r--r-- | phpBB/language/en/acp/permissions_phpbb.php | 1 | ||||
-rw-r--r-- | phpBB/language/en/mcp.php | 5 | ||||
-rw-r--r-- | phpBB/language/en/posting.php | 2 | ||||
-rw-r--r-- | phpBB/posting.php | 2 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/mcp_ban.html | 108 | ||||
-rw-r--r-- | phpBB/styles/subSilver/template/mcp_move.html | 3 | ||||
-rw-r--r-- | phpBB/viewtopic.php | 55 |
22 files changed, 440 insertions, 133 deletions
diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index 35b4539336..6eed1500e7 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -69,6 +69,8 @@ <input class="button2" type="reset" id="banreset" name="banreset" value="{L_RESET}" /> </fieldset> +<br /><br /> + <h1>{L_UNBAN_TITLE}</h1> <p>{L_UNBAN_EXPLAIN}</p> diff --git a/phpBB/includes/acm/acm_file.php b/phpBB/includes/acm/acm_file.php index 3a11f5b6d6..c5162a36d3 100644 --- a/phpBB/includes/acm/acm_file.php +++ b/phpBB/includes/acm/acm_file.php @@ -154,11 +154,6 @@ class acm { global $phpEx; - if (!$this->_exists($var_name)) - { - return; - } - if ($var_name == 'sql' && !empty($table)) { $regex = '(' . ((is_array($table)) ? implode('|', $table) : $table) . ')'; @@ -166,7 +161,7 @@ class acm $dir = opendir($this->cache_dir); while ($entry = readdir($dir)) { - if (substr($entry, 0, 4) != 'sql_') + if (strpos($entry, 'sql_') !== 0) { continue; } @@ -181,8 +176,16 @@ class acm } } @closedir($dir); + + return; } - else if ($var_name{0} == '_') + + if (!$this->_exists($var_name)) + { + return; + } + + if ($var_name{0} == '_') { @unlink($this->cache_dir . 'data' . $var_name . ".$phpEx"); } @@ -251,7 +254,7 @@ class acm // Remove extra spaces and tabs $query = preg_replace('/[\n\r\s\t]+/', ' ', $query); - $query_id = 'Cache id #' . sizeof($this->sql_rowset); + $query_id = sizeof($this->sql_rowset); if (!file_exists($this->cache_dir . 'sql_' . md5($query) . ".$phpEx")) { @@ -285,7 +288,7 @@ class acm @flock($fp, LOCK_EX); $lines = array(); - $query_id = 'Cache id #' . sizeof($this->sql_rowset); + $query_id = sizeof($this->sql_rowset); $this->sql_rowset[$query_id] = array(); while ($row = $db->sql_fetchrow($query_result)) diff --git a/phpBB/includes/acp/acp_ban.php b/phpBB/includes/acp/acp_ban.php index 4c8a1a0dfc..6b4f2f843b 100644 --- a/phpBB/includes/acp/acp_ban.php +++ b/phpBB/includes/acp/acp_ban.php @@ -53,15 +53,6 @@ class acp_ban trigger_error($user->lang['BAN_UPDATE_SUCESSFUL'] . adm_back_link($this->u_action)); } - // Ban length options - $ban_end_text = array(0 => $user->lang['PERMANENT'], 30 => $user->lang['30_MINS'], 60 => $user->lang['1_HOUR'], 360 => $user->lang['6_HOURS'], 1440 => $user->lang['1_DAY'], 10080 => $user->lang['7_DAYS'], 20160 => $user->lang['2_WEEKS'], 40320 => $user->lang['1_MONTH'], -1 => $user->lang['UNTIL'] . ' -> '); - - $ban_end_options = ''; - foreach ($ban_end_text as $length => $text) - { - $ban_end_options .= '<option value="' . $length . '">' . $text . '</option>'; - } - // Define language vars $this->page_title = $user->lang[strtoupper($mode) . '_BAN']; @@ -74,6 +65,53 @@ class acp_ban switch ($mode) { case 'user': + $l_ban_cell = $user->lang['USERNAME']; + break; + + case 'ip': + $l_ban_cell = $user->lang['IP_HOSTNAME']; + break; + + case 'email': + $l_ban_cell = $user->lang['EMAIL_ADDRESS']; + break; + } + + $this->display_ban_options($mode); + + $template->assign_vars(array( + 'L_TITLE' => $this->page_title, + 'L_EXPLAIN' => $l_ban_explain, + 'L_UNBAN_TITLE' => $l_unban_title, + 'L_UNBAN_EXPLAIN' => $l_unban_explain, + 'L_BAN_CELL' => $l_ban_cell, + 'L_BAN_EXCLUDE_EXPLAIN' => $l_ban_exclude_explain, + 'L_NO_BAN_CELL' => $l_no_ban_cell, + + 'S_USERNAME_BAN' => ($mode == 'user') ? true : false, + + 'U_ACTION' => $this->u_action, + 'U_FIND_USER' => $phpbb_root_path . "memberlist.$phpEx$SID&mode=searchuser&form=acp_ban&field=ban", + ) + ); + } + + function display_ban_options($mode) + { + global $user, $db, $template; + + // Ban length options + $ban_end_text = array(0 => $user->lang['PERMANENT'], 30 => $user->lang['30_MINS'], 60 => $user->lang['1_HOUR'], 360 => $user->lang['6_HOURS'], 1440 => $user->lang['1_DAY'], 10080 => $user->lang['7_DAYS'], 20160 => $user->lang['2_WEEKS'], 40320 => $user->lang['1_MONTH'], -1 => $user->lang['UNTIL'] . ' -> '); + + $ban_end_options = ''; + foreach ($ban_end_text as $length => $text) + { + $ban_end_options .= '<option value="' . $length . '">' . $text . '</option>'; + } + + switch ($mode) + { + case 'user': $field = 'username'; $l_ban_cell = $user->lang['USERNAME']; @@ -163,22 +201,9 @@ class acp_ban } $template->assign_vars(array( - 'L_TITLE' => $this->page_title, - 'L_EXPLAIN' => $l_ban_explain, - 'L_UNBAN_TITLE' => $l_unban_title, - 'L_UNBAN_EXPLAIN' => $l_unban_explain, - 'L_BAN_CELL' => $l_ban_cell, - 'L_BAN_EXCLUDE_EXPLAIN' => $l_ban_exclude_explain, - 'L_NO_BAN_CELL' => $l_no_ban_cell, - - 'S_USERNAME_BAN' => ($mode == 'user') ? true : false, 'S_BAN_END_OPTIONS' => $ban_end_options, 'S_BANNED_OPTIONS' => ($banned_options) ? true : false, - 'BANNED_OPTIONS' => $banned_options, - - 'U_ACTION' => $this->u_action, - 'U_FIND_USER' => $phpbb_root_path . "memberlist.$phpEx$SID&mode=searchuser&form=acp_ban&field=ban", - ) + 'BANNED_OPTIONS' => $banned_options) ); } } diff --git a/phpBB/includes/acp/acp_forums.php b/phpBB/includes/acp/acp_forums.php index 3869a3ac4a..e6630e36d2 100644 --- a/phpBB/includes/acp/acp_forums.php +++ b/phpBB/includes/acp/acp_forums.php @@ -75,6 +75,8 @@ class acp_forums } $auth->acl_clear_prefetch(); + $cache->destroy('sql', FORUMS_TABLE); + recalc_btree('forum_id', FORUMS_TABLE); trigger_error($user->lang['FORUM_DELETED'] . adm_back_link($this->u_action . '&parent_id=' . $this->parent_id)); @@ -174,6 +176,8 @@ class acp_forums } $auth->acl_clear_prefetch(); + $cache->destroy('sql', FORUMS_TABLE); + recalc_btree('forum_id', FORUMS_TABLE); $acl_url = '&mode=setting_forum_local&forum_id[]=' . $forum_data['forum_id']; @@ -306,6 +310,8 @@ class acp_forums add_log('admin', $log_action, $forum_data['forum_name'], $move_forum_name); unset($forum_data); + $cache->destroy('sql', FORUMS_TABLE); + break; case 'sync': @@ -328,6 +334,7 @@ class acp_forums sync('forum', 'forum_id', $forum_id); add_log('admin', 'LOG_FORUM_SYNC', $row['forum_name']); + $cache->destroy('sql', FORUMS_TABLE); $template->assign_var('L_FORUM_RESYNCED', sprintf($user->lang['FORUM_RESYNCED'], $row['forum_name'])); diff --git a/phpBB/includes/acp/acp_icons.php b/phpBB/includes/acp/acp_icons.php index dd581475f2..44e9f450a5 100644 --- a/phpBB/includes/acp/acp_icons.php +++ b/phpBB/includes/acp/acp_icons.php @@ -303,6 +303,7 @@ class acp_icons } $cache->destroy('icons'); + $cache->destroy('sql', $table); if ($action == 'modify') { @@ -427,6 +428,8 @@ class acp_icons } $cache->destroy('icons'); + $cache->destroy('sql', $table); + trigger_error($user->lang[$lang . '_IMPORT_SUCCESS'] . adm_back_link($this->u_action)); } else @@ -553,6 +556,7 @@ class acp_icons $db->sql_query($sql); $cache->destroy('icons'); + $cache->destroy('sql', $table); break; } diff --git a/phpBB/includes/acp/acp_modules.php b/phpBB/includes/acp/acp_modules.php index 927fed7502..8065080e30 100644 --- a/phpBB/includes/acp/acp_modules.php +++ b/phpBB/includes/acp/acp_modules.php @@ -755,6 +755,9 @@ class acp_modules $p_class = str_replace(array('.', '/', '\\'), '', basename($this->module_class)); $cache->destroy('_modules_' . $p_class); + + // Additionally remove sql cache + $cache->destroy('sql', MODULES_TABLE); } /** diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index 4c3b0609d9..57aa3f9593 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2302,7 +2302,7 @@ function page_footer() if (!defined('IN_CRON')) { $cron_type = ''; - + if (time() - $config['queue_interval'] > $config['last_queue_run'] && !defined('IN_ADMIN') && file_exists($phpbb_root_path . 'cache/queue.' . $phpEx)) { // Process email queue diff --git a/phpBB/includes/functions_module.php b/phpBB/includes/functions_module.php index b7af1c4b17..cbd689a3ff 100644 --- a/phpBB/includes/functions_module.php +++ b/phpBB/includes/functions_module.php @@ -209,7 +209,7 @@ class p_master /** * Check module authorisation - * @todo implement $this->is_module_id + * @todo Have a look at the eval statement and replace with other code... */ function module_auth($module_auth) { @@ -291,7 +291,7 @@ class p_master */ function load_active($mode = false) { - global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID; + global $phpbb_root_path, $phpbb_admin_path, $phpEx, $SID, $user; $module_path = $phpbb_root_path . 'includes/' . $this->p_class; $icat = request_var('icat', ''); @@ -322,7 +322,14 @@ class p_master $this->module = new $instance($this); // We pre-define the action parameter we are using all over the place - $this->module->u_action = "{$phpbb_admin_path}index.$phpEx$SID" . (($icat) ? '&icat=' . $icat : '') . "&i={$this->p_id}&mode={$this->p_mode}"; + if (defined('IN_ADMIN')) + { + $this->module->u_action = "{$phpbb_admin_path}index.$phpEx$SID" . (($icat) ? '&icat=' . $icat : '') . "&i={$this->p_id}&mode={$this->p_mode}"; + } + else + { + $this->module->u_action = "{$phpbb_root_path}{$user->page['page_dir']}{$user->page['page_name']}$SID" . (($icat) ? '&icat=' . $icat : '') . "&i={$this->p_id}&mode={$this->p_mode}"; + } // Execute the main method for the new instance, we send the module // id and mode as parameters diff --git a/phpBB/includes/functions_user.php b/phpBB/includes/functions_user.php index 269fee2c26..3cf2c4ec4a 100644 --- a/phpBB/includes/functions_user.php +++ b/phpBB/includes/functions_user.php @@ -923,40 +923,7 @@ function validate_email($email) return 'EMAIL_INVALID'; } - /** - * @todo This is a duplication of code from session->check_ban() - */ - $sql = 'SELECT ban_ip, ban_userid, ban_email, ban_exclude, ban_give_reason, ban_end - FROM ' . BANLIST_TABLE . ' - WHERE ban_end >= ' . time() . ' - OR ban_end = 0'; - $result = $db->sql_query($sql); - - $banned = false; - if ($row = $db->sql_fetchrow($result)) - { - do - { - if (!empty($row['ban_email']) && preg_match('#^' . str_replace('*', '.*?', $row['ban_email']) . '$#i', $email)) - { - if (!empty($row['ban_exclude'])) - { - $banned = false; - break; - } - else - { - $banned = true; - $ban_row = $row; - // Don't break. Check if there is an exclude rule for this user - } - } - } - while ($row = $db->sql_fetchrow($result)); - } - $db->sql_freeresult($result); - - if ($banned == true) + if ($user->check_ban('', '', $email, true) == true) { return 'EMAIL_BANNED'; } diff --git a/phpBB/includes/mcp/mcp_ban.php b/phpBB/includes/mcp/mcp_ban.php new file mode 100644 index 0000000000..2ae9710d03 --- /dev/null +++ b/phpBB/includes/mcp/mcp_ban.php @@ -0,0 +1,140 @@ +<?php +/** +* +* @package mcp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package mcp +*/ +class mcp_ban +{ + var $u_action; + + function main($id, $mode) + { + global $config, $db, $user, $auth, $template, $cache; + global $SID, $phpbb_root_path, $phpEx; + + include($phpbb_root_path . 'includes/functions_user.' . $phpEx); + + // Include the admin banning interface... + include($phpbb_root_path . 'includes/acp/acp_ban.' . $phpEx); + + $bansubmit = (isset($_POST['bansubmit'])) ? true : false; + $unbansubmit= (isset($_POST['unbansubmit'])) ? true : false; + $current_time = time(); + + $user->add_lang('acp/ban'); + $this->tpl_name = 'mcp_ban'; + + // Ban submitted? + if ($bansubmit) + { + // Grab the list of entries + $ban = request_var('ban', ''); + $ban_len = request_var('banlength', 0); + $ban_len_other = request_var('banlengthother', ''); + $ban_exclude = request_var('banexclude', 0); + $ban_reason = request_var('banreason', ''); + $ban_give_reason = request_var('bangivereason', ''); + + user_ban($mode, $ban, $ban_len, $ban_len_other, $ban_exclude, $ban_reason, $ban_give_reason); + + trigger_error($user->lang['BAN_UPDATE_SUCESSFUL']); + } + else if ($unbansubmit) + { + $ban = request_var('unban', array('')); + + user_unban($mode, $ban); + + trigger_error($user->lang['BAN_UPDATE_SUCESSFUL']); + } + + // Ban length options + $ban_end_text = array(0 => $user->lang['PERMANENT'], 30 => $user->lang['30_MINS'], 60 => $user->lang['1_HOUR'], 360 => $user->lang['6_HOURS'], 1440 => $user->lang['1_DAY'], 10080 => $user->lang['7_DAYS'], 20160 => $user->lang['2_WEEKS'], 40320 => $user->lang['1_MONTH'], -1 => $user->lang['UNTIL'] . ' -> '); + + $ban_end_options = ''; + foreach ($ban_end_text as $length => $text) + { + $ban_end_options .= '<option value="' . $length . '">' . $text . '</option>'; + } + + // Define language vars + $this->page_title = $user->lang[strtoupper($mode) . '_BAN']; + + $l_ban_explain = $user->lang[strtoupper($mode) . '_BAN_EXPLAIN']; + $l_ban_exclude_explain = $user->lang[strtoupper($mode) . '_BAN_EXCLUDE_EXPLAIN']; + $l_unban_title = $user->lang[strtoupper($mode) . '_UNBAN']; + $l_unban_explain = $user->lang[strtoupper($mode) . '_UNBAN_EXPLAIN']; + $l_no_ban_cell = $user->lang[strtoupper($mode) . '_NO_BANNED']; + + switch ($mode) + { + case 'user': + $l_ban_cell = $user->lang['USERNAME']; + break; + + case 'ip': + $l_ban_cell = $user->lang['IP_HOSTNAME']; + break; + + case 'email': + $l_ban_cell = $user->lang['EMAIL_ADDRESS']; + break; + } + + acp_ban::display_ban_options($mode); + + $template->assign_vars(array( + 'L_TITLE' => $this->page_title, + 'L_EXPLAIN' => $l_ban_explain, + 'L_UNBAN_TITLE' => $l_unban_title, + 'L_UNBAN_EXPLAIN' => $l_unban_explain, + 'L_BAN_CELL' => $l_ban_cell, + 'L_BAN_EXCLUDE_EXPLAIN' => $l_ban_exclude_explain, + 'L_NO_BAN_CELL' => $l_no_ban_cell, + + 'S_USERNAME_BAN' => ($mode == 'user') ? true : false, + + 'U_ACTION' => $this->u_action, + 'U_FIND_USER' => $phpbb_root_path . "memberlist.$phpEx$SID&mode=searchuser&form=mcp_ban&field=ban", + ) + ); + } +} + +/** +* @package module_install +*/ +class mcp_ban_info +{ + function module() + { + return array( + 'filename' => 'mcp_ban', + 'title' => 'MCP_BAN', + 'version' => '1.0.0', + 'modes' => array( + 'email' => array('title' => 'MCP_BAN_EMAILS', 'auth' => 'acl_m_ban'), + 'ip' => array('title' => 'MCP_BAN_IPS', 'auth' => 'acl_m_ban'), + 'user' => array('title' => 'MCP_BAN_USERNAMES', 'auth' => 'acl_m_ban'), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + +?>
\ No newline at end of file diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index e447184b55..8929520851 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -557,7 +557,7 @@ function disapprove_post($post_id_list, $mode) else { // If the reason is defined within the language file, we will use the localized version, else just use the database entry... - $disapprove_reason = ($row['reason_title'] != 'other') ? ((isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])] : $row['reason_description']) : ''; + $disapprove_reason = ($row['reason_title'] != 'other') ? ((isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])] : $row['reason_description']) : ''; $disapprove_reason .= ($reason) ? "\n\n" . $_REQUEST['reason'] : ''; unset($reason); } diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 354a77bcec..4340a77605 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -643,11 +643,11 @@ class session * Check for banned user * * Checks whether the supplied user is banned by id, ip or email. If no parameters - * are passed to the method pre-existing session data is used. This routine does - * not return on finding a banned user, it outputs a relevant message and stops - * execution. + * are passed to the method pre-existing session data is used. If $return is false + * this routine does not return on finding a banned user , it outputs a relevant + * message and stops execution. */ - function check_ban($user_id = false, $user_ip = false, $user_email = false) + function check_ban($user_id = false, $user_ip = false, $user_email = false, $return = false) { global $config, $db; @@ -684,7 +684,7 @@ class session } $db->sql_freeresult($result); - if ($banned) + if ($banned && !$return) { // Initiate environment ... since it won't be set at this stage $this->setup(); @@ -703,6 +703,11 @@ class session trigger_error($message); } + if ($banned) + { + return true; + } + return false; } @@ -928,8 +933,7 @@ 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']; // Is board disabled and user not an admin or moderator? - // TODO - // New ACL enabling board access while offline? + // @todo new ACL enabling board access while offline? if ($config['board_disable'] && !defined('IN_LOGIN') && !$auth->acl_gets('a_', 'm_')) { $message = (!empty($config['board_disable_msg'])) ? $config['board_disable_msg'] : 'BOARD_DISABLE'; diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 44eadc2628..dda436cba2 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -85,7 +85,7 @@ class ucp_main } $db->sql_freeresult($result); - $topic_tracking_info = get_topic_tracking(0, $topic_list, $rowset, array(0 => false), $topic_list); + $topic_tracking_info = get_topic_tracking(0, $topic_list, $rowset, false, $topic_list); foreach ($topic_list as $topic_id) { @@ -334,12 +334,15 @@ class ucp_main ORDER BY t.topic_last_post_time DESC'; $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); - $topic_list = $global_announce_list = $rowset = array(); + $topic_list = $topic_forum_list = $global_announce_list = $rowset = array(); while ($row = $db->sql_fetchrow($result)) { $topic_list[] = $row['topic_id']; $rowset[$row['topic_id']] = $row; + $topic_forum_list[$row['forum_id']]['forum_mark_time'] = ($config['load_db_lastread']) ? $row['forum_mark_time'] : 0; + $topic_forum_list[$row['forum_id']]['topics'][] = $row['topic_id']; + if ($row['topic_type'] == POST_GLOBAL) { $global_announce_list[] = $row['topic_id']; @@ -347,10 +350,21 @@ class ucp_main } $db->sql_freeresult($result); - /** - * @todo get_topic_tracking able to fetch from multiple forums - */ - $topic_tracking_info = get_topic_tracking(0, $topic_list, $rowset, array(0 => false), $global_announce_list); + $topic_tracking_info = array(); + if ($config['load_db_lastread']) + { + foreach ($topic_forum_list as $f_id => $topic_row) + { + $topic_tracking_info += get_topic_tracking($f_id, $topic_row['topics'], $rowset, array($f_id => $topic_row['forum_mark_time']), ($f_id == 0) ? $global_announce_list : false); + } + } + else + { + foreach ($topic_forum_list as $f_id => $topic_row) + { + $topic_tracking_info += get_complete_topic_tracking($f_id, $topic_row['topics'], $global_announce_list); + } + } foreach ($topic_list as $topic_id) { diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index a1a1ba06a4..b8a6d340a8 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -255,6 +255,8 @@ INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_mov INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_split', 1, 1); INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_warn', 1, 1); +INSERT INTO phpbb_auth_options (auth_option, is_local, is_global) VALUES ('m_ban', 0, 1); + INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_aauth', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_attach', 1); @@ -591,28 +593,34 @@ INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (199, 1, 'reasons', 'acp', 1, 66, 441, 442, 'ACP_MANAGE_REASONS', 'main', 'acl_a_reasons'); # MCP -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (124, 1, 1, '', 'mcp', 0, 37, 46, 'MCP_MAIN', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (125, 1, 1, '', 'mcp', 0, 47, 52, 'MCP_NOTES', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (126, 1, 1, '', 'mcp', 0, 53, 62, 'MCP_QUEUE', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (127, 1, 1, '', 'mcp', 0, 63, 72, 'MCP_WARN', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (128, 1, 1, 'main', 'mcp', 124, 38, 39, 'MCP_MAIN_FRONT', 'front', 'acl_m_'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (129, 1, 1, 'main', 'mcp', 124, 40, 41, 'MCP_MAIN_FORUM_VIEW', 'forum_view', 'acl_m_,$id'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (130, 1, 1, 'main', 'mcp', 124, 42, 43, 'MCP_MAIN_TOPIC_VIEW', 'topic_view', 'acl_m_,$id'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (131, 1, 1, 'main', 'mcp', 124, 44, 45, 'MCP_MAIN_POST_DETAILS', 'post_details', 'acl_m_,$id'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (132, 1, 1, 'notes', 'mcp', 125, 48, 49, 'MCP_NOTES_FRONT', 'front', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (133, 1, 1, 'notes', 'mcp', 125, 50, 51, 'MCP_NOTES_USER', 'user_notes', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (134, 1, 1, 'queue', 'mcp', 126, 54, 55, 'MCP_QUEUE_UNAPPROVED_TOPICS', 'unapproved_topics', 'acl_m_approve || aclf_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (135, 1, 1, 'queue', 'mcp', 126, 56, 57, 'MCP_QUEUE_UNAPPROVED_POSTS', 'unapproved_posts', 'acl_m_approve || aclf_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (136, 1, 1, 'queue', 'mcp', 126, 60, 61, 'MCP_QUEUE_REPORTS', 'reports', 'acl_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (137, 1, 1, 'warn', 'mcp', 127, 64, 65, 'MCP_WARN_FRONT', 'front', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (138, 1, 1, 'warn', 'mcp', 127, 66, 67, 'MCP_WARN_LIST', 'list', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (139, 1, 1, 'warn', 'mcp', 127, 68, 69, 'MCP_WARN_USER', 'warn_user', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (140, 1, 1, 'warn', 'mcp', 127, 70, 71, 'MCP_WARN_POST', 'warn_post', 'acl_m_,$id'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (166, 1, 1, 'queue', 'mcp', 126, 58, 59, 'MCP_QUEUE_APPROVE_DETAILS', 'approve_details', 'acl_m_approve || aclf_m_approve'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (189, 1, 1, '', 'mcp', 0, 81, 88, 'MCP_LOGS', '', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (190, 1, 1, 'logs', 'mcp', 189, 82, 83, 'MCP_LOGS_FRONT', 'front', ''); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (191, 1, 1, 'logs', 'mcp', 189, 84, 85, 'MCP_LOGS_FORUM_VIEW', 'forum_logs', 'acl_m_,$id'); -INSERT INTO phpbb_modules (module_id, module_enabled, module_display, module_name, module_class, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (192, 1, 1, 'logs', 'mcp', 189, 86, 87, 'MCP_LOGS_TOPIC_VIEW', 'topic_logs', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (124, 1, '', 'mcp', 1, 0, 57, 66, 'MCP_MAIN', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (125, 1, '', 'mcp', 1, 0, 67, 72, 'MCP_NOTES', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (126, 1, '', 'mcp', 1, 0, 73, 80, 'MCP_QUEUE', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (127, 1, '', 'mcp', 1, 0, 81, 90, 'MCP_WARN', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (128, 1, 'main', 'mcp', 1, 124, 58, 59, 'MCP_MAIN_FRONT', 'front', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (129, 1, 'main', 'mcp', 1, 124, 60, 61, 'MCP_MAIN_FORUM_VIEW', 'forum_view', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (130, 1, 'main', 'mcp', 1, 124, 62, 63, 'MCP_MAIN_TOPIC_VIEW', 'topic_view', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (131, 1, 'main', 'mcp', 1, 124, 64, 65, 'MCP_MAIN_POST_DETAILS', 'post_details', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (132, 1, 'notes', 'mcp', 1, 125, 68, 69, 'MCP_NOTES_FRONT', 'front', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (133, 1, 'notes', 'mcp', 1, 125, 70, 71, 'MCP_NOTES_USER', 'user_notes', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (134, 1, 'queue', 'mcp', 1, 126, 74, 75, 'MCP_QUEUE_UNAPPROVED_TOPICS', 'unapproved_topics', 'acl_m_approve'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (135, 1, 'queue', 'mcp', 1, 126, 76, 77, 'MCP_QUEUE_UNAPPROVED_POSTS', 'unapproved_posts', 'acl_m_approve'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (136, 1, 'queue', 'mcp', 1, 126, 78, 79, 'MCP_QUEUE_REPORTS', 'reports', 'acl_m_approve'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (137, 1, 'warn', 'mcp', 1, 127, 82, 83, 'MCP_WARN_FRONT', 'front', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (138, 1, 'warn', 'mcp', 1, 127, 84, 85, 'MCP_WARN_LIST', 'list', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (139, 1, 'warn', 'mcp', 1, 127, 86, 87, 'MCP_WARN_USER', 'warn_user', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (140, 1, 'warn', 'mcp', 1, 127, 88, 89, 'MCP_WARN_POST', 'warn_post', 'acl_m_,$id'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (192, 1, '', 'mcp', 1, 0, 91, 104, 'Reports', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (193, 1, 'reports', 'mcp', 1, 192, 92, 93, 'MCP_REPORTS_FRONT', 'front', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (194, 1, 'reports', 'mcp', 1, 192, 94, 95, 'MCP_REPORTS_YOURS', 'reports_yours', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (195, 1, 'reports', 'mcp', 1, 192, 96, 97, 'MCP_REPORTS_NEW', 'reports_new', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (196, 1, 'reports', 'mcp', 1, 192, 98, 99, 'MCP_REPORTS_TOPICS', 'reports_topics', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (197, 1, 'reports', 'mcp', 1, 192, 100, 101, 'MCP_REPORTS_VIEW_TOPIC', 'reports_view_topic', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (198, 1, 'reports', 'mcp', 1, 192, 102, 103, 'MCP_REPORTS_VIEW', 'reports_view', 'acl_m_'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (200, 1, '', 'mcp', 1, 0, 105, 112, 'MCP_BAN', '', ''); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (201, 1, 'ban', 'mcp', 1, 200, 106, 107, 'MCP_BAN_EMAILS', 'email', 'acl_m_ban'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (202, 1, 'ban', 'mcp', 1, 200, 108, 109, 'MCP_BAN_IPS', 'ip', 'acl_m_ban'); +INSERT INTO phpbb_modules (module_id, module_enabled, module_name, module_class, module_display, parent_id, left_id, right_id, module_langname, module_mode, module_auth) VALUES (203, 1, 'ban', 'mcp', 1, 200, 110, 111, 'MCP_BAN_USERNAMES', 'user', 'acl_m_ban'); # MSSQL IDENTITY phpbb_modules OFF # diff --git a/phpBB/language/en/acp/ban.php b/phpBB/language/en/acp/ban.php index 0e7a4cd3e1..6def9cdf6b 100644 --- a/phpBB/language/en/acp/ban.php +++ b/phpBB/language/en/acp/ban.php @@ -52,6 +52,7 @@ $lang = array_merge($lang, array( 'IP_BAN' => 'Ban one or more ips', 'IP_BAN_EXCLUDE_EXPLAIN' => 'Enable this to exclude the entered IP from all current bans.', 'IP_BAN_EXPLAIN' => 'To specify several different IP\'s or hostnames enter each on a new line. To specify a range of IP addresses separate the start and end with a hyphen (-), to specify a wildcard use *', + 'IP_HOSTNAME' => 'IP addresses or hostnames', 'IP_NO_BANNED' => 'No banned IP addresses', 'IP_UNBAN' => 'Un-ban or Un-exclude IPs', 'IP_UNBAN_EXPLAIN' => 'You can unban (or un-exclude) multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser. Excluded IP\'s have a grey background.', diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index 4a868535f6..a46ff1816b 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -167,6 +167,7 @@ $lang = array_merge($lang, array( 'acl_m_info' => array('lang' => 'Can view post details', 'cat' => 'misc'), 'acl_m_warn' => array('lang' => 'Can issue warnings', 'cat' => 'misc'), + 'acl_m_ban' => array('lang' => 'Can manage bans', 'cat' => 'misc'), // This moderator setting is only global (and not local) )); // Admin Permissions diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index d9a17511a2..0a7816ca5f 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -128,6 +128,11 @@ $lang = array_merge($lang, array( 'MCP_ADD' => 'Add a warning', + 'MCP_BAN' => 'Banning', + 'MCP_BAN_EMAILS' => 'Ban Emails', + 'MCP_BAN_IPS' => 'Ban IPs', + 'MCP_BAN_USERNAMES' => 'Ban Usernames', + 'MCP_LOGS' => 'Moderator Logs', 'MCP_LOGS_FRONT' => 'Front Page', 'MCP_LOGS_FORUM_VIEW' => 'Forum Logs', diff --git a/phpBB/language/en/posting.php b/phpBB/language/en/posting.php index d1d507a94b..fa95420607 100644 --- a/phpBB/language/en/posting.php +++ b/phpBB/language/en/posting.php @@ -109,6 +109,7 @@ $lang = array_merge($lang, array( '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', 'MAX_FONT_SIZE_EXCEEDED' => 'You may only use fonts up to size %1$d.', 'MAX_IMG_HEIGHT_EXCEEDED' => 'Your images may only be up to %1$d pixels high.', @@ -176,6 +177,7 @@ $lang = array_merge($lang, array( 'TOPIC_BUMPED' => 'Topic has been bumped successfully', 'UNAUTHORISED_BBCODE' => 'You cannot use certain bbcodes: ', + 'UNGLOBALISE_EXPLAIN' => 'To switch this topic back from being global to a normal topic, you need to select the forum you whish this topic to be displayed', 'UPDATE_COMMENT' => 'Update comment', 'URL_INVALID' => 'The URL you specified is invalid.', 'USER_CANNOT_BUMP' => 'You cannot bump topics in this forum', diff --git a/phpBB/posting.php b/phpBB/posting.php index 5f3b062d1c..12e6289ed5 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -750,6 +750,8 @@ if ($submit || $preview || $refresh) if (!$to_forum_id) { + include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx); + $template->assign_vars(array( 'S_FORUM_SELECT' => make_forum_select(false, false, false, true, true), 'S_UNGLOBALISE' => true) diff --git a/phpBB/styles/subSilver/template/mcp_ban.html b/phpBB/styles/subSilver/template/mcp_ban.html new file mode 100644 index 0000000000..0ceaf9fb0e --- /dev/null +++ b/phpBB/styles/subSilver/template/mcp_ban.html @@ -0,0 +1,108 @@ +<!-- INCLUDE mcp_header.html --> + + <!-- $Id$ --> + + <script type="text/javascript"> + <!-- + + var ban_length = new Array(); + <!-- BEGIN ban_length --> + ban_length['{ban_length.BAN_ID}'] = "{ban_length.LENGTH}"; + <!-- END ban_length --> + + var ban_reason = new Array(); + <!-- BEGIN ban_reason --> + ban_reason['{ban_reason.BAN_ID}'] = "{ban_reason.REASON}"; + <!-- END ban_reason --> + + var ban_give_reason = new Array(); + <!-- BEGIN ban_give_reason --> + ban_give_reason['{ban_give_reason.BAN_ID}'] = "{ban_give_reason.REASON}"; + <!-- END ban_give_reason --> + + function display_details(option) + { + document.getElementById('mcp_ban').unbangivereason.value = ban_give_reason[option]; + document.getElementById('mcp_ban').unbanreason.value = ban_reason[option]; + document.getElementById('mcp_ban').unbanlength.value = ban_length[option]; + } + + //--> + </script> + + <form id="mcp_ban" method="post" action="{U_ACTION}"> + + <table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0"> + <tr> + <th colspan="2" height="28" nowrap="nowrap">{L_TITLE}</th> + </tr> + <tr> + <td class="row3" colspan="2">{L_EXPLAIN}</td> + </tr> + <tr> + <td class="row1" width="45%" valign="top"><b>{L_BAN_CELL}:</b></td> + <td class="row2"> + <textarea name="ban" id="ban" cols="40" rows="3" class="post"></textarea> + <!-- IF S_USERNAME_BAN --><br />[ <a href="#" onclick="window.open('{U_FIND_USER}', '_phpbbsearch', 'height=500, resizable=yes, scrollbars=yes, width=740'); return false;">{L_FIND_USERNAME}</a> ]<!-- ENDIF --> + </td> + </tr> + <tr> + <td class="row1" valign="top"><b>{L_BAN_LENGTH}:</b></td> + <td class="row2"><select name="banlength">{S_BAN_END_OPTIONS}</select><br /><input type="text" name="banlengthother" class="post" /> (YYYY-MM-DD)</td> + </tr> + <tr> + <td class="row1" valign="top"><b>{L_BAN_EXCLUDE}:</b><br /><span class="gensmall">{L_BAN_EXCLUDE_EXPLAIN}</span></td> + <td class="row2"><input type="radio" name="banexclude" value="1" /> {L_YES} <input type="radio" name="banexclude" value="0" checked="checked" /> {L_NO}</td> + </tr> + <tr> + <td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td> + <td class="row2"><input name="banreason" type="text" class="post" /></td> + </tr> + <tr> + <td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td> + <td class="row2"><input name="bangivereason" type="text" class="post" /></td> + </tr> + <tr> + <td class="cat" colspan="2" align="center"><input type="submit" name="bansubmit" value="{L_SUBMIT}" class="btnmain" /> <input type="reset" value="{L_RESET}" class="btnlite" /> </td> + </tr> + </table> + + <br /><br /> + + <table width="100%" class="tablebg" cellspacing="1" cellpadding="4" border="0"> + <tr> + <th colspan="2" height="28" nowrap="nowrap">{L_UNBAN_TITLE}</th> + </tr> + <tr> + <td class="row3" colspan="2">{L_UNBAN_EXPLAIN}</td> + </tr> + <!-- IF S_BANNED_OPTIONS --> + <tr> + <td class="row1" valign="top" width="45%"><b>{L_BAN_CELL}:</b></td> + <td class="row2"><select name="unban[]" multiple="multiple" size="10" style="width: 50%" onchange="display_details(this.options[this.selectedIndex].value)">{BANNED_OPTIONS}</select></td> + </tr> + <tr> + <td class="row1" valign="top"><b>{L_BAN_LENGTH}:</b></td> + <td class="row2"><input style="border: 0px; width: 100%" type="text" name="unbanlength" /></td> + </tr> + <tr> + <td class="row1" valign="top"><b>{L_BAN_REASON}:</b></td> + <td class="row2"><input style="border: 0px; width: 100%" type="text" name="unbanreason" /></td> + </tr> + <tr> + <td class="row1" valign="top"><b>{L_BAN_GIVE_REASON}:</b></td> + <td class="row2"><input style="border: 0px; width: 100%" type="text" name="unbangivereason" /></td> + </tr> + <tr> + <td class="cat" colspan="2" align="center"><input type="submit" name="unbansubmit" value="{L_SUBMIT}" class="btnmain" /> <input type="reset" value="{L_RESET}" class="btnlite" /> </td> + </tr> + <!-- ELSE --> + <tr> + <td class="row1" colspan="2"><b>{L_NO_BAN_CELL}</b></td> + </tr> + <!-- ENDIF --> + </table> + + </form> + +<!-- INCLUDE mcp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/subSilver/template/mcp_move.html b/phpBB/styles/subSilver/template/mcp_move.html index 5f67a993a4..5f5ad474d7 100644 --- a/phpBB/styles/subSilver/template/mcp_move.html +++ b/phpBB/styles/subSilver/template/mcp_move.html @@ -1,6 +1,7 @@ -<!-- $Id$ --> <!-- INCLUDE overall_header.html --> + <!-- $Id$ --> + <div id="pagecontent"> <form name="confirm" action="{S_CONFIRM_ACTION}" method="post"><table class="tablebg" width="100%" cellspacing="1"> diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 5758a26377..061c973e31 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -848,24 +848,27 @@ while ($row = $db->sql_fetchrow($result)) 'sig_bbcode_uid' => '', 'sig_bbcode_bitfield' => '', - 'online' => false, - 'avatar' => '', - 'rank_title' => '', - 'rank_image' => '', - 'sig' => '', - 'posts' => '', - 'profile' => '', - 'pm' => '', - 'email' => '', - 'www' => '', - 'icq_status_img'=> '', - 'icq' => '', - 'aim' => '', - 'msn' => '', - 'yim' => '', - 'jabber' => '', - 'search' => '', - 'username' => ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster + 'online' => false, + 'avatar' => '', + 'rank_title' => '', + 'rank_image' => '', + 'rank_image_src' => '', + 'sig' => '', + 'posts' => '', + 'profile' => '', + 'pm' => '', + 'email' => '', + 'www' => '', + 'icq_status_img' => '', + 'icq' => '', + 'aim' => '', + 'msn' => '', + 'yim' => '', + 'jabber' => '', + 'search' => '', + 'username' => ($row['user_colour']) ? '<span style="color:#' . $row['user_colour'] . '">' . $poster . '</span>' : $poster, + + 'warnings' => 0, ); } else @@ -1243,14 +1246,14 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) // $postrow = array( - 'POSTER_NAME' => $row['poster'], - 'POSTER_RANK' => $user_cache[$poster_id]['rank_title'], - 'RANK_IMAGE' => $user_cache[$poster_id]['rank_image'], - 'RANK_IMAGE_SRC' => $user_cache[$poster_id]['rank_image_src'], - 'POSTER_JOINED' => $user_cache[$poster_id]['joined'], - 'POSTER_POSTS' => $user_cache[$poster_id]['posts'], - 'POSTER_FROM' => $user_cache[$poster_id]['from'], - 'POSTER_AVATAR' => $user_cache[$poster_id]['avatar'], + 'POSTER_NAME' => $row['poster'], + 'POSTER_RANK' => $user_cache[$poster_id]['rank_title'], + 'RANK_IMAGE' => $user_cache[$poster_id]['rank_image'], + 'RANK_IMAGE_SRC' => $user_cache[$poster_id]['rank_image_src'], + 'POSTER_JOINED' => $user_cache[$poster_id]['joined'], + 'POSTER_POSTS' => $user_cache[$poster_id]['posts'], + 'POSTER_FROM' => $user_cache[$poster_id]['from'], + 'POSTER_AVATAR' => $user_cache[$poster_id]['avatar'], 'POSTER_WARNINGS' => $user_cache[$poster_id]['warnings'], 'POST_DATE' => $user->format_date($row['post_time']), |