diff options
58 files changed, 1107 insertions, 1109 deletions
diff --git a/phpBB/adm/style/acp_reasons.html b/phpBB/adm/style/acp_reasons.html new file mode 100644 index 0000000000..e1f8fb2c8f --- /dev/null +++ b/phpBB/adm/style/acp_reasons.html @@ -0,0 +1,92 @@ +<!-- INCLUDE overall_header.html --> + +<a name="maincontent"></a> + +<!-- IF S_EDIT_REASON --> + + <a href="{U_BACK}" style="float: right">« {L_BACK}</a> + + <h1>{L_TITLE}</h1> + + <p>{L_REASON_EDIT_EXPLAIN}</p> + + <!-- IF S_ERROR --> + <div class="errorbox"> + <h3>{L_WARNING}</h3> + <p>{ERROR_MSG}</p> + </div> + <!-- ENDIF --> + + <form id="acp_reasons" method="post" action="{U_ACTION}"> + + <fieldset> + <legend>{L_TITLE}</legend> + <p><!-- IF S_TRANSLATED -->{L_IS_TRANSLATED}<!-- ELSE -->{L_IS_NOT_TRANSLATED}<!-- ENDIF --></p> + <dl> + <dt><label for="reason_title">{L_REASON_TITLE}:</label></dt> + <dd><input name="reason_title" type="text" id="reason_title" value="{REASON_TITLE}" /></dd> + </dl> + <dl> + <dt><label for="reason_description">{L_REASON_DESCRIPTION}:</label></dt> + <dd><textarea name="reason_description" id="reason_description" rows="8">{REASON_DESCRIPTION}</textarea></dd> + </dl> + </fieldset> + + <fieldset class="submit-buttons"> + <input class="button1" type="submit" id="submit" name="submit" value="{L_SUBMIT}" /> + <input class="button2" type="reset" id="reset" name="reset" value="{L_RESET}" /> + </fieldset> + + </form> + +<!-- ELSE --> + + <h1>{L_ACP_REASONS}</h1> + + <p>{L_ACP_REASONS_EXPLAIN}</p> + +<!-- IF reasons --> + <table cellspacing="1"> + <col class="row1" /><col class="row1" /><col class="row2" /> + <thead> + <tr> + <th>{L_REASON}</th> + <th>{L_USED_IN_REPORTS}</th> + <th>{L_OPTIONS}</th> + </tr> + </thead> + <tbody> + <!-- BEGIN reasons --> + <tr> + <td> + <i style="float: right; font-size: .9em;"><!-- IF reasons.S_TRANSLATED -->{L_IS_TRANSLATED}<!-- ELSE -->{L_IS_NOT_TRANSLATED}<!-- ENDIF --></i> + <strong>{reasons.REASON_TITLE}<!-- IF reasons.S_OTHER_REASON --> *<!-- ENDIF --></strong> + <br /><span>{reasons.REASON_DESCRIPTION}</span> + </td> + <td style="width: 100px;">{reasons.REASON_COUNT}</td> + <td style="width: 15%; text-align: right; white-space: nowrap;"> + <!-- IF not reasons.S_FIRST_ROW --><a href="{reasons.U_MOVE_UP}"><img src="images/icon_up.gif" alt="{L_MOVE_UP}" title="{L_MOVE_UP}" width="16" height="16" /></a> <!-- ENDIF --> + <!-- IF not reasons.S_LAST_ROW --><a href="{reasons.U_MOVE_DOWN}"><img src="images/icon_down.gif" alt="{L_MOVE_DOWN}" title="{L_MOVE_DOWN}" width="16" height="16" /></a> <!-- ENDIF --> + <a href="{reasons.U_EDIT}"><img src="images/icon_edit.gif" alt="{L_EDIT}" title="{L_EDIT}" width="16" height="16" /></a> + <!-- IF reasons.U_DELETE --><a href="{reasons.U_DELETE}"><img src="images/icon_delete.gif" alt="{L_DELETE}" title="{L_DELETE}" width="16" height="16" /></a><!-- ENDIF --> + </td> + </tr> + <!-- END reasons --> + </tbody> + </table> +<!-- ENDIF --> + + <form id="reasons" method="post" action="{U_ACTION}"> + + <fieldset class="quick"> + <input type="hidden" name="action" value="add" /> + + <input type="text" name="reason_title" /> + <input class="button2" name="addreason" type="submit" value="{L_ADD_NEW_REASON}" /> + </fieldset> + + </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 6b3a5b25c9..16e8bcd2f8 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -330,10 +330,6 @@ <dd><input type="radio" class="radio" name="popuppm" value="1"<!-- IF POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="popuppm" value="0"<!-- IF not POPUP_PM --> id="popuppm" checked="checked"<!-- ENDIF --> />{L_NO}</dd> </dl> <dl> - <dt><label for="report_pm_notify">{L_REPORT_PM_NOTIFY}:</label><br /><span>{L_REPORT_PM_NOTIFY_EXPLAIN}</span></dt> - <dd><input type="radio" class="radio" name="report_pm_notify" value="1"<!-- IF REPORT_PM_NOTIFY --> id="report_pm_notify" checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" class="radio" name="report_pm_notify" value="0"<!-- IF not REPORT_PM_NOTIFY --> id="report_pm_notify" checked="checked"<!-- ENDIF --> /> {L_NO}</dd> - </dl> - <dl> <dt><label for="lang">{L_BOARD_LANGUAGE}:</label></dt> <dd><select id="lang" name="lang">{S_LANG_OPTIONS}</select></dd> </dl> diff --git a/phpBB/includes/acp/acp_attachments.php b/phpBB/includes/acp/acp_attachments.php index fa83da20b1..e2d8770066 100644 --- a/phpBB/includes/acp/acp_attachments.php +++ b/phpBB/includes/acp/acp_attachments.php @@ -266,7 +266,7 @@ class acp_attachments } $db->sql_freeresult($result); - // Delete Extension ? + // Delete Extension? $extension_id_list = (isset($_POST['extension_id_list'])) ? array_map('intval', $_POST['extension_id_list']) : array(); if (sizeof($extension_id_list)) @@ -292,7 +292,7 @@ class acp_attachments } } - // Add Extension ? + // Add Extension? $add_extension = strtolower(request_var('add_extension', '')); $add_extension_group = request_var('add_group_select', 0); $add = (isset($_POST['add_extension_check'])) ? true : false; @@ -1120,10 +1120,10 @@ class acp_attachments $exe = ((defined('PHP_OS')) && (preg_match('#win#i', PHP_OS))) ? '.exe' : ''; - if (empty($_ENV['MAGICK_HOME'])) + if (empty(getenv('MAGICK_HOME'))) { $locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/'); - $path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', $_ENV['PATH']))); + $path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH')))); $locations = array_merge($path_locations, $locations); @@ -1144,7 +1144,7 @@ class acp_attachments } else { - $imagick = str_replace('\\', '/', $_ENV['MAGICK_HOME']); + $imagick = str_replace('\\', '/', getenv('MAGICK_HOME')); } return $imagick; diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 55e4ceb9e8..b990f59ee9 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -258,7 +258,6 @@ class acp_board 'allow_pm_attach' => array('lang' => 'ALLOW_PM_ATTACHMENTS', 'type' => 'radio:yes_no', 'explain' => false), 'auth_download_pm' => array('lang' => 'ALLOW_DOWNLOAD_PM', 'type' => 'radio:yes_no', 'explain' => false), 'allow_sig_pm' => array('lang' => 'ALLOW_SIG_PM', 'type' => 'radio:yes_no', 'explain' => false), - 'auth_report_pm' => array('lang' => 'ALLOW_REPORT_PM', 'type' => 'radio:yes_no', 'explain' => false), 'auth_quote_pm' => array('lang' => 'ALLOW_QUOTE_PM', 'type' => 'radio:yes_no', 'explain' => false), 'print_pm' => array('lang' => 'ALLOW_PRINT_PM', 'type' => 'radio:yes_no', 'explain' => false), 'email_pm' => array('lang' => 'ALLOW_EMAIL_PM', 'type' => 'radio:yes_no', 'explain' => false), diff --git a/phpBB/includes/acp/acp_permission_roles.php b/phpBB/includes/acp/acp_permission_roles.php index 250b4db3bf..a43f87891b 100644 --- a/phpBB/includes/acp/acp_permission_roles.php +++ b/phpBB/includes/acp/acp_permission_roles.php @@ -559,9 +559,10 @@ class acp_permission_roles { $template->assign_block_vars('auth', array( 'CAT_NAME' => $user->lang['permission_cat'][$cat], - 'S_YES' => $cat_array['S_YES'], - 'S_NO' => $cat_array['S_NO'], - 'S_UNSET' => $cat_array['S_UNSET']) + + 'S_YES' => ($cat_array['S_YES'] && !$cat_array['S_NO'] && !$cat_array['S_UNSET']) ? true : false, + 'S_NO' => ($cat_array['S_NO'] && !$cat_array['S_YES'] && !$cat_array['S_UNSET']) ? true : false, + 'S_UNSET' => ($cat_array['S_UNSET'] && !$cat_array['S_NO'] && !$cat_array['S_YES']) ? true : false) ); foreach ($cat_array['permissions'] as $permission => $allowed) diff --git a/phpBB/includes/acp/acp_reasons.php b/phpBB/includes/acp/acp_reasons.php new file mode 100644 index 0000000000..8866a762e6 --- /dev/null +++ b/phpBB/includes/acp/acp_reasons.php @@ -0,0 +1,340 @@ +<?php +/** +* +* @package acp +* @version $Id$ +* @copyright (c) 2005 phpBB Group +* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* +*/ + +/** +* @package acp +*/ +class acp_reasons +{ + var $u_action; + + function main($id, $mode) + { + global $db, $user, $auth, $template, $cache; + global $config, $SID, $phpbb_root_path, $phpbb_admin_path, $phpEx; + + $user->add_lang(array('mcp', 'acp/posting')); + + // Set up general vars + $action = request_var('action', ''); + $submit = (isset($_POST['submit'])) ? true : false; + $reason_id = request_var('id', 0); + + $this->tpl_name = 'acp_reasons'; + $this->page_title = 'ACP_REASONS'; + + // dumdidum... do i really need to do something mom? + $error = array(); + + switch ($action) + { + case 'add': + case 'edit': + + $reason_row = array( + 'reason_title' => request_var('reason_title', ''), + 'reason_description' => request_var('reason_description', '') + ); + + if ($submit) + { + // Reason specified? + if (!$reason_row['reason_title'] || !$reason_row['reason_description']) + { + $error[] = $user->lang['NO_REASON_INFO']; + } + + $check_double = ($action == 'add') ? true : false; + + if ($action == 'edit') + { + $sql = 'SELECT reason_title + FROM ' . REASONS_TABLE . " + WHERE reason_id = $reason_id"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row['reason_title'] == 'other') + { + $reason_row['reason_title'] = 'other'; + } + else if (strtolower($row['reason_title']) != strtolower($reason_row['reason_title'])) + { + $check_double = true; + } + } + + // Check for same reason if adding it... + if ($check_double) + { + $sql = 'SELECT reason_id + FROM ' . REASONS_TABLE . " + WHERE LOWER(reason_title) = '" . strtolower($reason_row['reason_title']) . "'"; + $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($row) + { + $error[] = $user->lang['REASON_ALREADY_EXIST']; + } + } + + if (!sizeof($error)) + { + // New reason? + if ($action == 'add') + { + // Get new order... + $sql = 'SELECT MAX(reason_order) as max_reason_order + FROM ' . REASONS_TABLE; + $result = $db->sql_query($sql); + $max_order = (int) $db->sql_fetchfield('max_reason_order', 0, $result); + $db->sql_freeresult($result); + + $sql_ary = array( + 'reason_title' => (string) $reason_row['reason_title'], + 'reason_description' => (string) $reason_row['reason_description'], + 'reason_order' => $max_order + 1 + ); + + $db->sql_query('INSERT INTO ' . REASONS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); + + $log = 'ADDED'; + } + else if ($reason_id) + { + $sql_ary = array( + 'reason_title' => (string) $reason_row['reason_title'], + 'reason_description' => (string) $reason_row['reason_description'], + ); + + $db->sql_query('UPDATE ' . REASONS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' + WHERE reason_id = ' . $reason_id); + + $log = 'UPDATED'; + } + + add_log('admin', 'LOG_REASON_' . $log, $reason_row['reason_title']); + trigger_error($user->lang['REASON_' . $log] . adm_back_link($this->u_action)); + } + } + else if ($reason_id) + { + $sql = 'SELECT * + FROM ' . REASONS_TABLE . ' + WHERE reason_id = ' . $reason_id; + $result = $db->sql_query($sql); + $reason_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$reason_row) + { + trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action)); + } + } + + $l_title = ($action == 'edit') ? 'EDIT' : 'ADD'; + + $translated = false; + + // If the reason is defined within the language file, we will use the localized version, else just use the database entry... + if (isset($user->lang['report_reasons']['TITLE'][strtoupper($reason_row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($reason_row['reason_title'])])) + { + $translated = true; + } + + $template->assign_vars(array( + 'L_TITLE' => $user->lang['REASON_' . $l_title], + 'U_ACTION' => $this->u_action . "&id=$reason_id&action=$action", + 'U_BACK' => $this->u_action, + 'ERROR_MSG' => (sizeof($error)) ? implode('<br />', $error) : '', + + 'REASON_TITLE' => $reason_row['reason_title'], + 'REASON_DESCRIPTION' => $reason_row['reason_description'], + + 'S_EDIT_REASON' => true, + 'S_TRANSLATED' => $translated, + 'S_ERROR' => (sizeof($error)) ? true : false, + ) + ); + + return; + break; + + case 'delete': + + $sql = 'SELECT * + FROM ' . REASONS_TABLE . ' + WHERE reason_id = ' . $reason_id; + $result = $db->sql_query($sql); + $reason_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if (!$reason_row) + { + trigger_error($user->lang['NO_REASON'] . adm_back_link($this->u_action)); + } + + // Let the deletion be confirmed... + if (confirm_box(true)) + { + $sql = 'SELECT reason_id + FROM ' . REASONS_TABLE . " + WHERE reason_title = 'other'"; + $result = $db->sql_query($sql); + $other_reason_id = (int) $db->sql_fetchfield('reason_id', 0, $result); + $db->sql_freeresult($result); + + // Change the reports using this reason to 'other' + $sql = 'UPDATE ' . REPORTS_TABLE . ' + SET reason_id = ' . $other_reason_id . ", report_text = CONCAT('" . $db->sql_escape($reason_row['reason_description']) . "\n\n', report_text) + WHERE reason_id = $reason_id"; + $db->sql_query($sql); + + $db->sql_query('DELETE FROM ' . REASONS_TABLE . ' WHERE reason_id = ' . $reason_id); + + add_log('admin', 'LOG_REASON_REMOVED', $reason_row['reason_title']); + trigger_error($user->lang['REASON_REMOVED'] . adm_back_link($this->u_action)); + } + else + { + confirm_box(false, $user->lang['CONFIRM_OPERATION'], build_hidden_fields(array( + 'i' => $id, + 'mode' => $mode, + 'action' => $action, + 'id' => $reason_id)) + ); + } + + break; + + case 'move_up': + case 'move_down': + + $order = request_var('order', 0); + $order_total = $order * 2 + (($action == 'move_up') ? -1 : 1); + + $sql = 'UPDATE ' . REASONS_TABLE . ' + SET reason_order = ' . $order_total . ' - reason_order + WHERE reason_order IN (' . $order . ', ' . (($action == 'move_up') ? $order - 1 : $order + 1) . ')'; + $db->sql_query($sql); + + break; + } + + // By default, check that order is valid and fix it if necessary + $sql = 'SELECT reason_id, reason_order + FROM ' . REASONS_TABLE . ' + ORDER BY reason_order'; + $result = $db->sql_query($sql); + + if ($row = $db->sql_fetchrow($result)) + { + $order = 0; + do + { + ++$order; + + if ($row['reason_order'] != $order) + { + $sql = 'UPDATE ' . REASONS_TABLE . " + SET reason_order = $order + WHERE reason_id = {$row['reason_id']}"; + $db->sql_query($sql); + } + } + while ($row = $db->sql_fetchrow($result)); + } + $db->sql_freeresult($result); + + $template->assign_vars(array( + 'U_ACTION' => $this->u_action, + ) + ); + + // Reason count + $sql = 'SELECT reason_id, COUNT(reason_id) AS reason_count + FROM ' . REPORTS_TABLE . ' + GROUP BY reason_id'; + $result = $db->sql_query($sql); + + $reason_count = array(); + while ($row = $db->sql_fetchrow($result)) + { + $reason_count[$row['reason_id']] = $row['reason_count']; + } + $db->sql_freeresult($result); + + $sql = 'SELECT * + FROM ' . REASONS_TABLE . ' + ORDER BY reason_order ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + $translated = false; + $other_reason = ($row['reason_title'] == 'other') ? true : false; + + // If the reason is defined within the language file, we will use the localized version, else just use the database entry... + if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) + { + $row['reson_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]; + $row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]; + + $translated = true; + } + + $template->assign_block_vars('reasons', array( + 'REASON_TITLE' => $row['reason_title'], + 'REASON_DESCRIPTION' => $row['reason_description'], + 'REASON_COUNT' => (isset($reason_count[$row['reason_id']])) ? $reason_count[$row['reason_id']] : 0, + + 'S_TRANSLATED' => $translated, + 'S_OTHER_REASON' => $other_reason, + + 'U_EDIT' => $this->u_action . '&action=edit&id=' . $row['reason_id'], + 'U_DELETE' => (!$other_reason) ? $this->u_action . '&action=delete&id=' . $row['reason_id'] : '', + 'U_MOVE_UP' => $this->u_action . '&action=move_up&order=' . $row['reason_order'], + 'U_MOVE_DOWN' => $this->u_action . '&action=move_down&order=' . $row['reason_order']) + ); + } + $db->sql_freeresult($result); + } +} + +/** +* @package module_install +*/ +class acp_reasons_info +{ + function module() + { + return array( + 'filename' => 'acp_reasons', + 'title' => 'ACP_REASONS', + 'version' => '1.0.0', + 'modes' => array( + 'main' => array('title' => 'ACP_MANAGE_REASONS', 'auth' => 'acl_a_reasons'), + ), + ); + } + + function install() + { + } + + function uninstall() + { + } +} + +?>
\ No newline at end of file diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 999336ceb9..299faba5be 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -997,7 +997,6 @@ class acp_users 'notifypm' => true, 'popuppm' => false, 'allowpm' => true, - 'report_pm_notify' => false, 'topic_sk' => (string) 't', 'topic_sd' => (string) 'd', @@ -1041,7 +1040,6 @@ class acp_users if (!sizeof($error)) { $this->optionset($user_row, 'popuppm', $data['popuppm']); - $this->optionset($user_row, 'report_pm_notify', $data['report_pm_notify']); $this->optionset($user_row, 'viewimg', $data['view_images']); $this->optionset($user_row, 'viewflash', $data['view_flash']); $this->optionset($user_row, 'viewsmilies', $data['view_smilies']); @@ -1176,7 +1174,6 @@ class acp_users 'NOTIFY_BOTH' => ($notify_method == NOTIFY_BOTH) ? true : false, 'NOTIFY_PM' => (isset($data['notifypm'])) ? $data['notifypm'] : $user_row['user_notify_pm'], 'POPUP_PM' => (isset($data['popuppm'])) ? $data['popuppm'] : $this->optionget($user_row, 'popuppm'), - 'REPORT_PM_NOTIFY' => (isset($data['report_pm_notify'])) ? $data['report_pm_notify'] : $this->optionget($user_row, 'report_pm_notify'), 'DST' => (isset($data['dst'])) ? $data['dst'] : $user_row['user_dst'], 'BBCODE' => (isset($data['bbcode'])) ? $data['bbcode'] : $this->optionget($user_row, 'bbcode'), 'SMILIES' => (isset($data['smilies'])) ? $data['smilies'] : $this->optionget($user_row, 'smilies'), diff --git a/phpBB/includes/acp/auth.php b/phpBB/includes/acp/auth.php index 8f47a6dc71..73427a92f4 100644 --- a/phpBB/includes/acp/auth.php +++ b/phpBB/includes/acp/auth.php @@ -305,6 +305,12 @@ class auth_admin extends auth $s_role_js_array = array(); while ($row = $db->sql_fetchrow($result)) { + $flag = substr($row['auth_option'], 0, strpos($row['auth_option'], '_') + 1); + if ($flag == $row['auth_option']) + { + continue; + } + if (!isset($s_role_js_array[$row['role_id']])) { $s_role_js_array[$row['role_id']] = "\n" . 'role_options[' . $row['role_id'] . '] = new Array();' . "\n"; @@ -687,7 +693,7 @@ class auth_admin extends auth list(, $flag) = each(array_keys($auth)); $flag = substr($flag, 0, strpos($flag, '_') + 1); - // This ID (the any-flag) is only set if roles are assigned - this makes it very easy to determine the correct roles + // This ID (the any-flag) is set if one or more permissions are true... $any_option_id = (int) $this->option_ids[$flag]; // Remove any-flag from auth ary @@ -709,6 +715,38 @@ class auth_admin extends auth AND auth_option_id IN ($any_option_id, " . implode(', ', $auth_option_ids) . ')'; $db->sql_query($sql); + // Remove those having a role assigned... the correct type of course... + $sql = 'SELECT role_id + FROM ' . ACL_ROLES_TABLE . " + WHERE role_type = '" . $db->sql_escape($flag) . "'"; + $result = $db->sql_query($sql); + + $role_ids = array(); + while ($row = $db->sql_fetchrow($result)) + { + $role_ids[] = $row['role_id']; + } + $db->sql_freeresult($result); + + if (sizeof($role_ids)) + { + $sql = "DELETE FROM $table + WHERE forum_id $forum_sql + AND $id_field $ug_id_sql + AND auth_option_id = 0 + AND auth_role_id IN (" . implode(', ', $role_ids) . ')'; + $db->sql_query($sql); + } + + // Ok, include the any-flag if one or more auth options are set to yes... + foreach ($auth as $auth_option => $setting) + { + if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NO)) + { + $auth[$flag] = ACL_YES; + } + } + $sql_ary = array(); foreach ($forum_id as $forum) { @@ -721,7 +759,7 @@ class auth_admin extends auth $sql_ary[] = array( $id_field => (int) $id, 'forum_id' => (int) $forum, - 'auth_option_id' => $any_option_id, + 'auth_option_id' => 0, 'auth_setting' => 0, 'auth_role_id' => $role_id ); @@ -781,6 +819,25 @@ class auth_admin extends auth { global $db; + // Get any-flag as required + list(, $flag) = each(array_keys($auth)); + $flag = substr($flag, 0, strpos($flag, '_') + 1); + + // Remove any-flag from auth ary + if (isset($auth[$flag])) + { + unset($auth[$flag]); + } + + // Re-set any flag... + foreach ($auth as $auth_option => $setting) + { + if ($setting == ACL_YES && (!isset($auth[$flag]) || $auth[$flag] == ACL_NO)) + { + $auth[$flag] = ACL_YES; + } + } + // Remove current auth options... $sql = 'DELETE FROM ' . ACL_ROLES_DATA_TABLE . ' WHERE role_id = ' . $role_id; @@ -867,9 +924,10 @@ class auth_admin extends auth // First of all, lets grab the items having roles with the specified auth options assigned $sql = "SELECT auth_role_id, $id_field, forum_id - FROM $table + FROM $table, " . ACL_ROLES_TABLE . " r WHERE auth_role_id <> 0 - AND auth_option_id = {$auth_id_ary[$permission_type]} + AND auth_role_id = r.role_id + AND r.role_type = '{$permission_type}' AND " . implode(' AND ', $where_sql) . ' ORDER BY auth_role_id'; $result = $db->sql_query($sql); diff --git a/phpBB/includes/auth.php b/phpBB/includes/auth.php index 80e57f1254..fa2cc160b0 100644 --- a/phpBB/includes/auth.php +++ b/phpBB/includes/auth.php @@ -371,9 +371,9 @@ class auth // If one option is allowed, the global permission for this option has to be allowed too // example: if the user has the a_ permission this means he has one or more a_* permissions - if ($auth_ary[$opt] == ACL_YES && !isset($bitstring[$this->acl_options[$ary_key][$option_key]]) || !$bitstring[$this->acl_options[$ary_key][$option_key]]) + if ($auth_ary[$opt] == ACL_YES && (!isset($bitstring[$this->acl_options[$ary_key][$option_key]]) || $bitstring[$this->acl_options[$ary_key][$option_key]] == ACL_NO)) { - $bitstring[$this->acl_options[$ary_key][$option_key]] = 1; + $bitstring[$this->acl_options[$ary_key][$option_key]] = ACL_YES; } } else @@ -523,6 +523,22 @@ class auth { $setting = ($row['auth_role_id']) ? $row['role_auth_setting'] : $row['auth_setting']; $hold_ary[$row['user_id']][$row['forum_id']][$row['auth_option']] = $setting; + + // Check for existence of ACL_YES if an option got set to NO + if ($setting == ACL_NO) + { + $flag = substr($row['auth_option'], 0, strpos($row['auth_option'], '_') + 1); + + if (isset($hold_ary[$row['user_id']][$row['forum_id']][$flag]) && $hold_ary[$row['user_id']][$row['forum_id']][$flag] == ACL_YES) + { + unset($hold_ary[$row['user_id']][$row['forum_id']][$flag]); + + if (in_array(ACL_YES, $hold_ary[$row['user_id']][$row['forum_id']])) + { + $hold_ary[$row['user_id']][$row['forum_id']][$flag] = ACL_YES; + } + } + } } } $db->sql_freeresult($result); @@ -641,16 +657,29 @@ class auth { $login = $method($username, $password); - // If login returned anything other than an array there was an error - if (!is_array($login)) + // If login succeeded, we will log the user in... else we pass the login array through... + if ($login['status'] == LOGIN_SUCCESS) { - /** - * @todo Login Attempt++ - */ - return $login; + $result = $user->session_create($login['user_row']['user_id'], $admin, $autologin, $viewonline); + + // Successful session creation + if ($result === true) + { + return array( + 'status' => LOGIN_SUCCESS, + 'error_msg' => false, + 'user_row' => $login['user_row'], + ); + } + + return array( + 'status' => LOGIN_BREAK, + 'error_msg' => $result, + 'user_row' => $login['user_row'], + ); } - - return $user->session_create($login['user_id'], $admin, $autologin, $viewonline); + + return $login; } } diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index 42e1ac7c1f..a53ae0e819 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -24,22 +24,114 @@ function login_db(&$username, &$password) { global $db, $config; - $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type + $sql = 'SELECT user_id, username, user_password, user_passchg, user_email, user_type, user_login_attempts FROM ' . USERS_TABLE . " WHERE username = '" . $db->sql_escape($username) . "'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - if ($row) + if (!$row) { - if (md5($password) == $row['user_password']) + return array( + 'status' => LOGIN_ERROR_USERNAME, + 'error_msg' => 'LOGIN_ERROR_USERNAME', + 'user_row' => array('user_id' => ANONYMOUS), + ); + } + + // If there are too much login attempts, we need to check for an confirm image + // Every auth module is able to define what to do by itself... + if ($config['max_login_attempts'] && $row['user_login_attempts'] > $config['max_login_attempts']) + { + $confirm_id = request_var('confirm_id', ''); + $confirm_code = request_var('confirm_code', ''); + + // Visual Confirmation handling + if (!$confirm_id) { - return ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) ? 0 : $row; + return array( + 'status' => LOGIN_ERROR_ATTEMPTS, + 'error_msg' => 'LOGIN_ERROR_ATTEMPTS', + 'user_row' => $row, + ); + } + else + { + global $user; + + $sql = 'SELECT code + FROM ' . CONFIRM_TABLE . " + WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "' + AND session_id = '" . $db->sql_escape($user->session_id) . "' + AND confirm_type = " . CONFIRM_LOGIN; + $result = $db->sql_query($sql); + $confirm_row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + if ($confirm_row) + { + if ($confirm_row['code'] != $confirm_code) + { + return array( + 'status' => LOGIN_ERROR_ATTEMPTS, + 'error_msg' => 'CONFIRM_CODE_WRONG', + 'user_row' => $row, + ); + } + else + { + $sql = 'DELETE FROM ' . CONFIRM_TABLE . " + WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "' + AND session_id = '" . $db->sql_escape($user->session_id) . "' + AND confirm_type = " . CONFIRM_LOGIN; + $db->sql_query($sql); + } + } + else + { + return array( + 'status' => LOGIN_ERROR_ATTEMPTS, + 'error_msg' => 'CONFIRM_CODE_WRONG', + 'user_row' => $row, + ); + } } } - return false; + // Password correct... + if (md5($password) == $row['user_password']) + { + // Successful, reset login attempts (the user passed all stages) + $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_attempts = 0 WHERE user_id = ' . $row['user_id']); + + // User inactive... + if ($row['user_type'] == USER_INACTIVE || $row['user_type'] == USER_IGNORE) + { + return array( + 'status' => LOGIN_ERROR_ACTIVE, + 'error_msg' => 'ACTIVE_ERROR', + 'user_row' => $row, + ); + } + + // Successful login... set user_login_attempts to zero... + return array( + 'status' => LOGIN_SUCCESS, + 'error_msg' => false, + 'user_row' => $row, + ); + } + + // Password incorrect - increase login attempts + $db->sql_query('UPDATE ' . USERS_TABLE . ' SET user_login_attempts = user_login_attempts + 1 WHERE user_id = ' . $row['user_id']); + + // Give status about wrong password... + return array( + 'status' => LOGIN_ERROR_PASSWORD, + 'error_msg' => 'LOGIN_ERROR_PASSWORD', + 'user_row' => $row, + ); } ?>
\ No newline at end of file diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 82eb84d9b6..de7deb679b 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -35,6 +35,15 @@ define('ACL_NO', 0); define('ACL_YES', 1); define('ACL_UNSET', -1); +// Login error codes +define('LOGIN_CONTINUE', 1); +define('LOGIN_BREAK', 2); +define('LOGIN_SUCCESS', 3); +define('LOGIN_ERROR_USERNAME', 10); +define('LOGIN_ERROR_PASSWORD', 11); +define('LOGIN_ERROR_ACTIVE', 12); +define('LOGIN_ERROR_ATTEMPTS', 13); + // Group settings define('GROUP_OPEN', 0); define('GROUP_CLOSED', 1); @@ -83,19 +92,23 @@ define('PRIVMSGS_OUTBOX', -2); define('PRIVMSGS_SENTBOX', -1); define('PRIVMSGS_INBOX', 0); -// Report Types -define('REPORT_POST', 1); -define('REPORT_GENERAL', 2); - // Full Folder Actions define('FULL_FOLDER_NONE', -3); define('FULL_FOLDER_DELETE', -2); define('FULL_FOLDER_HOLD', -1); +// Reason types +define('REPORT_REASON_SPECIAL', 1); +define('REPORT_REASON_NORMAL', 2); + // Download Modes - Attachments define('INLINE_LINK', 1); define('PHYSICAL_LINK', 2); +// Confirm types +define('CONFIRM_REG', 1); +define('CONFIRM_LOGIN', 2); + // Categories - Attachments define('ATTACHMENT_CATEGORY_NONE', 0); define('ATTACHMENT_CATEGORY_IMAGE', 1); // Inline Images diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index e75ba650f0..569f3d08a9 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -136,11 +136,11 @@ function gen_rand_string($num_chars) * Return unique id * @param $extra additional entropy for call to mt_srand */ -function unique_id($extra = 0) +function unique_id($extra = 0, $prefix = false) { list($usec, $sec) = explode(' ', microtime()); mt_srand((float) $extra + (float) $sec + ((float) $usec * 100000)); - return uniqid(mt_rand(), true); + return uniqid(($prefix === false) ? mt_rand() : $prefix, true); } if (!function_exists('array_combine')) @@ -1318,7 +1318,10 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa $admin = ($admin) ? 1 : 0; // If authentication is successful we redirect user to previous page - if (($result = $auth->login($username, $password, $autologin, $viewonline, $admin)) === true) + $result = $auth->login($username, $password, $autologin, $viewonline, $admin); + + // The result parameter is always an array, holding the relevant informations... + if ($result['status'] == LOGIN_SUCCESS) { // If admin authentication if ($admin) @@ -1329,7 +1332,9 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa } else { + // Authenticated, but not having admin permissions add_log('admin', 'LOG_ADMIN_AUTH_FAIL'); + trigger_error('NO_AUTH_ADMIN'); } } @@ -1340,19 +1345,57 @@ function login_box($redirect = '', $l_explain = '', $l_success = '', $admin = fa trigger_error($message); } + // The user wanted to re-authenticate, but something failed - log this if ($admin) { add_log('admin', 'LOG_ADMIN_AUTH_FAIL'); } - // If we get a non-numeric (e.g. string) value we output an error - if (is_string($result)) + // Something failed, determine what... + if ($result['status'] == LOGIN_BREAK) { - trigger_error($result, E_USER_ERROR); + trigger_error($result['error_msg'], E_USER_ERROR); } - // If we get an integer zero then we are inactive, else the username/password is wrong - $err = ($result === 0) ? $user->lang['ACTIVE_ERROR'] : $user->lang['LOGIN_ERROR']; + // Special cases... determine + switch ($result['status']) + { + case LOGIN_ERROR_ATTEMPTS: + + // Show confirm image + $sql = 'DELETE FROM ' . CONFIRM_TABLE . " + WHERE session_id = '" . $db->sql_escape($user->session_id) . "' + AND confirm_type = " . CONFIRM_LOGIN; + $db->sql_query($sql); + + // Generate code + $code = gen_rand_string(mt_rand(5, 8)); + $confirm_id = md5(unique_id(0, $user->ip)); + + $sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array( + 'confirm_id' => (string) $confirm_id, + 'session_id' => (string) $user->session_id, + 'confirm_type' => (int) CONFIRM_LOGIN, + 'code' => (string) $code) + ); + $db->sql_query($sql); + + $template->assign_vars(array( + 'S_CONFIRM_CODE' => true, + 'CONFIRM_ID' => $confirm_id, + 'CONFIRM_IMAGE' => '<img src="' . $phpbb_root_path . 'ucp.' . $phpEx . $SID . '&mode=confirm&id=' . $confirm_id . '&type=' . CONFIRM_LOGIN . '" alt="" title="" />', + 'L_LOGIN_CONFIRM_EXPLAIN' => sprintf($user->lang['LOGIN_CONFIRM_EXPLAIN'], '<a href="mailto:' . htmlentities($config['board_contact']) . '">', '</a>'), + )); + + $err = $user->lang[$result['error_msg']]; + + break; + + // Username, password, etc... + default: + $err = $user->lang[$result['error_msg']]; + break; + } } if (!$redirect) diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 3812a3719e..8391fcffc4 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -457,7 +457,7 @@ function move_posts($post_ids, $topic_id, $auto_sync = true) { $forum_ids[] = $row['forum_id']; - sync('reported', 'topic_id', $topic_ids); + sync('topic_reported', 'topic_id', $topic_ids); sync('topic', 'topic_id', $topic_ids, true); sync('forum', 'forum_id', $forum_ids, true); } @@ -609,7 +609,7 @@ function delete_posts($where_type, $where_ids, $auto_sync = true) if ($auto_sync) { - sync('reported', 'topic_id', $topic_ids); + sync('topic_reported', 'topic_id', $topic_ids); sync('topic', 'topic_id', $topic_ids, true); sync('forum', 'forum_id', $forum_ids, true); } diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 775805f26a..78dba728cf 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -893,4 +893,35 @@ function display_attachments($forum_id, $blockname, &$attachment_data, &$update_ // $totaltime = $mtime[0] + $mtime[1] - $starttime; } +/** +* Display reasons +*/ +function display_reasons($reason_id = 0) +{ + global $db, $user, $template; + + $sql = 'SELECT * + FROM ' . REASONS_TABLE . ' + ORDER BY reason_order ASC'; + $result = $db->sql_query($sql); + + while ($row = $db->sql_fetchrow($result)) + { + // If the reason is defined within the language file, we will use the localized version, else just use the database entry... + if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) + { + $row['reson_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]; + $row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]; + } + + $template->assign_block_vars('reason', array( + 'ID' => $row['reason_id'], + 'TITLE' => $row['reason_title'], + 'DESCRIPTION' => $row['reason_description'], + 'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false) + ); + } + $db->sql_freeresult($result); +} + ?>
\ No newline at end of file diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 21e61cc010..f913343d34 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -299,7 +299,7 @@ class messenger $headers .= 'Return-Path: <' . $config['board_email'] . ">\n"; $headers .= 'Sender: <' . $config['board_email'] . ">\n"; $headers .= "MIME-Version: 1.0\n"; - $headers .= 'Message-ID: <' . md5(uniqid(time())) . "@" . $config['server_name'] . ">\n"; + $headers .= 'Message-ID: <' . md5(uniqe_id(0, time())) . "@" . $config['server_name'] . ">\n"; $headers .= 'Date: ' . gmdate('D, d M Y H:i:s T', time()) . "\n"; $headers .= "Content-type: text/plain; charset={$this->encoding}\n"; $headers .= "Content-transfer-encoding: 8bit\n"; diff --git a/phpBB/includes/functions_privmsgs.php b/phpBB/includes/functions_privmsgs.php index a7e8dcd884..ffe81a58b4 100644 --- a/phpBB/includes/functions_privmsgs.php +++ b/phpBB/includes/functions_privmsgs.php @@ -33,7 +33,6 @@ define('RULE_IS_USER', 9); // Is User define('RULE_IS_GROUP', 10); // Is In Usergroup define('RULE_ANSWERED', 11); // Answered define('RULE_FORWARDED', 12); // Forwarded -define('RULE_REPORTED', 13); // Reported define('RULE_TO_GROUP', 14); // Usergroup define('RULE_TO_ME', 15); // Me @@ -78,7 +77,6 @@ $global_privmsgs_rules = array( CHECK_STATUS => array( RULE_ANSWERED => array('check0' => 'replied', 'function' => '{CHECK0} == 1'), RULE_FORWARDED => array('check0' => 'forwarded', 'function' => '{CHECK0} == 1'), - RULE_REPORTED => array('check0' => 'message_reported', 'function' => '{CHECK0} == 1')), CHECK_TO => array( RULE_TO_GROUP => array('check0' => 'to', 'check1' => 'bcc', 'check2' => 'user_in_group', 'function' => 'in_array("g_" . {CHECK2}, {CHECK0}) || in_array("g_" . {CHECK2}, {CHECK1})'), diff --git a/phpBB/includes/functions_upload.php b/phpBB/includes/functions_upload.php index a3109c0ef4..f24edb1dea 100644 --- a/phpBB/includes/functions_upload.php +++ b/phpBB/includes/functions_upload.php @@ -91,6 +91,12 @@ class filespec switch ($mode) { case 'real': + // Remove every extension from filename (to not let the mime bug being exposed) + if (strpos($this->realname, '.') !== false) + { + $this->realname = substr($this->realname, 0, strpos($this->realname, '.')); + } + // Replace any chars which may cause us problems with _ $bad_chars = array("'", "\\", ' ', '/', ':', '*', '?', '"', '<', '>', '|'); @@ -575,7 +581,7 @@ class fileupload unset($url_ary); $tmp_path = (!@ini_get('safe_mode')) ? false : $phpbb_root_path . 'cache'; - $filename = tempnam($tmp_path, uniqid(rand()) . '-'); + $filename = tempnam($tmp_path, unique_id() . '-'); if (!($fp = @fopen($filename, 'wb'))) { diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php index 0143957223..a7e71d6e97 100644 --- a/phpBB/includes/mcp/mcp_main.php +++ b/phpBB/includes/mcp/mcp_main.php @@ -964,7 +964,7 @@ class mcp_main_info 'version' => '1.0.0', 'modes' => array( 'forum_view' => array('title' => 'MCP_MAIN_FORUM_VIEW', 'auth' => 'acl_m_,$id'), - 'front' => array('title' => 'MCP_MAIN_FRONT', 'auth' => ''), + 'front' => array('title' => 'MCP_MAIN_FRONT', 'auth' => 'acl_m_'), 'post_details' => array('title' => 'MCP_MAIN_POST_DETAILS', 'auth' => 'acl_m_,$id'), 'topic_view' => array('title' => 'MCP_MAIN_TOPIC_VIEW', 'auth' => 'acl_m_,$id'), ), diff --git a/phpBB/includes/mcp/mcp_post.php b/phpBB/includes/mcp/mcp_post.php index 05758b9bf2..5dfb5947f9 100644 --- a/phpBB/includes/mcp/mcp_post.php +++ b/phpBB/includes/mcp/mcp_post.php @@ -165,10 +165,17 @@ function mcp_post_details($id, $mode, $action) do { + // If the reason is defined within the language file, we will use the localized version, else just use the database entry... + if (isset($user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]) && isset($user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])])) + { + $row['reson_description'] = $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_title'])]; + $row['reason_title'] = $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_title'])]; + } + $template->assign_block_vars('reports', array( 'REPORT_ID' => $row['report_id'], - 'REASON_TITLE' => $user->lang['report_reasons']['TITLE'][strtoupper($row['reason_name'])], - 'REASON_DESC' => $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_name'])], + 'REASON_TITLE' => $row['reason_title'], + 'REASON_DESC' => $row['reason_description'], 'REPORTER' => ($row['user_id'] != ANONYMOUS) ? $row['username'] : $user->lang['GUEST'], 'U_REPORTER' => ($row['user_id'] != ANONYMOUS) ? "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u={$row['user_id']}" : '', 'USER_NOTIFY' => ($row['user_notify']) ? true : false, diff --git a/phpBB/includes/mcp/mcp_queue.php b/phpBB/includes/mcp/mcp_queue.php index 7884298380..e447184b55 100644 --- a/phpBB/includes/mcp/mcp_queue.php +++ b/phpBB/includes/mcp/mcp_queue.php @@ -542,23 +542,25 @@ function disapprove_post($post_id_list, $mode) if ($reason_id) { - $sql = 'SELECT reason_name + $sql = 'SELECT reason_title, reason_description FROM ' . REASONS_TABLE . " WHERE reason_id = $reason_id"; $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - if (!($row = $db->sql_fetchrow($result)) || (!$reason && $row['reason_name'] == 'other')) + if (!$row || (!$reason && $row['reason_title'] == 'other')) { $additional_msg = 'Please give an appropiate reason for disapproval'; unset($_POST['confirm']); } else { - $disapprove_reason = ($row['reason_name'] != 'other') ? $user->lang['report_reasons']['DESCRIPTION'][strtoupper($row['reason_name'])] : ''; + // 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 .= ($reason) ? "\n\n" . $_REQUEST['reason'] : ''; unset($reason); } - $db->sql_freeresult($result); } if (confirm_box(true)) @@ -683,27 +685,9 @@ function disapprove_post($post_id_list, $mode) } else { - $sql = 'SELECT * - FROM ' . REASONS_TABLE . ' - ORDER BY reason_priority ASC'; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $row['reason_name'] = strtoupper($row['reason_name']); + include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx); - $reason_title = (!empty($user->lang['report_reasons']['TITLE'][$row['reason_name']])) ? $user->lang['report_reasons']['TITLE'][$row['reason_name']] : ucwords(str_replace('_', ' ', $row['reason_name'])); - - $reason_desc = (!empty($user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']])) ? $user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']] : $row['reason_desc']; - - $template->assign_block_vars('reason', array( - 'ID' => $row['reason_id'], - 'NAME' => htmlspecialchars($reason_title), - 'DESCRIPTION' => htmlspecialchars($reason_desc), - 'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false) - ); - } - $db->sql_freeresult($result); + display_reasons($reason_id); $template->assign_vars(array( 'S_NOTIFY_POSTER' => true, diff --git a/phpBB/includes/session.php b/phpBB/includes/session.php index 5888d579f1..354a77bcec 100644 --- a/phpBB/includes/session.php +++ b/phpBB/includes/session.php @@ -773,7 +773,7 @@ class user extends session var $img_lang; // Able to add new option (id 7) - var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10, 'report_pm_notify' => 11); + var $keyoptions = array('viewimg' => 0, 'viewflash' => 1, 'viewsmilies' => 2, 'viewsigs' => 3, 'viewavatars' => 4, 'viewcensors' => 5, 'attachsig' => 6, 'bbcode' => 8, 'smilies' => 9, 'popuppm' => 10); var $keyvalues = array(); function setup($lang_set = false, $style = false) diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index a67de99e03..b592181a35 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -314,7 +314,7 @@ class template // Now we add the block that we're actually assigning to. // We're adding a new iteration to this block with the given // variable assignments. - $str[$blocks[$blockcount]][] = &$vararray; + $str[$blocks[$blockcount]][] = $vararray; } else { @@ -337,7 +337,7 @@ class template // Add a new iteration to this block with the variable assignments // we were given. - $this->_tpldata[$blockname][] = &$vararray; + $this->_tpldata[$blockname][] = $vararray; } return true; @@ -349,7 +349,7 @@ class template * Some Examples: * <code> * - * alter_block_array('loop', $varrarray); // Insert vararray at the end + * alter_block_array('loop', $vararray); // Insert vararray at the beginning * alter_block_array('loop', $vararray, 2); // Insert vararray at position 2 * alter_block_array('loop', $vararray, array('KEY' => 'value')); // Insert vararray at the position where the key 'KEY' has the value of 'value' * alter_block_array('loop', $vararray, false); // Insert vararray at first position @@ -447,7 +447,7 @@ class template // Insert vararray at given position $vararray['S_ROW_COUNT'] = $key; - $this->_tpldata[$blockname][$key] = &$vararray; + $this->_tpldata[$blockname][$key] = $vararray; return true; } @@ -460,7 +460,7 @@ class template $key--; } - $this->_tpldata[$blockname][$key] = array_merge($this->_tpldata[$blockname][$key], &$vararray); + $this->_tpldata[$blockname][$key] = array_merge($this->_tpldata[$blockname][$key], $vararray); return true; } } diff --git a/phpBB/includes/ucp/ucp_confirm.php b/phpBB/includes/ucp/ucp_confirm.php index 831ea92dcc..2edf124b82 100644 --- a/phpBB/includes/ucp/ucp_confirm.php +++ b/phpBB/includes/ucp/ucp_confirm.php @@ -28,8 +28,9 @@ class ucp_confirm // Do we have an id? No, then just exit $confirm_id = request_var('id', ''); + $type = request_var('type', 0); - if (!$confirm_id) + if (!$confirm_id || !$type) { exit; } @@ -38,7 +39,8 @@ class ucp_confirm $sql = 'SELECT code FROM ' . CONFIRM_TABLE . " WHERE session_id = '" . $db->sql_escape($user->session_id) . "' - AND confirm_id = '" . $db->sql_escape($confirm_id) . "'"; + AND confirm_id = '" . $db->sql_escape($confirm_id) . "' + AND confirm_type = $type"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); diff --git a/phpBB/includes/ucp/ucp_pm_viewfolder.php b/phpBB/includes/ucp/ucp_pm_viewfolder.php index b64adc53b0..3616e06c77 100644 --- a/phpBB/includes/ucp/ucp_pm_viewfolder.php +++ b/phpBB/includes/ucp/ucp_pm_viewfolder.php @@ -29,7 +29,7 @@ function view_folder($id, $mode, $folder_id, $folder, $type) $icons = array(); $cache->obtain_icons($icons); - $color_rows = array('marked', 'replied', 'message_reported', 'friend', 'foe'); + $color_rows = array('marked', 'replied', 'friend', 'foe'); foreach ($color_rows as $var) { @@ -167,14 +167,11 @@ function view_folder($id, $mode, $folder_id, $folder, $type) 'PM_IMG' => ($row_indicator) ? $user->img('pm_' . $row_indicator, '') : '', 'ATTACH_ICON_IMG' => ($auth->acl_get('u_download') && $row['message_attachment'] && $config['allow_pm_attach'] && $config['auth_download_pm']) ? $user->img('icon_attach', $user->lang['TOTAL_ATTACHMENTS']) : '', - 'S_PM_REPORTED' => (!empty($row['message_reported']) && $auth->acl_get('m_')) ? true : false, 'S_PM_DELETED' => ($row['deleted']) ? true : false, 'U_VIEW_PM' => ($row['deleted']) ? '' : $view_message_url, 'U_REMOVE_PM' => ($row['deleted']) ? $remove_message_url : '', - 'RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? implode(', ', $address_list[$message_id]) : '', - 'U_MCP_REPORT' => "{$phpbb_root_path}mcp.$phpEx?sid={$user->session_id}&i=reports&pm=$message_id") - // 'U_MCP_QUEUE' => "mcp.$phpEx?sid={$user->session_id}&i=mod_queue&t=$topic_id") + 'RECIPIENTS' => ($folder_id == PRIVMSGS_OUTBOX || $folder_id == PRIVMSGS_SENTBOX) ? implode(', ', $address_list[$message_id]) : '') ); } unset($folder_info['rowset']); @@ -437,8 +434,6 @@ function get_pm_from($folder_id, $folder, $user_id, $url, $type = 'folder') 'POST_IMG' => (!$auth->acl_get('u_sendpm')) ? $user->img('btn_locked', 'PM_LOCKED') : $user->img('btn_post_pm', 'POST_PM'), - 'REPORTED_IMG' => $user->img('icon_reported', 'MESSAGE_REPORTED'), - 'L_NO_MESSAGES' => (!$auth->acl_get('u_sendpm')) ? $user->lang['POST_PM_LOCKED'] : $user->lang['NO_MESSAGES'], 'S_SELECT_SORT_DIR' => $s_sort_dir, @@ -476,7 +471,7 @@ function get_pm_from($folder_id, $folder, $user_id, $url, $type = 'folder') $sql_start = $start; } - $sql = 'SELECT t.*, p.author_id, p.root_level, p.message_time, p.message_subject, p.icon_id, p.message_reported, p.to_address, p.message_attachment, p.bcc_address, u.username + $sql = 'SELECT t.*, p.author_id, p.root_level, p.message_time, p.message_subject, p.icon_id, p.to_address, p.message_attachment, p.bcc_address, u.username FROM ' . PRIVMSGS_TO_TABLE . ' t, ' . PRIVMSGS_TABLE . ' p, ' . USERS_TABLE . " u WHERE t.user_id = $user_id AND p.author_id = u.user_id diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index aec007a36b..8b9d4d859d 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -164,8 +164,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'S_ONLINE' => (!$config['load_onlinetrack']) ? false : ((isset($user_info['online']) && $user_info['online']) ? true : false), 'DELETE_IMG' => $user->img('btn_delete', $user->lang['DELETE_MESSAGE']), 'INFO_IMG' => $user->img('btn_info', $user->lang['VIEW_PM_INFO']), - 'REPORT_IMG' => $user->img('btn_report', $user->lang['REPORT_PM']), - 'REPORTED_IMG' => $user->img('icon_reported', $user->lang['MESSAGE_REPORTED_MESSAGE']), 'PROFILE_IMG' => $user->img('btn_profile', $user->lang['READ_PROFILE']), 'EMAIL_IMG' => $user->img('btn_email', $user->lang['SEND_EMAIL']), 'QUOTE_IMG' => $user->img('btn_quote', $user->lang['POST_QUOTE_PM']), @@ -179,9 +177,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'SIGNATURE' => ($message_row['enable_sig']) ? $signature : '', 'EDITED_MESSAGE' => $l_edited_by, - 'U_MCP_REPORT' => "{$phpbb_root_path}mcp.$phpEx$SID&mode=pm_details&p=" . $message_row['msg_id'], - 'U_REPORT' => ($config['auth_report_pm'] && $auth->acl_get('u_pm_report')) ? "{$phpbb_root_path}report.$phpEx$SID&pm=" . $message_row['msg_id'] : '', - 'U_INFO' => ($auth->acl_get('m_') && ($message_row['message_reported'] || $message_row['forwarded'])) ? "{$phpbb_root_path}mcp.$phpEx$SID&mode=pm_details&p=" . $message_row['msg_id'] : '', + 'U_INFO' => ($auth->acl_get('m_') && $message_row['forwarded']) ? "{$phpbb_root_path}mcp.$phpEx$SID&mode=pm_details&p=" . $message_row['msg_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' => "{$phpbb_root_path}memberlist.$phpEx$SID&mode=viewprofile&u=" . $author_id, 'U_EMAIL' => $user_info['email'], @@ -191,7 +187,6 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) '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_MESSAGE_REPORTED'=> ($message_row['message_reported'] && $auth->acl_get('m_')) ? true : false, 'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false, 'S_DISPLAY_NOTICE' => $display_notice && $message_row['message_attachment'], diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index c58caa7ef0..fd79225c6d 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -42,7 +42,6 @@ class ucp_prefs 'notifypm' => true, 'popuppm' => false, 'allowpm' => true, - 'report_pm_notify' => false ); foreach ($var_ary as $var => $default) @@ -63,7 +62,6 @@ class ucp_prefs if (!sizeof($error)) { $user->optionset('popuppm', $popuppm); - $user->optionset('report_pm_notify', $report_pm_notify); $sql_ary = array( 'user_allow_pm' => $allowpm, @@ -113,9 +111,6 @@ class ucp_prefs $popuppm = (isset($popuppm)) ? $popuppm : $user->optionget('popuppm'); $popup_pm_yes = ($popuppm) ? ' checked="checked"' : ''; $popup_pm_no = (!$popuppm) ? ' checked="checked"' : ''; - $report_pm_notify = (isset($report_pm_notify)) ? $report_pm_notify : $user->optionget('report_pm_notify'); - $report_pm_notify_yes = ($report_pm_notify) ? ' checked="checked"' : ''; - $report_pm_notify_no = (!$report_pm_notify) ? ' checked="checked"' : ''; $dst = (isset($dst)) ? $dst : $user->data['user_dst']; $dst_yes = ($dst) ? ' checked="checked"' : ''; $dst_no = (!$dst) ? ' checked="checked"' : ''; @@ -160,8 +155,6 @@ class ucp_prefs 'NOTIFY_PM_NO' => $notify_pm_no, 'POPUP_PM_YES' => $popup_pm_yes, 'POPUP_PM_NO' => $popup_pm_no, - 'REPORT_PM_YES' => $report_pm_notify_yes, - 'REPORT_PM_NO' => $report_pm_notify_no, 'DST_YES' => $dst_yes, 'DST_NO' => $dst_no, 'NOTIFY_EMAIL' => ($notifymethod == NOTIFY_EMAIL) ? 'checked="checked"' : '', diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 42a203884f..57f6a32de8 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -150,7 +150,8 @@ class ucp_register $sql = 'SELECT code FROM ' . CONFIRM_TABLE . " WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "' - AND session_id = '" . $db->sql_escape($user->session_id) . "'"; + AND session_id = '" . $db->sql_escape($user->session_id) . "' + AND confirm_type = " . CONFIRM_REG; $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) @@ -164,7 +165,8 @@ class ucp_register { $sql = 'DELETE FROM ' . CONFIRM_TABLE . " WHERE confirm_id = '" . $db->sql_escape($confirm_id) . "' - AND session_id = '" . $db->sql_escape($user->session_id) . "'"; + AND session_id = '" . $db->sql_escape($user->session_id) . "' + AND confirm_type = " . CONFIRM_REG; $db->sql_query($sql); } } @@ -401,14 +403,16 @@ class ucp_register while ($row = $db->sql_fetchrow($result)); $sql = 'DELETE FROM ' . CONFIRM_TABLE . ' - WHERE session_id NOT IN (' . implode(', ', $sql_in) . ')'; + WHERE session_id NOT IN (' . implode(', ', $sql_in) . ') + AND confirm_type = ' . CONFIRM_REG; $db->sql_query($sql); } $db->sql_freeresult($result); $sql = 'SELECT COUNT(session_id) AS attempts FROM ' . CONFIRM_TABLE . " - WHERE session_id = '" . $db->sql_escape($user->session_id) . "'"; + WHERE session_id = '" . $db->sql_escape($user->session_id) . "' + AND confirm_type = " . CONFIRM_REG; $result = $db->sql_query($sql); if ($row = $db->sql_fetchrow($result)) @@ -421,18 +425,18 @@ class ucp_register $db->sql_freeresult($result); $code = gen_rand_string(mt_rand(5, 8)); - - $confirm_id = md5(uniqid($user->ip)); + $confirm_id = md5(unique_id(0, $user->ip)); $sql = 'INSERT INTO ' . CONFIRM_TABLE . ' ' . $db->sql_build_array('INSERT', array( 'confirm_id' => (string) $confirm_id, 'session_id' => (string) $user->session_id, + 'confirm_type' => (int) CONFIRM_REG, 'code' => (string) $code) ); $db->sql_query($sql); } - $confirm_image = "<img src=\"ucp.$phpEx$SID&mode=confirm&id=$confirm_id\" alt=\"\" title=\"\" />"; + $confirm_image = '<img src="' . $phpbb_root_path . 'ucp.' . $phpEx . $SID . '&mode=confirm&id=' . $confirm_id . '&type=' . CONFIRM_REG . '" alt="" title="" />'; $s_hidden_fields .= '<input type="hidden" name="confirm_id" value="' . $confirm_id . '" />'; } diff --git a/phpBB/includes/ucp/ucp_reports.php b/phpBB/includes/ucp/ucp_reports.php deleted file mode 100755 index 6fe1b2342a..0000000000 --- a/phpBB/includes/ucp/ucp_reports.php +++ /dev/null @@ -1,367 +0,0 @@ -<?php -/** -* -* @package ucp -* @version $Id$ -* @copyright (c) 2005 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License -* -*/ - -/** -* @package ucp -* ucp_reports -*/ -class ucp_reports -{ - function main($id, $mode) - { - global $config, $db, $user, $auth, $SID, $template, $phpbb_root_path, $phpEx; - - switch ($mode) - { - case 'list': - $this->ucp_reports_list($id, $mode); - break; - case 'report': - $this->ucp_reports_report($id, $mode); - break; - } - } - - function ucp_reports_list($id, $mode) - { - global $db, $user, $config, $template; - - $sql = "SELECT - r.report_id, r.report_time, r.report_status, - p.post_id, p.poster_id, - t.topic_id, t.topic_title, - f.forum_id, f.forum_name, - u.username - FROM " . - REPORTS_TABLE . " r - LEFT JOIN " . POSTS_TABLE . " p USING (post_id) - LEFT JOIN " . TOPICS_TABLE . " t USING (topic_id) - LEFT JOIN " . FORUMS_TABLE . " f USING (forum_id)," . - REASONS_TABLE . " re, " . - USERS_TABLE . " u - WHERE - p.poster_id = u.user_id - && r.reason_id = re.reason_id - && r.user_id = " . $user->data['user_id'] . " - ORDER BY - report_time DESC"; - - $start = request_var('start', 0); - $result = $db->sql_query_limit($sql, $config['topics_per_page'], $start); - - while ($row = $db->sql_fetchrow($result)) - { - if ($row['poster_id'] == ANONYMOUS) - { - $poster = (!empty($row['post_username'])) ? $row['post_username'] : $user->lang['GUEST']; - } - else - { - $poster = $row['username']; - } - - $template->assign_block_vars('report', array( - 'U_FORUM' => "mcp.$phpEx$SID&i=report&mode=&f={$row['forum_id']}", - // Q: Why accessing the topic by a post_id instead of its topic_id? - // A: To prevent the post from being hidden because of wrong encoding or different charset - 'U_REPORT_TOPIC' => "mcp.$phpEx$SID&i=report&mode=report_view_topic&t={$row['topic_id']}", - 'U_VIEW_DETAILS'=> "mcp.$phpEx$SID&i=queue&start=$start&mode=approve_details&f={$forum_id}&p={$row['post_id']}", - 'U_VIEWPROFILE' => ($row['poster_id'] != ANONYMOUS) ? "memberlist.$phpEx$SID&mode=viewprofile&u={$row['poster_id']}" : '', - - 'REPORT_COUNT' => $row['report_count'], - 'FORUM_NAME' => $row['forum_name'], - 'TOPIC_TITLE' => $row['topic_title'], - 'POSTER' => $poster, - 'REPORT_TIME' => $user->format_date($row['report_time']), - ) - ); - } - $db->sql_freeresult($result); - - - $this->tpl_name = 'ucp_reports_list'; - } - - function ucp_reports_report($id, $mode) - { - global $db, $user, $config, $template, $auth; - - $post_id = request_var('p', 0); - $report_type = ($post_id > 0) ? REPORT_POST : REPORT_GENERAL; - - // Insert or update report in the database if a form has been submitted - if (isset($_POST['submit'])) - { - $report_id = request_var('report_id', 0); - $reason_id = request_var('reason_id', 0); - $user_notify = (!empty($_REQUEST['notify']) && $user->data['is_registered']) ? true : false; - $report_text = request_var('report_text', ''); - - $sql = 'SELECT reason_name - FROM ' . REASONS_TABLE . " - WHERE reason_id = $reason_id"; - $result = $db->sql_query($sql); - - // TODO: 'other' is used as a special value. Make sure that you can't remove this in the admin. - if (!($row = $db->sql_fetchrow($result)) || (!$report_text && $row['reason_name'] == 'other')) - { - trigger_error('EMPTY_REPORT'); - } - $db->sql_freeresult($result); - - if (!empty($user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']])) - { - $reason_desc = $user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']]; - } - else - { - $reason_desc = $row['reason_name']; - } - - $sql_ary = array( - 'reason_id' => (int) $reason_id, - 'reason_type' => (int) $report_type, - 'post_id' => (int) $post_id, - 'user_id' => (int) $user->data['user_id'], - 'user_notify' => (int) $user_notify, - 'report_time' => (int) time(), - 'report_text' => (string) $report_text // TODO: Add some BBcode magic - ); - - if ($report_id) - { - $sql = 'UPDATE ' . REPORTS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' - WHERE report_id = ' . $report_id . ' user_id = ' . $user->data['user_id']; - $db->sql_query($sql); - if ($db->sql_affectedrows() == 0) - { - // TODO: i18n? - trigger_error("You tried to change a report that isn't yours."); - } - } - else - { - $sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . - $db->sql_build_array('INSERT', $sql_ary); - $db->sql_query($sql); - $report_id = $db->sql_nextid(); - } - - if (!$report_data['post_reported']) - { - $sql = 'UPDATE ' . POSTS_TABLE . ' - SET post_reported = 1 - WHERE post_id = ' . $id; - $db->sql_query($sql); - } - - if (!$report_data['topic_reported']) - { - $sql = 'UPDATE ' . TOPICS_TABLE . ' - SET topic_reported = 1 - WHERE topic_id = ' . $report_data['topic_id']; - $db->sql_query($sql); - } - - // Send Notifications - // All persons get notified about a new report, if notified by PM, send out email notifications too - - // Send notifications to moderators - $acl_list = $auth->acl_get_list(false, array('m_', 'a_'), array(0, $report_data['forum_id'])); - $notify_user = $acl_list[$report_data['forum_id']]['m_']; - $notify_user = array_unique(array_merge($notify_user, $acl_list[0]['a_'])); - unset($acl_list); - - // How to notify them? - $sql = 'SELECT user_id, username, user_options, user_lang, user_email, user_notify_type, user_jabber - FROM ' . USERS_TABLE . ' - WHERE user_id IN (' . implode(', ', $notify_user) . ')'; - $result = $db->sql_query($sql); - - $notify_user = array(); - while ($row = $db->sql_fetchrow($result)) - { - $notify_user[$row['user_id']] = array( - 'name' => $row['username'], - 'email' => $row['user_email'], - 'jabber'=> $row['user_jabber'], - 'lang' => $row['user_lang'], - 'notify_type' => $row['user_notify_type'], - - 'pm' => $user->optionget('report_pm_notify', $row['user_options']) - ); - } - $db->sql_freeresult($result); - - $report_data = array( - 'id' => $id, - 'report_id' => $report_id, - 'reporter' => $user->data['username'], - 'reason' => $reason_desc, - 'text' => $report_text, - 'subject' => $report_data['post_subject'], - 'view_post' => ($report_type == REPORT_POST) ? "viewtopic.$phpEx?f={$report_data['forum_id']}&t={$report_data['topic_id']}&p=$id&e=$id" : '' - ); - - report_notification($notify_user, $report_type, $report_data); - - meta_refresh(3, $redirect_url); - - $message = $user->lang['POST_REPORTED_SUCCESS'] . '<br /><br />' . sprintf($user->lang[(($report_type == REPORT_POST) ? 'RETURN_TOPIC' : 'RETURN_PREVIOUS')], '<a href="' . $redirect_url . '">', '</a>'); - trigger_error($message); - } - - - // Show the 'create report' form - // Report about a specific post or a general report (i.e. message to the mods)? - $post_id = (request_var('p', 0)) ? true : false; - - if ($report_type == REPORT_POST) - { - $sql = 'SELECT - f.forum_id, - t.topic_id - FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f - WHERE p.post_id = $post_id - AND p.topic_id = t.topic_id - AND p.forum_id = f.forum_id"; - $result = $db->sql_query($sql); - - if (!($report_data = $db->sql_fetchrow($result))) - { - $message = $user->lang['POST_NOT_EXIST']; - trigger_error($message); - } - - $forum_id = $report_data['forum_id']; - $topic_id = $report_data['topic_id']; - - // Check required permissions - $acl_check_ary = array('f_list' => 'POST_NOT_EXIST', 'f_read' => 'USER_CANNOT_READ', 'f_report' => 'USER_CANNOT_REPORT'); - - foreach ($acl_check_ary as $acl => $error) - { - if (!$auth->acl_get($acl, $forum_id)) - { - trigger_error($error); - } - } - unset($acl_check_ary); - - // Check if the post has already been reported by this user - $sql = "SELECT - report_id, reason_id, post_id, user_notify, report_time, report_text, report_status, - bbcode_uid, bbcode_bitfield - FROM " . REPORTS_TABLE . " - WHERE post_id = $post_id - AND user_id = " . $user->data['user_id']; - $result = $db->sql_query($sql); - - if ($row = $db->sql_fetchrow($result)) - { - if ($user->data['is_registered']) - { - // A report exists, extract $row if we're going to display the form - if ($reason_id) - { - $report_id = (int) $row['report_id']; - } - else - { - // Overwrite set variables - $report_id = $row['report_id']; - $reason_id = $row['reason_id']; - $post_id = $row['post_id']; - $user_notify = $row['user_notify']; - $report_time = $row['report_time']; - $report_text = $row['report_text']; - $report_status = $row['report_status']; - $bbcode_uid = $row['bbcode_uid']; - $bbcode_bitfield= $row['bbcode_bitfield']; - } - } - else - { - // TODO: is this what we want? - trigger_error($user->lang['ALREADY_REPORTED'] . '<br /><br />' . sprintf($user->lang[(($report_type == REPORT_POST) ? 'RETURN_TOPIC' : 'RETURN_PREVIOUS')], '<a href="' . $redirect_url . '">', '</a>')); - } - } - else - { - $report_id = 0; - } - } - - // Show create report form - // Generate the form - $sql = "SELECT * - FROM " . REASONS_TABLE . " - WHERE report_type = $report_type - ORDER BY reason_priority ASC"; - $result = $db->sql_query($sql); - - while ($row = $db->sql_fetchrow($result)) - { - $row['reason_name'] = strtoupper($row['reason_name']); - - $reason_title = (!empty($user->lang['report_reasons']['TITLE'][$row['reason_name']])) ? $user->lang['report_reasons']['TITLE'][$row['reason_name']] : ucwords(str_replace('_', ' ', $row['reason_name'])); - - $reason_desc = (!empty($user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']])) ? $user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']] : $row['reason_description']; - - $template->assign_block_vars('reason', array( - 'ID' => $row['reason_id'], - 'NAME' => htmlspecialchars($reason_title), - 'DESCRIPTION' => htmlspecialchars($reason_desc), - 'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false) - ); - } - - $template->assign_vars(array( - 'REPORT_TEXT' => $report_text, - 'S_REPORT_ACTION' => "{$phpbb_root_path}report.$phpEx$SID&p=$id" . (($report_id) ? "&report_id=$report_id" : ''), - - 'S_NOTIFY' => (!empty($user_notify)) ? true : false, - 'S_CAN_NOTIFY' => ($user->data['is_registered']) ? true : false, - 'S_REPORT_POST' => ($report_type == REPORT_POST) ? true : false) - ); - - $this->tpl_name = 'ucp_reports_report'; - } -} - -/** -* @package module_install -*/ -class ucp_reports_info -{ - function module() - { - return array( - 'filename' => 'ucp_reports', - 'title' => 'UCP_REPORTS', - 'version' => '1.0.0', - 'modes' => array( - 'list' => array('title' => 'UCP_REPORTS_LIST', 'auth' => ''), - 'report' => array('title' => 'UCP_REPORTS_REPORT', 'auth' => ''), - ), - ); - } - - function install() - { - } - - function uninstall() - { - } -} - -?>
\ No newline at end of file diff --git a/phpBB/index.php b/phpBB/index.php index 81ce34574f..9f180a5216 100644 --- a/phpBB/index.php +++ b/phpBB/index.php @@ -88,7 +88,8 @@ $template->assign_vars(array( 'S_LOGIN_ACTION' => "{$phpbb_root_path}ucp.$phpEx$SID&mode=login", 'S_DISPLAY_BIRTHDAY_LIST' => ($config['load_birthdays']) ? true : false, - 'U_MARK_FORUMS' => "{$phpbb_root_path}index.$phpEx$SID&mark=forums") + 'U_MARK_FORUMS' => "{$phpbb_root_path}index.$phpEx$SID&mark=forums", + 'U_MCP' => ($auth->acl_get('m_')) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=main&mode=front" : '') ); // Output page diff --git a/phpBB/install/install.php b/phpBB/install/install.php index c2f4478c07..8fd4875329 100644 --- a/phpBB/install/install.php +++ b/phpBB/install/install.php @@ -418,10 +418,10 @@ if ($stage == 0) // Imagemagick are you there? Give me a sign or a path ... $img_imagick = ''; - if (empty($_ENV['MAGICK_HOME'])) + if (empty(getenv('MAGICK_HOME'))) { $locations = array('C:/WINDOWS/', 'C:/WINNT/', 'C:/WINDOWS/SYSTEM/', 'C:/WINNT/SYSTEM/', 'C:/WINDOWS/SYSTEM32/', 'C:/WINNT/SYSTEM32/', '/usr/bin/', '/usr/sbin/', '/usr/local/bin/', '/usr/local/sbin/', '/opt/', '/usr/imagemagick/', '/usr/bin/imagemagick/'); - $path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', $_ENV['PATH']))); + $path_locations = str_replace('\\', '/', (explode(($exe) ? ';' : ':', getenv('PATH')))); $locations = array_merge($path_locations, $locations); foreach ($locations as $location) @@ -441,7 +441,7 @@ if ($stage == 0) } else { - $img_imagick = str_replace('\\', '/', $_ENV['MAGICK_HOME']); + $img_imagick = str_replace('\\', '/', getenv('MAGICK_HOME')); } ?> @@ -880,7 +880,7 @@ if ($stage == 2) // Write out a temp file ... if safe mode is on we'll write it to our // local cache/tmp directory $tmp_path = (!@ini_get('safe_mode')) ? false : $phpbb_root_path . 'cache/tmp'; - $filename = tempnam($tmp_path, uniqid(rand()) . 'cfg'); + $filename = tempnam($tmp_path, unique_id() . 'cfg'); $fp = @fopen($filename, 'w'); @fwrite($fp, $config_data); diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 560b402222..ef7db6d6ac 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -2,7 +2,7 @@ # Firebird Schema for phpBB 3.x - (c) phpBB Group, 2005 # # $Id$ -# +# @todo user_last_warning to users table and warnings table # phpbb_attachments CREATE TABLE phpbb_attachments ( @@ -125,6 +125,7 @@ CREATE TABLE phpbb_config ( CREATE TABLE phpbb_confirm ( confirm_id VARCHAR(32) NOT NULL, session_id VARCHAR(32) NOT NULL, + confirm_type INTEGER DEFAULT 0 NOT NULL, code VARCHAR(8) NOT NULL );; @@ -358,7 +359,6 @@ CREATE TABLE phpbb_privmsgs ( icon_id INTEGER DEFAULT 1 NOT NULL, author_ip VARCHAR(40) NOT NULL, message_time INTEGER DEFAULT 0 NOT NULL, - message_reported INTEGER DEFAULT 0 NOT NULL, enable_bbcode INTEGER DEFAULT 1 NOT NULL, enable_smilies INTEGER DEFAULT 1 NOT NULL, enable_magic_url INTEGER DEFAULT 1 NOT NULL, @@ -471,9 +471,9 @@ CREATE TABLE phpbb_reports ( report_id INTEGER NOT NULL, reason_id INTEGER DEFAULT 0 NOT NULL, post_id INTEGER DEFAULT 0 NOT NULL, - msg_id INTEGER DEFAULT 0 NOT NULL, user_id INTEGER DEFAULT 0 NOT NULL, user_notify INTEGER DEFAULT 0 NOT NULL, + report_closed INTEGER DEFAULT 0 NOT NULL, report_time INTEGER DEFAULT 0 NOT NULL, report_text BLOB SUB_TYPE TEXT NOT NULL );; @@ -481,9 +481,9 @@ CREATE TABLE phpbb_reports ( # phpbb_reports_reasons CREATE TABLE phpbb_reports_reasons ( reason_id INTEGER NOT NULL, - reason_priority INTEGER DEFAULT 0 NOT NULL, - reason_name VARCHAR(255) NOT NULL, - reason_description BLOB SUB_TYPE TEXT NOT NULL + reason_title VARCHAR(255) NOT NULL, + reason_description BLOB SUB_TYPE TEXT NOT NULL, + reason_order INTEGER DEFAULT 0 NOT NULL );; # phpbb_search_results @@ -761,6 +761,7 @@ CREATE TABLE phpbb_users ( user_lastpage VARCHAR(100) NOT NULL, user_last_confirm_key VARCHAR(10) NOT NULL, user_warnings INTEGER DEFAULT 0 NOT NULL, + user_login_attempts INTEGER DEFAULT 0 NOT NULL, user_posts INTEGER DEFAULT 0 NOT NULL, user_lang VARCHAR(30) NOT NULL, user_timezone DOUBLE PRECISION DEFAULT 0 NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index 945bf97f6c..c2e9ae2c46 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -3,6 +3,7 @@ MSSQL Schema for phpBB 3.x - (c) phpBB Group, 2005 $Id$ +@todo user_last_warning to users table and warnings table */ @@ -130,6 +131,7 @@ GO CREATE TABLE [phpbb_confirm] ( [confirm_id] [varchar] (32) NOT NULL , [session_id] [varchar] (32) NOT NULL , + [confirm_type] [int] NOT NULL , [code] [varchar] (8) NOT NULL ) ON [PRIMARY] GO @@ -363,7 +365,6 @@ CREATE TABLE [phpbb_privmsgs] ( [icon_id] [int] NOT NULL , [author_ip] [varchar] (40) NOT NULL , [message_time] [int] NOT NULL , - [message_reported] [int] NOT NULL , [enable_bbcode] [int] NOT NULL , [enable_smilies] [int] NOT NULL , [enable_magic_url] [int] NOT NULL , @@ -476,9 +477,9 @@ CREATE TABLE [phpbb_reports] ( [report_id] [int] IDENTITY (1, 1) NOT NULL , [reason_id] [int] NOT NULL , [post_id] [int] NOT NULL , - [msg_id] [int] NOT NULL , [user_id] [int] NOT NULL , [user_notify] [int] NOT NULL , + [report_closed] [int] NOT NULL , [report_time] [int] NOT NULL , [report_text] [text] NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] @@ -486,9 +487,9 @@ GO CREATE TABLE [phpbb_reports_reasons] ( [reason_id] [int] IDENTITY (1, 1) NOT NULL , - [reason_priority] [int] NOT NULL , - [reason_name] [varchar] (255) NOT NULL , - [reason_description] [text] NOT NULL + [reason_title] [varchar] (255) NOT NULL , + [reason_description] [text] NOT NULL , + [reason_order] [int] NOT NULL ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] GO @@ -766,6 +767,7 @@ CREATE TABLE [phpbb_users] ( [user_lastpage] [varchar] (100) NOT NULL , [user_last_confirm_key] [varchar] (10) NOT NULL , [user_warnings] [int] NOT NULL , + [user_login_attempts] [int] NOT NULL , [user_posts] [int] NOT NULL , [user_lang] [varchar] (30) NOT NULL , [user_timezone] [float] NOT NULL , @@ -1250,6 +1252,10 @@ ALTER TABLE [phpbb_config] WITH NOCHECK ADD CONSTRAINT [DF_config_is_dynamic] DEFAULT (0) FOR [is_dynamic] GO +ALTER TABLE [phpbb_confirm] WITH NOCHECK ADD + CONSTRAINT [DF_confirm_confirm_type] DEFAULT (0) FOR [confirm_type] +GO + ALTER TABLE [phpbb_drafts] WITH NOCHECK ADD CONSTRAINT [DF_drafts_user_id] DEFAULT (0) FOR [user_id], CONSTRAINT [DF_drafts_topic_id] DEFAULT (0) FOR [topic_id], @@ -1394,7 +1400,6 @@ ALTER TABLE [phpbb_privmsgs] WITH NOCHECK ADD CONSTRAINT [DF_privms_author_id] DEFAULT (0) FOR [author_id], CONSTRAINT [DF_privms_icon_id] DEFAULT (1) FOR [icon_id], CONSTRAINT [DF_privms_message_time] DEFAULT (0) FOR [message_time], - CONSTRAINT [DF_privms_message_reported] DEFAULT (0) FOR [message_reported], CONSTRAINT [DF_privms_enable_bbcode] DEFAULT (1) FOR [enable_bbcode], CONSTRAINT [DF_privms_enable_smilies] DEFAULT (1) FOR [enable_smilies], CONSTRAINT [DF_privms_enable_magic_url] DEFAULT (1) FOR [enable_magic_url], @@ -1470,14 +1475,14 @@ GO ALTER TABLE [phpbb_reports] WITH NOCHECK ADD CONSTRAINT [DF_report_reason_id] DEFAULT (0) FOR [reason_id], CONSTRAINT [DF_report_post_id] DEFAULT (0) FOR [post_id], - CONSTRAINT [DF_report_msg_id] DEFAULT (0) FOR [msg_id], CONSTRAINT [DF_report_user_id] DEFAULT (0) FOR [user_id], CONSTRAINT [DF_report_user_notify] DEFAULT (0) FOR [user_notify], + CONSTRAINT [DF_report_report_closed] DEFAULT (0) FOR [report_closed], CONSTRAINT [DF_report_report_time] DEFAULT (0) FOR [report_time] GO ALTER TABLE [phpbb_reports_reasons] WITH NOCHECK ADD - CONSTRAINT [DF_reporr_reason_priority] DEFAULT (0) FOR [reason_priority] + CONSTRAINT [DF_reporr_reason_order] DEFAULT (0) FOR [reason_order] GO ALTER TABLE [phpbb_search_results] WITH NOCHECK ADD @@ -1608,6 +1613,7 @@ ALTER TABLE [phpbb_users] WITH NOCHECK ADD CONSTRAINT [DF_users__user_lastmark] DEFAULT (0) FOR [user_lastmark], CONSTRAINT [DF_users__user_lastpost_time] DEFAULT (0) FOR [user_lastpost_time], CONSTRAINT [DF_users__user_warnings] DEFAULT (0) FOR [user_warnings], + CONSTRAINT [DF_users__user_login_attempts] DEFAULT (0) FOR [user_login_attempts], CONSTRAINT [DF_users__user_posts] DEFAULT (0) FOR [user_posts], CONSTRAINT [DF_users__user_timezone] DEFAULT (0) FOR [user_timezone], CONSTRAINT [DF_users__user_dst] DEFAULT (0) FOR [user_dst], diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql index 9fb2e4b302..2f5fa88bd1 100644 --- a/phpBB/install/schemas/mysql_schema.sql +++ b/phpBB/install/schemas/mysql_schema.sql @@ -151,6 +151,7 @@ CREATE TABLE phpbb_config ( CREATE TABLE phpbb_confirm ( confirm_id char(32) DEFAULT '' NOT NULL, session_id char(32) DEFAULT '' NOT NULL, + confirm_type tinyint(3) DEFAULT '0' NOT NULL, code char(8) DEFAULT '' NOT NULL, PRIMARY KEY (session_id,confirm_id) ); @@ -425,7 +426,6 @@ CREATE TABLE phpbb_privmsgs ( icon_id tinyint(4) UNSIGNED DEFAULT '1' NOT NULL, author_ip varchar(40) DEFAULT '' NOT NULL, message_time int(11) DEFAULT '0' NOT NULL, - message_reported tinyint(1) DEFAULT '0' NOT NULL, enable_bbcode tinyint(1) DEFAULT '1' NOT NULL, enable_smilies tinyint(1) DEFAULT '1' NOT NULL, enable_magic_url tinyint(1) DEFAULT '1' NOT NULL, @@ -551,43 +551,27 @@ CREATE TABLE phpbb_ranks ( ); # Table: 'phpbb_reports' -CREATE TABLE `phpbb_reports` ( - `report_id` smallint(5) unsigned NOT NULL auto_increment, - `report_type` tinyint(4) unsigned NOT NULL default '0', - `reason_id` smallint(5) unsigned NOT NULL default '0', - `post_id` mediumint(8) unsigned NOT NULL default '0', - `user_id` mediumint(8) unsigned NOT NULL default '0', - `user_notify` tinyint(1) NOT NULL default '0', - `report_time` int(10) unsigned NOT NULL default '0', - `report_text` text NOT NULL, - `report_status` tinyint(4) NOT NULL default '0', - `bbcode_uid` varchar(5) NOT NULL default '', - `bbcode_bitfield` int(11) NOT NULL default '0', - PRIMARY KEY (`report_id`) +CREATE TABLE phpbb_reports ( + report_id smallint(5) UNSIGNED NOT NULL auto_increment, + reason_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL, + post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, + user_notify tinyint(1) DEFAULT '0' NOT NULL, + report_closed tinyint(1) DEFAULT '0' NOT NULL, + report_time int(11) UNSIGNED DEFAULT '0' NOT NULL, + report_text text NOT NULL, + PRIMARY KEY (report_id) ); # Table: 'phpbb_reports_reasons' CREATE TABLE phpbb_reports_reasons ( reason_id smallint(6) NOT NULL auto_increment, - report_type tinyint(4) unsigned NOT NULL default '0', - reason_priority tinyint(4) DEFAULT '0' NOT NULL, - reason_name varchar(255) DEFAULT '' NOT NULL, + reason_title varchar(255) DEFAULT '' NOT NULL, reason_description text NOT NULL, + reason_order tinyint(4) DEFAULT '0' NOT NULL, PRIMARY KEY (reason_id) ); -# Table: `phpbb_reports_replies` -CREATE TABLE `phpbb_reports_replies` ( - `reply_id` mediumint(8) unsigned NOT NULL auto_increment, - `report_id` mediumint(8) unsigned NOT NULL default '0', - `reply_time` int(10) unsigned NOT NULL default '0', - `reply_text` text NOT NULL, - `from_user_id` mediumint(9) NOT NULL default '0', - `status` tinyint(4) NOT NULL default '0', - `to_user_id` mediumint(9) NOT NULL default '0', - PRIMARY KEY (`reply_id`) -); - # Table: 'phpbb_search_results' CREATE TABLE phpbb_search_results ( search_key varchar(32) DEFAULT '' NOT NULL, @@ -901,6 +885,7 @@ CREATE TABLE phpbb_users ( user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, user_warnings tinyint(4) DEFAULT '0' NOT NULL, user_last_warning int(11) DEFAULT '0' NOT NULL, + user_login_attempts smallint(4) DEFAULT '0' NOT NULL, user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL, user_lang varchar(30) DEFAULT '' NOT NULL, user_timezone decimal(5,2) DEFAULT '0.0' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 080393632c..f579cde90d 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -2,6 +2,7 @@ Oracle Schema for phpBB 3.x - (c) phpBB Group, 2005 $Id$ +@todo user_last_warning to users table and warnings table */ /* @@ -325,6 +326,7 @@ CREATE INDEX is_dynamic on phpbb_config (is_dynamic) CREATE TABLE phpbb_confirm ( confirm_id varchar2(32) DEFAULT '', session_id varchar2(32) DEFAULT '', + confirm_type number(3) DEFAULT '0' NOT NULL, code varchar2(8) DEFAULT '', CONSTRAINT pk_phpbb_confirm PRIMARY KEY (session_id, confirm_id) ) @@ -855,7 +857,6 @@ CREATE TABLE phpbb_privmsgs ( icon_id number(4) DEFAULT '1' NOT NULL, author_ip varchar2(40) DEFAULT '', message_time number(11) DEFAULT '0' NOT NULL, - message_reported number(1) DEFAULT '0' NOT NULL, enable_bbcode number(1) DEFAULT '1' NOT NULL, enable_smilies number(1) DEFAULT '1' NOT NULL, enable_magic_url number(1) DEFAULT '1' NOT NULL, @@ -1098,9 +1099,9 @@ END; */ CREATE TABLE phpbb_reports_reasons ( reason_id number(6) NOT NULL, - reason_priority number(4) DEFAULT '0' NOT NULL, - reason_name varchar2(255) DEFAULT '', + reason_title varchar2(255) DEFAULT '', reason_description clob, + reason_order number(4) DEFAULT '0' NOT NULL, CONSTRAINT pk_phpbb_reports_reasons PRIMARY KEY (reason_id) ) / @@ -1127,9 +1128,9 @@ CREATE TABLE phpbb_reports ( report_id number(5) NOT NULL, reason_id number(5) DEFAULT '0' NOT NULL, post_id number(8) DEFAULT '0' NOT NULL, - msg_id number(8) DEFAULT '0' NOT NULL, user_id number(8) DEFAULT '0' NOT NULL, user_notify number(1) DEFAULT '0' NOT NULL, + report_closed number(1) DEFAULT '0' NOT NULL, report_time number(10) DEFAULT '0' NOT NULL, report_text clob, CONSTRAINT pk_phpbb_reports PRIMARY KEY (report_id) @@ -1666,6 +1667,7 @@ CREATE TABLE phpbb_users ( user_lastpage varchar2(100) DEFAULT '', user_last_confirm_key varchar2(10) DEFAULT '', user_warnings number(4) DEFAULT '0' NOT NULL, + user_login_attempts number(4) DEFAULT '0' NOT NULL, user_posts number(8) DEFAULT '0' NOT NULL, user_lang varchar2(30) DEFAULT '', user_timezone number(5, 2) DEFAULT '1' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 3ab8c4a711..0737c60ede 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -2,6 +2,7 @@ PostgreSQL Schema for phpBB 3.x - (c) phpBB Group, 2005 $Id$ +@todo user_last_warning to users table and warnings table */ BEGIN; @@ -194,6 +195,7 @@ CREATE INDEX is_dynamic_phpbb_config_index ON phpbb_config (is_dynamic); CREATE TABLE phpbb_confirm ( confirm_id varchar(32) DEFAULT '' NOT NULL, session_id varchar(32) DEFAULT '' NOT NULL, + confirm_type INT2 DEFAULT '0' NOT NULL, code varchar(8) DEFAULT '' NOT NULL, PRIMARY KEY (session_id,confirm_id) ); @@ -571,7 +573,6 @@ CREATE TABLE phpbb_privmsgs ( icon_id INT2 DEFAULT '1' NOT NULL, author_ip varchar(40) DEFAULT '' NOT NULL, message_time INT4 DEFAULT '0' NOT NULL, - message_reported INT2 DEFAULT '0' NOT NULL, enable_bbcode INT2 DEFAULT '1' NOT NULL, enable_smilies INT2 DEFAULT '1' NOT NULL, enable_magic_url INT2 DEFAULT '1' NOT NULL, @@ -752,9 +753,9 @@ CREATE SEQUENCE phpbb_reports_reasons_reason; CREATE TABLE phpbb_reports_reasons ( reason_id INT2 DEFAULT nextval('phpbb_reports_reasons_reason'), - reason_priority INT2 DEFAULT '0' NOT NULL, - reason_name varchar(255) DEFAULT '' NOT NULL, + reason_title varchar(255) DEFAULT '' NOT NULL, reason_description TEXT DEFAULT '' NOT NULL, + reason_order INT2 DEFAULT '0' NOT NULL, PRIMARY KEY (reason_id) ); @@ -767,15 +768,14 @@ CREATE TABLE phpbb_reports ( report_id INT2 DEFAULT nextval('phpbb_reports_report_id_seq'), reason_id INT2 DEFAULT '0' NOT NULL, post_id INT4 DEFAULT '0' NOT NULL, - msg_id INT4 DEFAULT '0' NOT NULL, user_id INT4 DEFAULT '0' NOT NULL, user_notify INT2 DEFAULT '0' NOT NULL, + report_closed INT2 DEFAULT '0' NOT NULL, report_time INT4 DEFAULT '0' NOT NULL, report_text TEXT DEFAULT '' NOT NULL, PRIMARY KEY (report_id), CHECK (reason_id>=0), CHECK (post_id>=0), - CHECK (msg_id>=0), CHECK (user_id>=0), CHECK (report_time>=0) ); @@ -1170,6 +1170,7 @@ CREATE TABLE phpbb_users ( user_lastpage varchar(100) DEFAULT '' NOT NULL, user_last_confirm_key varchar(10) DEFAULT '' NOT NULL, user_warnings INT2 DEFAULT '0' NOT NULL, + user_login_attempts INT4 DEFAULT '0' NOT NULL, user_posts INT4 DEFAULT '0' NOT NULL, user_lang varchar(30) DEFAULT '' NOT NULL, user_timezone decimal(5,2) DEFAULT '0.0' NOT NULL, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index c10090495a..df33b926bc 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -38,7 +38,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_flash_pm', '1 INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_img_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_method', 'db'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_quote_pm', '1'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_report_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_smilies_pm', '1'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_filesize', '6144'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('avatar_gallery_path', 'images/avatars/gallery'); @@ -285,6 +284,7 @@ INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_phpinfo', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_profile', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_prune', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_ranks', 1); +INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_reasons', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_roles', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_server', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('a_styles', 1); @@ -320,7 +320,6 @@ INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_attach', 1 INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_bbcode', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_smilies', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_download', 1); -INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_report', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_edit', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_printpm', 1); INSERT INTO phpbb_auth_options (auth_option, is_global) VALUES ('u_pm_emailpm', 1); @@ -475,126 +474,127 @@ 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 (90, 1, 'pm', 'ucp', 0, 27, 98, 99, 'UCP_PM_POPUP_TITLE', 'popup', 'cfg_allow_privmsg'); # ACP -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 (2, 1, '', 'acp', 1, 0, 227, 262, 'ACP_CAT_GENERAL', '', ''); -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 (7, 1, 'modules', 'acp', 1, 67, 443, 444, 'ACP', 'acp', 'acl_a_modules'); -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 (11, 1, '', 'acp', 1, 0, 305, 356, 'ACP_CAT_USERGROUP', '', ''); -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 (41, 1, 'main', 'acp', 1, 2, 228, 229, 'ACP_MAIN', '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 (42, 1, '', 'acp', 1, 2, 230, 241, 'ACP_GENERAL_CONFIGURATION', '', ''); -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 (43, 1, '', 'acp', 1, 2, 242, 249, 'ACP_CLIENT_COMMUNICATION', '', ''); -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 (44, 1, '', 'acp', 1, 2, 250, 261, 'ACP_SERVER_CONFIGURATION', '', ''); -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 (46, 1, '', 'acp', 1, 0, 263, 280, 'ACP_CAT_FORUMS', '', ''); -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 (47, 1, '', 'acp', 1, 0, 281, 304, 'ACP_CAT_POSTING', '', ''); -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 (48, 1, '', 'acp', 1, 0, 357, 404, 'ACP_CAT_PERMISSIONS', '', ''); -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 (49, 1, '', 'acp', 1, 0, 405, 418, 'ACP_CAT_STYLES', '', ''); -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 (50, 1, '', 'acp', 1, 0, 419, 430, 'ACP_CAT_MAINTANENCE', '', ''); -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 (51, 1, '', 'acp', 1, 0, 431, 450, 'ACP_CAT_SYSTEM', '', ''); -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 (52, 1, '', 'acp', 1, 0, 451, 452, 'ACP_CAT_DOT_MODS', '', ''); -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 (53, 1, '', 'acp', 1, 46, 264, 269, 'ACP_CAT_FORUMS', '', ''); -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 (54, 1, '', 'acp', 1, 46, 270, 279, 'ACP_FORUM_BASED_PERMISSIONS', '', ''); -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 (56, 1, '', 'acp', 1, 47, 294, 303, 'ACP_ATTACHMENTS', '', ''); -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 (57, 1, '', 'acp', 1, 11, 306, 335, 'ACP_CAT_USERS', '', ''); -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 (58, 1, '', 'acp', 1, 11, 336, 343, 'ACP_GROUPS', '', ''); -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 (59, 1, '', 'acp', 1, 11, 344, 355, 'ACP_USER_SECURITY', '', ''); -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 (61, 1, '', 'acp', 1, 48, 360, 365, 'ACP_BASIC_PERMISSIONS', '', ''); -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 (62, 1, '', 'acp', 1, 49, 406, 409, 'ACP_STYLE_MANAGEMENT', '', ''); -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 (63, 1, '', 'acp', 1, 50, 420, 427, 'ACP_FORUM_LOGS', '', ''); -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 (64, 1, '', 'acp', 1, 50, 428, 429, 'ACP_CAT_DATABASE', '', ''); -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 (65, 1, '', 'acp', 1, 51, 432, 433, 'ACP_AUTOMATION', '', ''); -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 (66, 1, '', 'acp', 1, 51, 434, 441, 'ACP_GENERAL_TASKS', '', ''); -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 (67, 1, '', 'acp', 1, 51, 442, 449, 'ACP_MODULE_MANAGEMENT', '', ''); -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 (69, 1, 'modules', 'acp', 1, 67, 445, 446, 'UCP', 'ucp', 'acl_a_modules'); -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 (71, 1, 'board', 'acp', 1, 42, 231, 232, 'ACP_BOARD_SETTINGS', 'settings', 'acl_a_board'); -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 (72, 1, 'board', 'acp', 1, 42, 233, 234, 'ACP_BOARD_DEFAULTS', 'default', 'acl_a_defaults'); -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 (73, 1, 'board', 'acp', 1, 42, 235, 236, 'ACP_AVATAR_SETTINGS', 'avatar', 'acl_a_board'); -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 (74, 1, 'attachments', 'acp', 1, 42, 237, 238, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach'); -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 (75, 1, '', 'acp', 1, 47, 282, 293, 'ACP_MESSAGES', '', ''); -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 (76, 1, 'attachments', 'acp', 1, 56, 295, 296, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach'); -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 (77, 1, 'attachments', 'acp', 1, 56, 297, 298, 'ACP_EXTENSION_GROUPS', 'ext_groups', 'acl_a_attach'); -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 (78, 1, 'attachments', 'acp', 1, 56, 299, 300, 'ACP_MANAGE_EXTENSIONS', 'extensions', 'acl_a_attach'); -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 (80, 1, 'attachments', 'acp', 1, 56, 301, 302, 'ACP_ORPHAN_ATTACHMENTS', 'orphan', 'acl_a_attach'); -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 (81, 1, 'board', 'acp', 1, 42, 239, 240, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults'); -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 (82, 1, 'board', 'acp', 1, 43, 243, 244, 'ACP_AUTH_SETTINGS', 'auth', 'acl_a_server'); -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 (83, 1, 'board', 'acp', 1, 43, 245, 246, 'ACP_EMAIL_SETTINGS', 'email', 'acl_a_server'); -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 (84, 1, 'jabber', 'acp', 1, 43, 247, 248, 'ACP_JABBER_SETTINGS', 'settings', 'acl_a_jabber'); -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 (85, 1, 'board', 'acp', 1, 44, 251, 252, 'ACP_COOKIE_SETTINGS', 'cookie', 'acl_a_cookies'); -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 (86, 1, 'board', 'acp', 1, 44, 253, 254, 'ACP_SERVER_SETTINGS', 'server', 'acl_a_server'); -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 (87, 1, 'board', 'acp', 1, 44, 255, 256, 'ACP_LOAD_SETTINGS', 'load', 'acl_a_server'); -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 (89, 1, 'php_info', 'acp', 1, 44, 257, 258, 'ACP_PHP_INFO', 'info', 'acl_a_phpinfo'); -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 (91, 1, 'bots', 'acp', 1, 44, 259, 260, 'ACP_BOTS', 'bots', 'acl_a_bots'); -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 (92, 1, 'modules', 'acp', 1, 67, 447, 448, 'MCP', 'mcp', 'acl_a_modules'); -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 (93, 1, 'board', 'acp', 1, 75, 283, 284, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults'); -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 (94, 1, 'bbcodes', 'acp', 1, 75, 285, 286, 'ACP_BBCODES', 'bbcodes', 'acl_a_bbcode'); -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 (95, 1, 'icons', 'acp', 1, 75, 287, 288, 'ACP_ICONS', 'icons', 'acl_a_icons'); -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 (96, 1, 'icons', 'acp', 1, 75, 289, 290, 'ACP_SMILIES', 'smilies', 'acl_a_icons'); -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 (97, 1, 'words', 'acp', 1, 75, 291, 292, 'ACP_WORDS', 'words', 'acl_a_words'); -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 (98, 1, 'logs', 'acp', 1, 63, 421, 422, 'ACP_ADMIN_LOGS', 'admin', 'acl_a_viewlogs'); -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 (99, 1, 'logs', 'acp', 1, 63, 423, 424, 'ACP_MOD_LOGS', 'mod', 'acl_a_viewlogs'); -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 (100, 1, 'logs', 'acp', 1, 63, 425, 426, 'ACP_CRITICAL_LOGS', 'critical', 'acl_a_viewlogs'); -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 (101, 1, 'language', 'acp', 1, 66, 435, 436, 'ACP_LANGUAGE_PACKS', 'lang_packs', 'acl_a_language'); -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 (102, 1, 'bots', 'acp', 1, 66, 437, 438, 'ACP_BOTS', 'bots', 'acl_a_bots'); -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 (103, 1, 'groups', 'acp', 1, 58, 337, 338, 'ACP_GROUPS_MANAGE', 'manage', 'acl_a_group'); -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 (105, 1, 'email', 'acp', 1, 66, 439, 440, 'ACP_MASS_EMAIL', 'email', 'acl_a_email'); -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 (106, 1, 'ranks', 'acp', 1, 57, 311, 312, 'ACP_MANAGE_RANKS', 'ranks', 'acl_a_ranks'); -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 (107, 1, 'ban', 'acp', 1, 59, 349, 350, 'ACP_BAN_EMAILS', 'email', 'acl_a_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 (108, 1, 'ban', 'acp', 1, 59, 351, 352, 'ACP_BAN_IPS', 'ip', 'acl_a_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 (109, 1, 'ban', 'acp', 1, 59, 353, 354, 'ACP_BAN_USERNAMES', 'user', 'acl_a_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 (110, 1, 'disallow', 'acp', 1, 59, 347, 348, 'ACP_DISALLOW_USERNAMES', 'usernames', 'acl_a_names'); -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 (111, 1, 'prune', 'acp', 1, 59, 345, 346, 'ACP_PRUNE_USERS', 'users', 'acl_a_userdel'); -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 (112, 1, 'prune', 'acp', 1, 53, 267, 268, 'ACP_PRUNE_FORUMS', 'forums', 'acl_a_prune'); -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 (113, 1, 'profile', 'acp', 1, 57, 309, 310, 'ACP_CUSTOM_PROFILE_FIELDS', 'profile', 'acl_a_profile'); -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 (114, 1, 'forums', 'acp', 1, 53, 265, 266, 'ACP_MANAGE_FORUMS', 'manage', 'acl_a_forum'); -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 (115, 1, 'users', 'acp', 1, 57, 307, 308, 'ACP_MANAGE_USERS', 'overview', 'acl_a_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 (116, 1, 'users', 'acp', 0, 57, 313, 314, 'ACP_USER_FEEDBACK', 'feedback', 'acl_a_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 (117, 1, 'users', 'acp', 0, 57, 315, 316, 'ACP_USER_PROFILE', 'profile', 'acl_a_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 (118, 1, 'users', 'acp', 0, 57, 317, 318, 'ACP_USER_PREFS', 'prefs', 'acl_a_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 (119, 1, 'users', 'acp', 0, 57, 319, 320, 'ACP_USER_AVATAR', 'avatar', 'acl_a_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 (120, 1, 'users', 'acp', 0, 57, 323, 324, 'ACP_USER_SIG', 'sig', 'acl_a_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 (121, 1, 'users', 'acp', 0, 57, 325, 326, 'ACP_USER_GROUPS', 'groups', 'acl_a_user && acl_a_group'); -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 (122, 1, 'users', 'acp', 0, 57, 327, 328, 'ACP_USER_PERM', 'perm', 'acl_a_user && acl_a_viewauth'); -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 (123, 1, 'users', 'acp', 0, 57, 329, 330, 'ACP_USER_ATTACH', 'attach', 'acl_a_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 (141, 1, '', 'acp', 1, 49, 410, 417, 'ACP_STYLE_COMPONENTS', '', ''); -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 (142, 1, 'styles', 'acp', 1, 62, 407, 408, 'ACP_STYLES', 'style', 'acl_a_styles'); -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 (143, 1, 'styles', 'acp', 1, 141, 411, 412, 'ACP_TEMPLATES', 'template', 'acl_a_styles'); -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 (144, 1, 'styles', 'acp', 1, 141, 413, 414, 'ACP_THEMES', 'theme', 'acl_a_styles'); -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 (145, 1, 'styles', 'acp', 1, 141, 415, 416, 'ACP_IMAGESETS', 'imageset', 'acl_a_styles'); -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 (147, 1, 'users', 'acp', 0, 57, 321, 322, 'ACP_USER_RANK', 'rank', 'acl_a_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 (148, 1, 'permissions', 'acp', 1, 61, 361, 362, 'ACP_USERS_PERMISSIONS', 'setting_user_global', 'acl_a_authusers && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'); -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 (149, 1, 'permissions', 'acp', 1, 180, 377, 378, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)'); -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 (150, 1, 'permissions', 'acp', 1, 61, 363, 364, 'ACP_GROUPS_PERMISSIONS', 'setting_group_global', 'acl_a_authgroups && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'); -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 (151, 1, 'permissions', 'acp', 1, 180, 379, 380, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)'); -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 (152, 1, 'permissions', 'acp', 1, 174, 367, 368, 'ACP_ADMINISTRATORS', 'setting_admin_global', 'acl_a_aauth && (acl_a_authusers || acl_a_authgroups)'); -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 (155, 1, 'permissions', 'acp', 1, 174, 369, 370, 'ACP_GLOBAL_MODERATORS', 'setting_mod_global', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)'); -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 (156, 1, 'permissions', 'acp', 1, 180, 375, 376, 'ACP_FORUM_MODERATORS', 'setting_mod_local', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)'); -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 (157, 1, 'permissions', 'acp', 1, 180, 373, 374, 'ACP_FORUM_PERMISSIONS', 'setting_forum_local', 'acl_a_fauth && (acl_a_authusers || acl_a_authgroups)'); -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 (158, 1, '', 'acp', 1, 48, 392, 403, 'ACP_PERMISSION_MASKS', '', ''); -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 (159, 1, 'permissions', 'acp', 1, 158, 393, 394, 'ACP_VIEW_ADMIN_PERMISSIONS', 'view_admin_global', 'acl_a_viewauth'); -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 (160, 1, 'permissions', 'acp', 1, 158, 395, 396, 'ACP_VIEW_USER_PERMISSIONS', 'view_user_global', 'acl_a_viewauth'); -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 (161, 1, 'permissions', 'acp', 1, 158, 397, 398, 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS', 'view_mod_global', 'acl_a_viewauth'); -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 (162, 1, 'permissions', 'acp', 1, 158, 399, 400, 'ACP_VIEW_FORUM_MOD_PERMISSIONS', 'view_mod_local', 'acl_a_viewauth'); -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 (163, 1, 'permissions', 'acp', 1, 158, 401, 402, 'ACP_VIEW_FORUM_PERMISSIONS', 'view_forum_local', 'acl_a_viewauth'); -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 (165, 1, '', 'acp', 1, 48, 382, 391, 'ACP_PERMISSION_ROLES', '', ''); -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 (174, 1, '', 'acp', 1, 48, 366, 371, 'ACP_SPECIAL_PERMISSIONS', '', ''); -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 (175, 1, 'permission_roles', 'acp', 1, 165, 383, 384, 'ACP_ADMIN_ROLES', 'admin_roles', 'acl_a_roles'); -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 (176, 1, 'permissions', 'acp', 1, 48, 358, 359, 'ACP_PERMISSIONS', 'intro', 'acl_a_authusers || acl_a_authgroups || acl_a_viewauth'); -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 (177, 1, 'permission_roles', 'acp', 1, 165, 385, 386, 'ACP_USER_ROLES', 'user_roles', 'acl_a_roles'); -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 (178, 1, 'permission_roles', 'acp', 1, 165, 387, 388, 'ACP_MOD_ROLES', 'mod_roles', 'acl_a_roles'); -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 (179, 1, 'permission_roles', 'acp', 1, 165, 389, 390, 'ACP_FORUM_ROLES', 'forum_roles', 'acl_a_roles'); -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 (180, 1, '', 'acp', 1, 48, 372, 381, 'ACP_FORUM_BASED_PERMISSIONS', '', ''); -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 (181, 1, 'permissions', 'acp', 1, 54, 271, 272, 'ACP_FORUM_PERMISSIONS', 'setting_forum_local', 'acl_a_fauth && (acl_a_authusers || acl_a_authgroups)'); -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 (182, 1, 'permissions', 'acp', 1, 54, 273, 274, 'ACP_FORUM_MODERATORS', 'setting_mod_local', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)'); -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 (183, 1, 'permissions', 'acp', 1, 54, 275, 276, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)'); -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 (184, 1, 'permissions', 'acp', 1, 54, 277, 278, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)'); -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 (185, 1, 'permissions', 'acp', 1, 57, 331, 332, 'ACP_USERS_PERMISSIONS', 'setting_user_global', 'acl_a_authusers && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'); -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 (186, 1, 'permissions', 'acp', 1, 58, 339, 340, 'ACP_GROUPS_PERMISSIONS', 'setting_group_global', 'acl_a_authgroups && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'); -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 (187, 1, 'permissions', 'acp', 1, 58, 341, 342, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)'); -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 (188, 1, 'permissions', 'acp', 1, 57, 333, 334, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)'); +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 (2, 1, '', 'acp', 1, 0, 229, 264, 'ACP_CAT_GENERAL', '', ''); +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 (7, 1, 'modules', 'acp', 1, 67, 447, 448, 'ACP', 'acp', 'acl_a_modules'); +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 (11, 1, '', 'acp', 1, 0, 307, 358, 'ACP_CAT_USERGROUP', '', ''); +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 (41, 1, 'main', 'acp', 1, 2, 230, 231, 'ACP_MAIN', '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 (42, 1, '', 'acp', 1, 2, 232, 243, 'ACP_GENERAL_CONFIGURATION', '', ''); +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 (43, 1, '', 'acp', 1, 2, 244, 251, 'ACP_CLIENT_COMMUNICATION', '', ''); +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 (44, 1, '', 'acp', 1, 2, 252, 263, 'ACP_SERVER_CONFIGURATION', '', ''); +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 (46, 1, '', 'acp', 1, 0, 265, 282, 'ACP_CAT_FORUMS', '', ''); +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 (47, 1, '', 'acp', 1, 0, 283, 306, 'ACP_CAT_POSTING', '', ''); +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 (48, 1, '', 'acp', 1, 0, 359, 406, 'ACP_CAT_PERMISSIONS', '', ''); +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 (49, 1, '', 'acp', 1, 0, 407, 420, 'ACP_CAT_STYLES', '', ''); +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 (50, 1, '', 'acp', 1, 0, 421, 432, 'ACP_CAT_MAINTANENCE', '', ''); +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 (51, 1, '', 'acp', 1, 0, 433, 454, 'ACP_CAT_SYSTEM', '', ''); +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 (52, 1, '', 'acp', 1, 0, 455, 456, 'ACP_CAT_DOT_MODS', '', ''); +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 (53, 1, '', 'acp', 1, 46, 266, 271, 'ACP_CAT_FORUMS', '', ''); +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 (54, 1, '', 'acp', 1, 46, 272, 281, 'ACP_FORUM_BASED_PERMISSIONS', '', ''); +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 (56, 1, '', 'acp', 1, 47, 296, 305, 'ACP_ATTACHMENTS', '', ''); +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 (57, 1, '', 'acp', 1, 11, 308, 337, 'ACP_CAT_USERS', '', ''); +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 (58, 1, '', 'acp', 1, 11, 338, 345, 'ACP_GROUPS', '', ''); +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 (59, 1, '', 'acp', 1, 11, 346, 357, 'ACP_USER_SECURITY', '', ''); +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 (61, 1, '', 'acp', 1, 48, 362, 367, 'ACP_BASIC_PERMISSIONS', '', ''); +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 (62, 1, '', 'acp', 1, 49, 408, 411, 'ACP_STYLE_MANAGEMENT', '', ''); +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 (63, 1, '', 'acp', 1, 50, 422, 429, 'ACP_FORUM_LOGS', '', ''); +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 (64, 1, '', 'acp', 1, 50, 430, 431, 'ACP_CAT_DATABASE', '', ''); +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 (65, 1, '', 'acp', 1, 51, 434, 435, 'ACP_AUTOMATION', '', ''); +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 (66, 1, '', 'acp', 1, 51, 436, 445, 'ACP_GENERAL_TASKS', '', ''); +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 (67, 1, '', 'acp', 1, 51, 446, 453, 'ACP_MODULE_MANAGEMENT', '', ''); +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 (69, 1, 'modules', 'acp', 1, 67, 449, 450, 'UCP', 'ucp', 'acl_a_modules'); +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 (71, 1, 'board', 'acp', 1, 42, 233, 234, 'ACP_BOARD_SETTINGS', 'settings', 'acl_a_board'); +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 (72, 1, 'board', 'acp', 1, 42, 235, 236, 'ACP_BOARD_DEFAULTS', 'default', 'acl_a_defaults'); +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 (73, 1, 'board', 'acp', 1, 42, 237, 238, 'ACP_AVATAR_SETTINGS', 'avatar', 'acl_a_board'); +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 (74, 1, 'attachments', 'acp', 1, 42, 239, 240, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach'); +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 (75, 1, '', 'acp', 1, 47, 284, 295, 'ACP_MESSAGES', '', ''); +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 (76, 1, 'attachments', 'acp', 1, 56, 297, 298, 'ACP_ATTACHMENT_SETTINGS', 'attach', 'acl_a_attach'); +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 (77, 1, 'attachments', 'acp', 1, 56, 299, 300, 'ACP_EXTENSION_GROUPS', 'ext_groups', 'acl_a_attach'); +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 (78, 1, 'attachments', 'acp', 1, 56, 301, 302, 'ACP_MANAGE_EXTENSIONS', 'extensions', 'acl_a_attach'); +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 (80, 1, 'attachments', 'acp', 1, 56, 303, 304, 'ACP_ORPHAN_ATTACHMENTS', 'orphan', 'acl_a_attach'); +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 (81, 1, 'board', 'acp', 1, 42, 241, 242, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults'); +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 (82, 1, 'board', 'acp', 1, 43, 245, 246, 'ACP_AUTH_SETTINGS', 'auth', 'acl_a_server'); +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 (83, 1, 'board', 'acp', 1, 43, 247, 248, 'ACP_EMAIL_SETTINGS', 'email', 'acl_a_server'); +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 (84, 1, 'jabber', 'acp', 1, 43, 249, 250, 'ACP_JABBER_SETTINGS', 'settings', 'acl_a_jabber'); +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 (85, 1, 'board', 'acp', 1, 44, 253, 254, 'ACP_COOKIE_SETTINGS', 'cookie', 'acl_a_cookies'); +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 (86, 1, 'board', 'acp', 1, 44, 255, 256, 'ACP_SERVER_SETTINGS', 'server', 'acl_a_server'); +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 (87, 1, 'board', 'acp', 1, 44, 257, 258, 'ACP_LOAD_SETTINGS', 'load', 'acl_a_server'); +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 (89, 1, 'php_info', 'acp', 1, 44, 259, 260, 'ACP_PHP_INFO', 'info', 'acl_a_phpinfo'); +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 (91, 1, 'bots', 'acp', 1, 44, 261, 262, 'ACP_BOTS', 'bots', 'acl_a_bots'); +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 (92, 1, 'modules', 'acp', 1, 67, 451, 452, 'MCP', 'mcp', 'acl_a_modules'); +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 (93, 1, 'board', 'acp', 1, 75, 285, 286, 'ACP_MESSAGE_SETTINGS', 'message', 'acl_a_defaults'); +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 (94, 1, 'bbcodes', 'acp', 1, 75, 287, 288, 'ACP_BBCODES', 'bbcodes', 'acl_a_bbcode'); +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 (95, 1, 'icons', 'acp', 1, 75, 289, 290, 'ACP_ICONS', 'icons', 'acl_a_icons'); +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 (96, 1, 'icons', 'acp', 1, 75, 291, 292, 'ACP_SMILIES', 'smilies', 'acl_a_icons'); +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 (97, 1, 'words', 'acp', 1, 75, 293, 294, 'ACP_WORDS', 'words', 'acl_a_words'); +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 (98, 1, 'logs', 'acp', 1, 63, 423, 424, 'ACP_ADMIN_LOGS', 'admin', 'acl_a_viewlogs'); +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 (99, 1, 'logs', 'acp', 1, 63, 425, 426, 'ACP_MOD_LOGS', 'mod', 'acl_a_viewlogs'); +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 (100, 1, 'logs', 'acp', 1, 63, 427, 428, 'ACP_CRITICAL_LOGS', 'critical', 'acl_a_viewlogs'); +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 (101, 1, 'language', 'acp', 1, 66, 437, 438, 'ACP_LANGUAGE_PACKS', 'lang_packs', 'acl_a_language'); +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 (102, 1, 'bots', 'acp', 1, 66, 439, 440, 'ACP_BOTS', 'bots', 'acl_a_bots'); +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 (103, 1, 'groups', 'acp', 1, 58, 339, 340, 'ACP_GROUPS_MANAGE', 'manage', 'acl_a_group'); +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 (105, 1, 'email', 'acp', 1, 66, 443, 444, 'ACP_MASS_EMAIL', 'email', 'acl_a_email'); +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 (106, 1, 'ranks', 'acp', 1, 57, 313, 314, 'ACP_MANAGE_RANKS', 'ranks', 'acl_a_ranks'); +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 (107, 1, 'ban', 'acp', 1, 59, 351, 352, 'ACP_BAN_EMAILS', 'email', 'acl_a_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 (108, 1, 'ban', 'acp', 1, 59, 353, 354, 'ACP_BAN_IPS', 'ip', 'acl_a_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 (109, 1, 'ban', 'acp', 1, 59, 355, 356, 'ACP_BAN_USERNAMES', 'user', 'acl_a_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 (110, 1, 'disallow', 'acp', 1, 59, 349, 350, 'ACP_DISALLOW_USERNAMES', 'usernames', 'acl_a_names'); +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 (111, 1, 'prune', 'acp', 1, 59, 347, 348, 'ACP_PRUNE_USERS', 'users', 'acl_a_userdel'); +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 (112, 1, 'prune', 'acp', 1, 53, 269, 270, 'ACP_PRUNE_FORUMS', 'forums', 'acl_a_prune'); +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 (113, 1, 'profile', 'acp', 1, 57, 311, 312, 'ACP_CUSTOM_PROFILE_FIELDS', 'profile', 'acl_a_profile'); +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 (114, 1, 'forums', 'acp', 1, 53, 267, 268, 'ACP_MANAGE_FORUMS', 'manage', 'acl_a_forum'); +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 (115, 1, 'users', 'acp', 1, 57, 309, 310, 'ACP_MANAGE_USERS', 'overview', 'acl_a_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 (116, 1, 'users', 'acp', 0, 57, 315, 316, 'ACP_USER_FEEDBACK', 'feedback', 'acl_a_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 (117, 1, 'users', 'acp', 0, 57, 317, 318, 'ACP_USER_PROFILE', 'profile', 'acl_a_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 (118, 1, 'users', 'acp', 0, 57, 319, 320, 'ACP_USER_PREFS', 'prefs', 'acl_a_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 (119, 1, 'users', 'acp', 0, 57, 321, 322, 'ACP_USER_AVATAR', 'avatar', 'acl_a_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 (120, 1, 'users', 'acp', 0, 57, 325, 326, 'ACP_USER_SIG', 'sig', 'acl_a_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 (121, 1, 'users', 'acp', 0, 57, 327, 328, 'ACP_USER_GROUPS', 'groups', 'acl_a_user && acl_a_group'); +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 (122, 1, 'users', 'acp', 0, 57, 329, 330, 'ACP_USER_PERM', 'perm', 'acl_a_user && acl_a_viewauth'); +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 (123, 1, 'users', 'acp', 0, 57, 331, 332, 'ACP_USER_ATTACH', 'attach', 'acl_a_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 (141, 1, '', 'acp', 1, 49, 412, 419, 'ACP_STYLE_COMPONENTS', '', ''); +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 (142, 1, 'styles', 'acp', 1, 62, 409, 410, 'ACP_STYLES', 'style', 'acl_a_styles'); +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 (143, 1, 'styles', 'acp', 1, 141, 413, 414, 'ACP_TEMPLATES', 'template', 'acl_a_styles'); +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 (144, 1, 'styles', 'acp', 1, 141, 415, 416, 'ACP_THEMES', 'theme', 'acl_a_styles'); +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 (145, 1, 'styles', 'acp', 1, 141, 417, 418, 'ACP_IMAGESETS', 'imageset', 'acl_a_styles'); +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 (147, 1, 'users', 'acp', 0, 57, 323, 324, 'ACP_USER_RANK', 'rank', 'acl_a_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 (148, 1, 'permissions', 'acp', 1, 61, 363, 364, 'ACP_USERS_PERMISSIONS', 'setting_user_global', 'acl_a_authusers && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'); +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 (149, 1, 'permissions', 'acp', 1, 180, 379, 380, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)'); +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 (150, 1, 'permissions', 'acp', 1, 61, 365, 366, 'ACP_GROUPS_PERMISSIONS', 'setting_group_global', 'acl_a_authgroups && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'); +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 (151, 1, 'permissions', 'acp', 1, 180, 381, 382, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)'); +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 (152, 1, 'permissions', 'acp', 1, 174, 369, 370, 'ACP_ADMINISTRATORS', 'setting_admin_global', 'acl_a_aauth && (acl_a_authusers || acl_a_authgroups)'); +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 (155, 1, 'permissions', 'acp', 1, 174, 371, 372, 'ACP_GLOBAL_MODERATORS', 'setting_mod_global', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)'); +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 (156, 1, 'permissions', 'acp', 1, 180, 377, 378, 'ACP_FORUM_MODERATORS', 'setting_mod_local', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)'); +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 (157, 1, 'permissions', 'acp', 1, 180, 375, 376, 'ACP_FORUM_PERMISSIONS', 'setting_forum_local', 'acl_a_fauth && (acl_a_authusers || acl_a_authgroups)'); +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 (158, 1, '', 'acp', 1, 48, 394, 405, 'ACP_PERMISSION_MASKS', '', ''); +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 (159, 1, 'permissions', 'acp', 1, 158, 395, 396, 'ACP_VIEW_ADMIN_PERMISSIONS', 'view_admin_global', 'acl_a_viewauth'); +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 (160, 1, 'permissions', 'acp', 1, 158, 397, 398, 'ACP_VIEW_USER_PERMISSIONS', 'view_user_global', 'acl_a_viewauth'); +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 (161, 1, 'permissions', 'acp', 1, 158, 399, 400, 'ACP_VIEW_GLOBAL_MOD_PERMISSIONS', 'view_mod_global', 'acl_a_viewauth'); +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 (162, 1, 'permissions', 'acp', 1, 158, 401, 402, 'ACP_VIEW_FORUM_MOD_PERMISSIONS', 'view_mod_local', 'acl_a_viewauth'); +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 (163, 1, 'permissions', 'acp', 1, 158, 403, 404, 'ACP_VIEW_FORUM_PERMISSIONS', 'view_forum_local', 'acl_a_viewauth'); +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 (165, 1, '', 'acp', 1, 48, 384, 393, 'ACP_PERMISSION_ROLES', '', ''); +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 (174, 1, '', 'acp', 1, 48, 368, 373, 'ACP_SPECIAL_PERMISSIONS', '', ''); +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 (175, 1, 'permission_roles', 'acp', 1, 165, 385, 386, 'ACP_ADMIN_ROLES', 'admin_roles', 'acl_a_roles'); +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 (176, 1, 'permissions', 'acp', 1, 48, 360, 361, 'ACP_PERMISSIONS', 'intro', 'acl_a_authusers || acl_a_authgroups || acl_a_viewauth'); +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 (177, 1, 'permission_roles', 'acp', 1, 165, 387, 388, 'ACP_USER_ROLES', 'user_roles', 'acl_a_roles'); +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 (178, 1, 'permission_roles', 'acp', 1, 165, 389, 390, 'ACP_MOD_ROLES', 'mod_roles', 'acl_a_roles'); +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 (179, 1, 'permission_roles', 'acp', 1, 165, 391, 392, 'ACP_FORUM_ROLES', 'forum_roles', 'acl_a_roles'); +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 (180, 1, '', 'acp', 1, 48, 374, 383, 'ACP_FORUM_BASED_PERMISSIONS', '', ''); +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 (181, 1, 'permissions', 'acp', 1, 54, 273, 274, 'ACP_FORUM_PERMISSIONS', 'setting_forum_local', 'acl_a_fauth && (acl_a_authusers || acl_a_authgroups)'); +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 (182, 1, 'permissions', 'acp', 1, 54, 275, 276, 'ACP_FORUM_MODERATORS', 'setting_mod_local', 'acl_a_mauth && (acl_a_authusers || acl_a_authgroups)'); +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 (183, 1, 'permissions', 'acp', 1, 54, 277, 278, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)'); +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 (184, 1, 'permissions', 'acp', 1, 54, 279, 280, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)'); +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 (185, 1, 'permissions', 'acp', 1, 57, 333, 334, 'ACP_USERS_PERMISSIONS', 'setting_user_global', 'acl_a_authusers && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'); +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 (186, 1, 'permissions', 'acp', 1, 58, 341, 342, 'ACP_GROUPS_PERMISSIONS', 'setting_group_global', 'acl_a_authgroups && (acl_a_aauth || acl_a_mauth || acl_a_uauth)'); +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 (187, 1, 'permissions', 'acp', 1, 58, 343, 344, 'ACP_GROUPS_FORUM_PERMISSIONS', 'setting_group_local', 'acl_a_authgroups && (acl_a_mauth || acl_a_fauth)'); +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 (188, 1, 'permissions', 'acp', 1, 57, 335, 336, 'ACP_USERS_FORUM_PERMISSIONS', 'setting_user_local', 'acl_a_authusers && (acl_a_mauth || acl_a_fauth)'); +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', ''); +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'); diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index 355ee9623d..d8ec345088 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -2,6 +2,7 @@ # SQLite Schema for phpBB 3.x - (c) phpBB Group, 2005 # # $Id$ +# @todo user_last_warning to users table and warnings table # BEGIN TRANSACTION; @@ -156,6 +157,7 @@ CREATE INDEX is_dynamic_phpbb_config on phpbb_config (is_dynamic); CREATE TABLE phpbb_confirm ( confirm_id char(32) NOT NULL DEFAULT '', session_id char(32) NOT NULL DEFAULT '', + confirm_type INTEGER NOT NULL DEFAULT '0', code char(8) NOT NULL DEFAULT '', PRIMARY KEY (session_id, confirm_id) ); @@ -429,7 +431,6 @@ CREATE TABLE phpbb_privmsgs ( icon_id tinyint(4) NOT NULL DEFAULT '1', author_ip varchar(40) NOT NULL DEFAULT '', message_time int(11) NOT NULL DEFAULT '0', - message_reported tinyint(1) NOT NULL DEFAULT '0', enable_bbcode tinyint(1) NOT NULL DEFAULT '1', enable_smilies tinyint(1) NOT NULL DEFAULT '1', enable_magic_url tinyint(1) NOT NULL DEFAULT '1', @@ -555,9 +556,9 @@ CREATE TABLE phpbb_ranks ( # Table: phpbb_reports_reasons CREATE TABLE phpbb_reports_reasons ( reason_id INTEGER PRIMARY KEY NOT NULL, - reason_priority tinyint(4) NOT NULL DEFAULT '0', - reason_name varchar(255) NOT NULL DEFAULT '', - reason_description text(65535) NOT NULL + reason_title varchar(255) NOT NULL DEFAULT '', + reason_description text(65535) NOT NULL, + reason_order tinyint(4) NOT NULL DEFAULT '0' ); # Table: phpbb_reports @@ -565,9 +566,9 @@ CREATE TABLE phpbb_reports ( report_id INTEGER PRIMARY KEY NOT NULL, reason_id smallint(5) NOT NULL DEFAULT '0', post_id mediumint(8) NOT NULL DEFAULT '0', - msg_id mediumint(8) NOT NULL DEFAULT '0', user_id mediumint(8) NOT NULL DEFAULT '0', user_notify tinyint(1) NOT NULL DEFAULT '0', + report_closed tinyint(1) NOT NULL DEFAULT '0', report_time int(10) NOT NULL DEFAULT '0', report_text text(65535) NOT NULL ); @@ -890,6 +891,7 @@ CREATE TABLE phpbb_users ( user_lastpage varchar(100) NOT NULL DEFAULT '', user_last_confirm_key varchar(10) NOT NULL DEFAULT '', user_warnings tinyint(4) NOT NULL DEFAULT '0', + user_login_attempts smallint(4) NOT NULL DEFAULT '0', user_posts mediumint(8) NOT NULL DEFAULT '0', user_lang varchar(30) NOT NULL DEFAULT '', user_timezone decimal(5,2) NOT NULL DEFAULT '0.0', diff --git a/phpBB/language/en/acp/board.php b/phpBB/language/en/acp/board.php index 2f16caa30d..04af72cc3e 100644 --- a/phpBB/language/en/acp/board.php +++ b/phpBB/language/en/acp/board.php @@ -74,7 +74,6 @@ $lang = array_merge($lang, array( 'ALLOW_BBCODE_PM' => 'Allow BBCode in private messages', 'ALLOW_SMILIES_PM' => 'Allow smilies in private messages', 'ALLOW_DOWNLOAD_PM' => 'Allow downloading of attachments in private messages', - 'ALLOW_REPORT_PM' => 'Allow reporting of private messages', 'ALLOW_FORWARD_PM' => 'Allow forwarding of private messages', 'ALLOW_PRINT_PM' => 'Allow print view in private messaging', 'ALLOW_EMAIL_PM' => 'Allow emailing private messages', diff --git a/phpBB/language/en/acp/common.php b/phpBB/language/en/acp/common.php index 32a7bed741..1b2f237da2 100644 --- a/phpBB/language/en/acp/common.php +++ b/phpBB/language/en/acp/common.php @@ -104,6 +104,7 @@ $lang = array_merge($lang, array( 'ACP_MANAGE_EXTENSIONS' => 'Manage Extensions', 'ACP_MANAGE_FORUMS' => 'Manage Forums', 'ACP_MANAGE_RANKS' => 'Manage Ranks', + 'ACP_MANAGE_REASONS' => 'Manage Report/Denial Reasons', 'ACP_MANAGE_USERS' => 'Manage Users', 'ACP_MASS_EMAIL' => 'Mass Email', 'ACP_MESSAGES' => 'Messages', @@ -124,6 +125,7 @@ $lang = array_merge($lang, array( 'ACP_PRUNING' => 'Pruning', 'ACP_RANKS' => 'Ranks', + 'ACP_REASONS' => 'Report/Denial Reasons', 'ACP_SERVER_CONFIGURATION' => 'Server Configuration', 'ACP_SERVER_SETTINGS' => 'Server Settings', @@ -458,6 +460,10 @@ $lang = array_merge($lang, array( 'LOG_PRUNE_USER_DEL_DEL' => '<b>Users pruned and posts deleted</b><br />» %s', 'LOG_PRUNE_USER_DEL_ANON' => '<b>Users pruned and posts retained</b><br />» %s', + 'LOG_REASON_ADDED' => '<b>Added report/denial reason</b><br />» %s', + 'LOG_REASON_REMOVED' => '<b>Removed report/denial reason</b><br />» %s', + 'LOG_REASON_UPDATED' => '<b>Updated report/denial reason</b><br />» %s', + 'LOG_RESET_DATE' => '<b>Board start date reset</b>', 'LOG_RESET_ONLINE' => '<b>Most users online reset</b>', 'LOG_RESYNC_POSTCOUNTS' => '<b>User postcounts synced</b>', diff --git a/phpBB/language/en/acp/permissions_phpbb.php b/phpBB/language/en/acp/permissions_phpbb.php index bbbb52d390..4a868535f6 100644 --- a/phpBB/language/en/acp/permissions_phpbb.php +++ b/phpBB/language/en/acp/permissions_phpbb.php @@ -96,7 +96,6 @@ $lang = array_merge($lang, array( 'acl_u_readpm' => array('lang' => 'Can read private messages', 'cat' => 'pm'), 'acl_u_pm_edit' => array('lang' => 'Can edit own private messages', 'cat' => 'pm'), 'acl_u_pm_delete' => array('lang' => 'Can remove private messages from own folder', 'cat' => 'pm'), - 'acl_u_pm_report' => array('lang' => 'Can report private messages', 'cat' => 'pm'), 'acl_u_pm_forward' => array('lang' => 'Can forward private messages', 'cat' => 'pm'), 'acl_u_pm_emailpm' => array('lang' => 'Can email private messages', 'cat' => 'pm'), 'acl_u_pm_printpm' => array('lang' => 'Can print private messages', 'cat' => 'pm'), @@ -215,6 +214,7 @@ $lang = array_merge($lang, array( 'acl_a_language' => array('lang' => 'Can manage language packs', 'cat' => 'misc'), 'acl_a_email' => array('lang' => 'Can send mass email', 'cat' => 'misc'), 'acl_a_bots' => array('lang' => 'Can manage bots', 'cat' => 'misc'), + 'acl_a_reasons' => array('lang' => 'Can manage report/denial reasons', 'cat' => 'misc'), # 'acl_a_backup' => array('lang' => 'Can backup database', 'cat' => 'misc'), # 'acl_a_restore' => array('lang' => 'Can restore database', 'cat' => 'misc'), # 'acl_a_search' => array('lang' => 'Can re-index search tables', 'cat' => 'misc'), diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 7d652df0ed..3d74524a15 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -200,4 +200,29 @@ $lang = array_merge($lang, array( 'NO_DISALLOWED' => 'No Disallowed Usernames', )); +// Reasons +$lang = array_merge($lang, array( + 'ACP_REASONS_EXPLAIN' => 'Here you can manage the reasons used in reports and denial messages when disapproving posts. There is one default reason (marked with a *) you are not able to remove, this reason is normally used for custom messages if no reason fits.', + + 'ADD_NEW_REASON' => 'Add new reason', + + 'IS_NOT_TRANSLATED' => 'Reason has not been localized', + 'IS_TRANSLATED' => 'Reason has been localized', + + 'NO_REASON' => 'Reason could not be found', + 'NO_REASON_INFO' => 'You have to specify a title and a description for this reason.', + + 'REASON_ADD' => 'Add report/denial reason', + 'REASON_ADDED' => 'Report/denial reason successfully added', + 'REASON_ALREADY_EXIST' => 'A reason with this title already exist, please enter another title for this reason.', + 'REASON_DESCRIPTION' => 'Reason Description', + 'REASON_EDIT' => 'Edit report/denial reason', + 'REASON_EDIT_EXPLAIN' => 'Here you are able to add or edit a reason. If the reason is translated the localized version is used instead of the description entered here.', + 'REASON_REMOVED' => 'Report/denial reason successfully removed', + 'REASON_TITLE' => 'Reason Title', + 'REASON_UPDATED' => 'Report/denial reason successfully updated', + + 'USED_IN_REPORTS' => 'Used in reports', +)); + ?>
\ No newline at end of file diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index efd2ff57e1..77985df498 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -91,6 +91,9 @@ $lang = array_merge($lang, array( 'CHANGE' => 'Change', 'CLICK_VIEW_PRIVMSG' => 'Click %sHere%s to visit your Inbox', 'CONFIRM' => 'Confirm', + 'CONFIRM_CODE' => 'Confirmation code', + 'CONFIRM_CODE_EXPLAIN' => 'Enter the code exactly as you see it in the image, it is case sensitive, zero has a diagonal line through it.', + 'CONFIRM_CODE_WRONG' => 'The confirmation code you entered was incorrect.', 'CONGRATULATIONS' => 'Congratulations to', 'CONNECTION_FAILED' => 'Connection failed', 'CONNECTION_SUCCESS' => 'Connection was successful!', @@ -226,7 +229,11 @@ $lang = array_merge($lang, array( 'LOCK_TOPIC' => 'Lock Topic', 'LOGIN' => 'Login', 'LOGIN_CHECK_PM' => 'Log in to check your private messages', - 'LOGIN_ERROR' => 'You have specified an incorrect username or password. Please check them both and try again. If you continue to have problems please contact a board administrator.', + 'LOGIN_CONFIRMATION' => 'Confirmation of login', + 'LOGIN_CONFIRM_EXPLAIN' => 'To prevent brute forcing accounts the board administrator requires you to enter a confirmation code after a maximum amount of failed logins. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', + 'LOGIN_ERROR_ATTEMPTS' => 'You exceeded the maximum allowed number of login attempts. In addition to your username and password you now have to additionally confirm the image you see below.', + 'LOGIN_ERROR_PASSWORD' => 'You have specified an incorrect password. Please check your password and try again. If you continue to have problems please contact a board administrator.', + 'LOGIN_ERROR_USERNAME' => 'You have specified an incorrect username. Please check your username and try again. If you continue to have problems please contact a board administrator.', 'LOGIN_FORUM' => 'To view or post in this forum you must enter a password.', 'LOGIN_INFO' => 'In order to login you must be registered. Registering takes only a few seconds but gives you increased capabilies. The board administrator may also grant additional permissions to registered users. Before you login please ensure you are familiar with our terms of use and related policies. Please ensure you read any forum rules as you navigate around the board.', 'LOGIN_VIEWFORUM' => 'The board administrator requires you to be registered and logged in to view this forum.', diff --git a/phpBB/language/en/email/new_report_pm.txt b/phpBB/language/en/email/new_report_pm.txt deleted file mode 100644 index 990d2f4efa..0000000000 --- a/phpBB/language/en/email/new_report_pm.txt +++ /dev/null @@ -1,17 +0,0 @@ -Subject: PM Report submitted - {SUBJECT} -Charset: iso-8859-1 - -Hello {USERNAME}, - -You are receiving this email because the private message "{SUBJECT}" at {SITENAME} was reported by "{REPORTER}". -The private message has been put into your inbox for further handling. - -Report Reason: {REPORT_REASON} - -{REPORT_TEXT} - -If you want to view the message and the report, click the following link: -{U_VIEW_REPORT} - - -{EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/email/new_report_post.txt b/phpBB/language/en/email/new_report_post.txt deleted file mode 100644 index 6ff183b68e..0000000000 --- a/phpBB/language/en/email/new_report_post.txt +++ /dev/null @@ -1,19 +0,0 @@ -Subject: Report submitted - {SUBJECT} -Charset: iso-8859-1 - -Hello {USERNAME}, - -You are receiving this email because the post "{SUBJECT}" at {SITENAME} was reported by "{REPORTER}". - -Report Reason: {REPORT_REASON} - -{REPORT_TEXT} - -If you want to view the report, click the following link: -{U_VIEW_REPORT} - -If you want to view the reported post click the following link: -{U_VIEW_POST} - - -{EMAIL_SIG}
\ No newline at end of file diff --git a/phpBB/language/en/mcp.php b/phpBB/language/en/mcp.php index 67494070e7..d9a17511a2 100644 --- a/phpBB/language/en/mcp.php +++ b/phpBB/language/en/mcp.php @@ -83,6 +83,8 @@ $lang = array_merge($lang, array( 'IP_INFO' => 'IP Information', + 'JUMP_TO' => 'Moderate Forum', // Overwriting the jump to language variable for the mcp jumpbox + 'LATEST_LOGS' => 'Latest 5 logged actions', 'LATEST_REPORTED' => 'Latest 5 reports', 'LATEST_UNAPPROVED' => 'Latest 5 posts awaiting for approval', @@ -175,7 +177,6 @@ $lang = array_merge($lang, array( 'MERGE_POSTS_CONFIRM' => 'Are you sure you want to merge the selected posts?', 'MERGE_TOPIC_EXPLAIN' => 'Using the form below you can merge selected posts into another topic. These posts will not be reordered and will appear as if the users posted them to the new topic.<br />Please enter the destination topic id or click on the "Select" button to search for one', 'MERGE_TOPIC_ID' => 'Destination topic id', - 'MESSAGE_REPORTED_SUCCESS' => 'This message has been successfully reported', 'MOD_OPTIONS' => 'Moderator Options', 'MORE_INFO' => 'Further information', 'MOVE_TOPIC_CONFIRM' => 'Are you sure you want to move the topic into a new forum?', @@ -219,6 +220,7 @@ $lang = array_merge($lang, array( 'READ_USERNOTES' => 'User notes', 'READ_WARNINGS' => 'User warnings', 'REPORTER' => 'Reporter', + 'REPORT_ALREADY_DEALT_WITH' => 'This post has already been reported previously and successfully dealt with', 'REPORT_TIME' => 'Report time', 'REPORTS_TOTAL' => 'In total there are <b>%d</b> reports to review', 'REPORTS_ZERO_TOTAL' => 'There are no reports to review', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index bab24a78a6..3071a236dc 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -80,9 +80,6 @@ $lang = array_merge($lang, array( 'CHANGE_PASSWORD_EXPLAIN' => 'Must be between %1$d and %2$d characters.', 'CLICK_RETURN_FOLDER' => 'Click %1$sHere%2$s to return to your "%3$s" Folder', 'CONFIRMATION' => 'Confirmation of registration', - 'CONFIRM_CODE' => 'Confirmation code', - 'CONFIRM_CODE_EXPLAIN' => 'Enter the code exactly as you see it in the image, it is case sensitive, zero has a diagonal line through it.', - 'CONFIRM_CODE_WRONG' => 'The confirmation code you entered was incorrect.', 'CONFIRM_EMAIL' => 'Confirm email address', 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your email address.', 'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board administrator requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', @@ -198,8 +195,6 @@ $lang = array_merge($lang, array( 'MESSAGE_DELETED' => 'Message successfully deleted', 'MESSAGE_HISTORY' => 'Message History', 'MESSAGE_REMOVED_FROM_OUTBOX' => 'This message has been removed by it\'s author before it was delivered', - 'MESSAGE_REPORTED' => 'Click to view reports', - 'MESSAGE_REPORTED_MESSAGE' => 'Reported Message', 'MESSAGE_STORED' => 'The message has been send successfully', 'MESSAGES_DELETED' => 'Messages successfully deleted', 'MOVE_DELETED_MESSAGES_TO' => 'Move messages from removed folder to', @@ -291,9 +286,6 @@ $lang = array_merge($lang, array( 'RENAME' => 'Rename', 'RENAME_FOLDER' => 'Rename folder', 'REPLIED_MESSAGE' => 'Replied to Message', - 'REPORT_PM' => 'Report PM', - 'REPORT_PM_NOTIFY' => 'Send report notifications as PM', - 'REPORT_PM_NOTIFY_EXPLAIN' => 'If enabled, notifications and status updates to new reports get send as PM instead of emailing them.', 'RETURN_FOLDER' => 'Click %1$sHere%2$s to return to folder', 'RETURN_UCP' => 'Click %sHere%s to return to the User Control Panel', 'RULE_ADDED' => 'Rule successfully added', diff --git a/phpBB/mcp.php b/phpBB/mcp.php index d9ee045d0b..bf7dc54eb3 100644 --- a/phpBB/mcp.php +++ b/phpBB/mcp.php @@ -453,7 +453,7 @@ function mcp_sorting($mode, &$sort_days, &$sort_key, &$sort_dir, &$sort_by_sql, case 'reports': $limit_days = array(0 => $user->lang['ALL_REPORTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 364 => $user->lang['1_YEAR']); $sort_by_text = array('p' => $user->lang['REPORT_PRIORITY'], 'r' => $user->lang['REPORTER'], 't' => $user->lang['REPORT_TIME']); - $sort_by_sql = array('p' => 'rr.reason_priority', 'r' => 'u.username', 't' => 'r.report_time'); + $sort_by_sql = array('p' => 'rr.reason_order', 'r' => 'u.username', 't' => 'r.report_time'); break; case 'logs': diff --git a/phpBB/report.php b/phpBB/report.php index 850c6158e1..9906cea7eb 100644 --- a/phpBB/report.php +++ b/phpBB/report.php @@ -21,19 +21,17 @@ $user->session_begin(); $auth->acl($user->data); $user->setup('mcp'); -// Report PM or Post? -$id = request_var('p', request_var('pm', 0)); -$report_post = (request_var('p', 0)) ? true : false; +$post_id = request_var('p', 0); $reason_id = request_var('reason_id', 0); -$user_notify = (!empty($_REQUEST['notify']) && $user->data['is_registered']) ? true : false; $report_text = request_var('report_text', ''); +$user_notify = (isset($_POST['notify']) && $user->data['is_registered']) ? true : false; -if (!$id) +if (!$post_id) { trigger_error('INVALID_MODE'); } -$redirect_url = ($report_post) ? "{$phpbb_root_path}viewtopic.$phpEx$SID&p=$id#p$id" : "{$phpbb_root_path}ucp.$phpEx$SID&i=pm&p=$id"; +$redirect_url = "viewtopic.$phpEx$SID&p=$post_id#p$post_id"; // Has the report been cancelled? if (isset($_POST['cancel'])) @@ -42,272 +40,116 @@ if (isset($_POST['cancel'])) } // Grab all relevant data -if ($report_post) -{ - $sql = 'SELECT f.*, t.*, p.* - FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f - WHERE p.post_id = $id - AND p.topic_id = t.topic_id - AND p.forum_id = f.forum_id"; -} -else -{ - // Only the user itself is able to report his Private Messages - $sql = 'SELECT p.*, t.* - FROM ' . PRIVMSGS_TABLE . ' p, ' . PRIVMSGS_TO_TABLE . " t - WHERE t.msg_id = $id - AND t.user_id = " . $user->data['user_id'] . ' - AND t.msg_id = p.msg_id'; -} +$sql = 'SELECT f.*, t.*, p.* + FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f + WHERE p.post_id = $post_id + AND p.topic_id = t.topic_id + AND p.forum_id = f.forum_id"; $result = $db->sql_query($sql); +$report_data = $db->sql_fetchrow($result); +$db->sql_freeresult($result); -if (!($report_data = $db->sql_fetchrow($result))) +if (!$report_data) { - $message = ($report_post) ? $user->lang['POST_NOT_EXIST'] : $user->lang['PM_NOT_EXIST']; - trigger_error($message); + trigger_error('POST_NOT_EXIST'); } -if ($report_post) -{ - $forum_id = $report_data['forum_id']; - $topic_id = $report_data['topic_id']; +$forum_id = $report_data['forum_id']; +$topic_id = $report_data['topic_id']; - // Check required permissions - $acl_check_ary = array('f_list' => 'POST_NOT_EXIST', 'f_read' => 'USER_CANNOT_READ', 'f_report' => 'USER_CANNOT_REPORT'); - - foreach ($acl_check_ary as $acl => $error) - { - if (!$auth->acl_get($acl, $forum_id)) - { - trigger_error($error); - } - } - unset($acl_check_ary); -} -else +// Check required permissions +$acl_check_ary = array('f_list' => 'POST_NOT_EXIST', 'f_read' => 'USER_CANNOT_READ', 'f_report' => 'USER_CANNOT_REPORT'); + +foreach ($acl_check_ary as $acl => $error) { - if (!$config['auth_report_pm'] || !$auth->acl_get('u_pm_report')) + if (!$auth->acl_get($acl, $forum_id)) { - trigger_error('USER_CANNOT_REPORT'); + trigger_error($error); } } +unset($acl_check_ary); -// Check if the post has already been reported by this user -$sql = 'SELECT * - FROM ' . REPORTS_TABLE . ' - WHERE ' . (($report_post) ? "post_id = $id" : "msg_id = $id") . ' - AND user_id = ' . $user->data['user_id']; +// Check if the post has already been reported... +$sql = 'SELECT report_id, report_closed + FROM ' . REPORTS_TABLE . " + WHERE post_id = $post_id"; $result = $db->sql_query($sql); +$row = $db->sql_fetchrow($result); +$db->sql_freeresult($result); -if ($row = $db->sql_fetchrow($result)) +if ($row) { - if ($user->data['is_registered']) - { - // A report exists, extract $row if we're going to display the form - if ($reason_id) - { - $report_id = (int) $row['report_id']; - } - else - { - // Overwrite set variables - extract($row); - } - } - else - { - trigger_error($user->lang['ALREADY_REPORTED'] . '<br /><br />' . sprintf($user->lang[(($report_post) ? 'RETURN_TOPIC' : 'RETURN_MESSAGE')], '<a href="' . $redirect_url . '">', '</a>')); - } -} -else -{ - $report_id = 0; + $message = ($row['report_closed']) ? $user->lang['REPORT_ALREADY_DEALT_WITH'] : $user->lang['ALREADY_REPORTED']; + $message .= '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $phpbb_root_path . $redirect_url . '">', '</a>'); + trigger_error($message); } -// Has the report been confirmed? +// Submit report? if (isset($_POST['submit']) && $reason_id) { - $sql = 'SELECT reason_name + $sql = 'SELECT * FROM ' . REASONS_TABLE . " WHERE reason_id = $reason_id"; $result = $db->sql_query($sql); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); - if (!($row = $db->sql_fetchrow($result)) || (!$report_text && $row['reason_name'] == 'other')) + if (!$row || (!$report_text && $row['reason_title'] == 'other')) { trigger_error('EMPTY_REPORT'); } - $db->sql_freeresult($result); - - $reason_desc = (!empty($user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']])) ? $user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']] : $row['reason_name']; $sql_ary = array( 'reason_id' => (int) $reason_id, - 'post_id' => ($report_post) ? $id : 0, - 'msg_id' => ($report_post) ? 0 : $id, + 'post_id' => $post_id, 'user_id' => (int) $user->data['user_id'], 'user_notify' => (int) $user_notify, + 'report_closed' => 0, 'report_time' => (int) time(), 'report_text' => (string) $report_text ); - if ($report_id) - { - $sql = 'UPDATE ' . REPORTS_TABLE . ' - SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' - WHERE report_id = ' . $report_id; - $db->sql_query($sql); - } - else - { - $sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . - $db->sql_build_array('INSERT', $sql_ary); - $db->sql_query($sql); - $report_id = $db->sql_nextid(); - } + $sql = 'INSERT INTO ' . REPORTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary); + $db->sql_query($sql); + $report_id = $db->sql_nextid(); - if ($report_post) + if (!$report_data['post_reported']) { - if (!$report_data['post_reported']) - { - $sql = 'UPDATE ' . POSTS_TABLE . ' - SET post_reported = 1 - WHERE post_id = ' . $id; - $db->sql_query($sql); - } - - if (!$report_data['topic_reported']) - { - $sql = 'UPDATE ' . TOPICS_TABLE . ' - SET topic_reported = 1 - WHERE topic_id = ' . $report_data['topic_id']; - $db->sql_query($sql); - } - } - else - { - if (!$report_data['message_reported']) - { - $sql = 'UPDATE ' . PRIVMSGS_TABLE . " - SET message_reported = 1 - WHERE msg_id = $id"; - $db->sql_query($sql); - } - } - - // Send Notifications - // PM: Reported Post is put into all admin's boxes (not notifying about 'this' PM) - // All persons get notified about a new report, if notified by PM, send out email notifications too - - // Send notifications to moderators - $acl_list = ($report_post) ? $auth->acl_get_list(false, array('m_', 'a_'), array(0, $report_data['forum_id'])) : $auth->acl_get_list(false, 'a_', 0); - $notify_user = ($report_post) ? $acl_list[$report_data['forum_id']]['m_'] : array(); - $notify_user = array_unique(array_merge($notify_user, $acl_list[0]['a_'])); - unset($acl_list); - - // Send reported PM to responsible persons (admins) - if (!$report_post) - { - foreach ($notify_user as $user_id) - { - $db->sql_query('INSERT INTO ' . PRIVMSGS_TO_TABLE . ' ' . $db->sql_build_array('INSERT', array( - 'msg_id' => (int) $id, - 'user_id' => (int) $user_id, - 'author_id' => (int) $report_data['author_id'], - 'folder_id' => PRIVMSGS_NO_BOX, - 'new' => 1, - 'unread' => 1, - 'forwarded' => 0)) - ); - } - - // Update Status - $sql = 'UPDATE ' . USERS_TABLE . ' - SET user_new_privmsg = user_new_privmsg + 1, user_unread_privmsg = user_unread_privmsg + 1 - WHERE user_id IN (' . implode(', ', $notify_user) . ')'; + $sql = 'UPDATE ' . POSTS_TABLE . ' + SET post_reported = 1 + WHERE post_id = ' . $post_id; $db->sql_query($sql); } - // How to notify them? - $sql = 'SELECT user_id, username, user_options, user_lang, user_email, user_notify_type, user_jabber - FROM ' . USERS_TABLE . ' - WHERE user_id IN (' . implode(', ', $notify_user) . ')'; - $result = $db->sql_query($sql); - - $notify_user = array(); - while ($row = $db->sql_fetchrow($result)) + if (!$report_data['topic_reported']) { - $notify_user[$row['user_id']] = array( - 'name' => $row['username'], - 'email' => $row['user_email'], - 'jabber'=> $row['user_jabber'], - 'lang' => $row['user_lang'], - 'notify_type' => $row['user_notify_type'], - - 'pm' => $user->optionget('report_pm_notify', $row['user_options']) - ); + $sql = 'UPDATE ' . TOPICS_TABLE . ' + SET topic_reported = 1 + WHERE topic_id = ' . $report_data['topic_id']; + $db->sql_query($sql); } - $db->sql_freeresult($result); - - $report_data = array( - 'id' => $id, - 'report_id' => $report_id, - 'reporter' => $user->data['username'], - 'reason' => $reason_desc, - 'text' => $report_text, - 'subject' => ($report_post) ? $report_data['post_subject'] : $report_data['message_subject'], - 'view_post' => ($report_post) ? "viewtopic.$phpEx?f={$report_data['forum_id']}&t={$report_data['topic_id']}&p=$id&e=$id" : '' - ); - - report_notification($notify_user, $report_post, $report_data); meta_refresh(3, $redirect_url); - $message = $user->lang[(($report_post) ? 'POST' : 'MESSAGE') . '_REPORTED_SUCCESS'] . '<br /><br />' . sprintf($user->lang[(($report_post) ? 'RETURN_TOPIC' : 'RETURN_MESSAGE')], '<a href="' . $redirect_url . '">', '</a>'); + $message = $user->lang['POST_REPORTED_SUCCESS'] . '<br /><br />' . sprintf($user->lang['RETURN_TOPIC'], '<a href="' . $phpbb_root_path . $redirect_url . '">', '</a>'); trigger_error($message); } - -// Generate the form -$sql = 'SELECT * - FROM ' . REASONS_TABLE . ' - ORDER BY reason_priority ASC'; -$result = $db->sql_query($sql); - -while ($row = $db->sql_fetchrow($result)) -{ - $row['reason_name'] = strtoupper($row['reason_name']); - - $reason_title = (!empty($user->lang['report_reasons']['TITLE'][$row['reason_name']])) ? $user->lang['report_reasons']['TITLE'][$row['reason_name']] : ucwords(str_replace('_', ' ', $row['reason_name'])); - - $reason_desc = (!empty($user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']])) ? $user->lang['report_reasons']['DESCRIPTION'][$row['reason_name']] : $row['reason_description']; - - $template->assign_block_vars('reason', array( - 'ID' => $row['reason_id'], - 'NAME' => htmlspecialchars($reason_title), - 'DESCRIPTION' => htmlspecialchars($reason_desc), - 'S_SELECTED' => ($row['reason_id'] == $reason_id) ? true : false) - ); -} - -$u_report = ($report_post) ? "p=$id" : "pm=$id"; +// Generate the reasons +display_reasons($reason_id); $template->assign_vars(array( 'REPORT_TEXT' => $report_text, - 'S_REPORT_ACTION' => "{$phpbb_root_path}report.$phpEx$SID&$u_report" . (($report_id) ? "&report_id=$report_id" : ''), + 'S_REPORT_ACTION' => "{$phpbb_root_path}report.$phpEx$SID&p=$post_id", - 'S_NOTIFY' => (!empty($user_notify)) ? true : false, - 'S_CAN_NOTIFY' => ($user->data['is_registered']) ? true : false, - 'S_REPORT_POST' => $report_post) + 'S_NOTIFY' => $user_notify, + 'S_CAN_NOTIFY' => ($user->data['is_registered']) ? true : false) ); -if ($report_post) -{ - generate_forum_nav($report_data); -} +generate_forum_nav($report_data); // Start output of page -$page_title = ($report_post) ? $user->lang['REPORT_POST'] : $user->lang['REPORT_MESSAGE']; -page_header($page_title); +page_header($user->lang['REPORT_POST']); $template->set_filenames(array( 'body' => 'report_body.html') @@ -315,91 +157,4 @@ $template->set_filenames(array( page_footer(); -function report_notification($notify_user, $report_post, $report_data) -{ - global $config, $phpbb_root_path, $phpEx; - - include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); - include_once($phpbb_root_path . 'includes/functions_privmsgs.' . $phpEx); - $messenger = new messenger(); - - $email_sig = str_replace('<br />', "\n", "-- \n" . $config['board_email_sig']); - $email_template = ($report_post) ? 'new_report_post' : 'new_report_pm'; - $view_report_url = ($report_post) ? "mcp.$phpEx?i=queue&r=" . $report_data['report_id'] : "ucp.$phpEx?i=pm&p=" . $report_data['id'] . "&r=" . $report_data['report_id']; - - foreach ($notify_user as $user_id => $notify_row) - { - // Send notification by email - if (!$notify_row['pm']) - { - $messenger->to($notify_row['email'], $notify_row['name']); - $messenger->im($notify_row['jabber'], $notify_row['name']); - $messenger->replyto($config['board_email']); - - $messenger->template($email_template, $notify_row['lang']); - - $messenger->assign_vars(array( - 'EMAIL_SIG' => $email_sig, - 'SITENAME' => $config['sitename'], - 'USERNAME' => $notify_row['name'], - 'SUBJECT' => $report_data['subject'], - 'REPORTER' => $report_data['reporter'], - - 'REPORT_REASON' => $report_data['reason'], - 'REPORT_TEXT' => $report_data['text'], - - 'U_VIEW_REPORT' => generate_board_url() . '/' . $view_report_url, - 'U_VIEW_POST' => generate_board_url() . '/' . $report_data['view_post']) - ); - - $messenger->send($notify_row['notify_type']); - $messenger->reset(); - - $messenger->save_queue(); - } - else - { - // Use messenger for getting the correct message, we use the email template - $messenger->template($email_template, $notify_row['lang']); - - $messenger->assign_vars(array( - 'EMAIL_SIG' => $email_sig, - 'SITENAME' => $config['sitename'], - 'USERNAME' => $notify_row['name'], - 'SUBJECT' => $report_data['subject'], - 'REPORTER' => $report_data['reporter'], - - 'REPORT_REASON' => $report_data['reason'], - 'REPORT_TEXT' => $report_data['text'], - - 'U_VIEW_REPORT' => generate_board_url() . '/' . $view_report_url) - ); - - // break the sending process... - $messenger->send(false, true); - $messenger->reset(); - - // do not put in reporters outbox - submit_pm('post', $report_data['subject'], '', array(), array(), array( - 'address_list' => array('u' => array($user_id => 'to')), - 'from_user_id' => $user->data['user_id'], - 'from_user_ip' => $user->ip, - 'from_username' => $user->data['username'], - 'icon_id' => 0, - 'enable_bbcode' => 0, - 'enable_smilies' => 0, - 'enable_magic_url' => 1, - 'enable_sig' => 0, - 'message_md5' => md5($messenger->msg), - 'bbcode_bitfield' => 0, - 'bbcode_uid' => 0, - 'attachment_data' => array(), - 'filename_data' => array(), - 'message' => $messenger->msg - ), true, false); - } - } - unset($messenger); -} - ?>
\ No newline at end of file diff --git a/phpBB/styles/subSilver/template/index_body.html b/phpBB/styles/subSilver/template/index_body.html index 2773e7d2ab..6754e7c785 100644 --- a/phpBB/styles/subSilver/template/index_body.html +++ b/phpBB/styles/subSilver/template/index_body.html @@ -2,6 +2,14 @@ <!-- $Id$ --> + <!-- IF U_MCP --> + <div id="pageheader"> + <p class="linkmcp">[ <a href="{U_MCP}">{L_MCP}</a> ]</p> + </div> + + <br clear="all" /><br /> + <!-- ENDIF --> + <table class="tablebg" cellspacing="1" width="100%"> <tr> <td class="cat" colspan="5" align="right"><a class="nav" href="{U_MARK_FORUMS}">{L_MARK_FORUMS_READ}</a> </td> diff --git a/phpBB/styles/subSilver/template/login_body.html b/phpBB/styles/subSilver/template/login_body.html index 9621aa0464..5d5e14663f 100644 --- a/phpBB/styles/subSilver/template/login_body.html +++ b/phpBB/styles/subSilver/template/login_body.html @@ -20,7 +20,6 @@ <p class="genmed" align="center"><a href="{U_TERMS_USE}">{L_TERMS_USE}</a> | <a href="{U_PRIVACY}">{L_PRIVACY}</a></p> </td> <td class="row2"><table cellspacing="1" cellpadding="4"> - <!-- IF LOGIN_ERROR --> <tr> <td class="gensmall" colspan="2" align="center"><span class="error">{LOGIN_ERROR}</span></td> @@ -51,6 +50,24 @@ <!-- ENDIF --> </table></td> </tr> + <!-- IF S_CONFIRM_CODE --> + <tr> + <th colspan="2" height="28" valign="middle">{L_LOGIN_CONFIRMATION}</th> + </tr> + <tr> + <td class="row3" colspan="2"><span class="gensmall">{L_LOGIN_CONFIRM_EXPLAIN}</span></td> + </tr> + <tr> + <td class="row1" colspan="2" align="center"> + <input type="hidden" name="confirm_id" value="{CONFIRM_ID}" /> + {CONFIRM_IMAGE} + </td> + </tr> + <tr> + <td class="row1"><b class="genmed">{L_CONFIRM_CODE}: </b><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td> + <td class="row2"><input class="post" type="text" name="confirm_code" size="8" maxlength="8" /></td> + </tr> + <!-- ENDIF --> <tr> <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="login" class="btnmain" value="{L_LOGIN}" tabindex="3" /></td> </tr> diff --git a/phpBB/styles/subSilver/template/report_body.html b/phpBB/styles/subSilver/template/report_body.html index dac3fdc28c..8e192cc3b4 100644 --- a/phpBB/styles/subSilver/template/report_body.html +++ b/phpBB/styles/subSilver/template/report_body.html @@ -2,27 +2,30 @@ <!-- $Id$ --> -<form method="post" action="{S_REPORT_ACTION}" name="report"> +<form method="post" id="report" action="{S_REPORT_ACTION}"> + <table class="tablebg" width="100%" cellspacing="1"> <tr> - <th colspan="2"><!-- IF S_REPORT_POST -->{L_REPORT_POST}<!-- ELSE -->{L_REPORT_MESSAGE}<!-- ENDIF --></th> + <th colspan="2">{L_REPORT_POST}</th> </tr> <tr> - <td class="row3" colspan="2"><span class="gensmall"><!-- IF S_REPORT_POST -->{L_REPORT_POST_EXPLAIN}<!-- ELSE -->{L_REPORT_MESSAGE_EXPLAIN}<!-- ENDIF --></span></td> + <td class="row3" colspan="2"><span class="gensmall">{L_REPORT_POST_EXPLAIN}</span></td> </tr> <tr> <td class="row1" width="22%"><b class="gen">{L_REASON}:</b></td> - <td class="row2" width="78%"><select name="reason_id"><!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason --></select></td> + <td class="row2" width="78%"><select name="reason_id"> + <!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.TITLE} » {reason.DESCRIPTION}</option><!-- END reason --> + </select></td> </tr> <!-- IF S_CAN_NOTIFY --> <tr> <td class="row1"><span class="gen"><b>{L_REPORT_NOTIFY}:</b></span><br /><span class="gensmall">{L_REPORT_NOTIFY_EXPLAIN}</span></td> - <td class="row2"><span class="gen"><input type="radio" name="notify" value="1" <!-- IF S_NOTIFY -->checked="checked" <!-- ENDIF -->/>{L_YES} <input type="radio" name="notify" value="0" <!-- IF not S_NOTIFY -->checked="checked" <!-- ENDIF -->/>{L_NO}</span></td> + <td class="row2"><span class="gen"><input type="radio" name="notify" value="1"<!-- IF S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_YES} <input type="radio" name="notify" value="0"<!-- IF not S_NOTIFY --> checked="checked"<!-- ENDIF --> /> {L_NO}</span></td> </tr> <!-- ENDIF --> <tr> <td class="row1" valign="top"><span class="gen"><b>{L_MORE_INFO}:</b></span><br /><span class="gensmall">{L_CAN_LEAVE_BLANK}</span></td> - <td class="row2"><textarea class="post" style="width:500px" name="report_text" rows="25" cols="40" class="post">{REPORT_TEXT}</textarea></td> + <td class="row2"><textarea class="post" style="width: 95%" name="report_text" rows="25" cols="40" class="post">{REPORT_TEXT}</textarea></td> </tr> <tr> <td class="cat" colspan="2" align="center"><input type="submit" name="submit" class="btnmain" value="{L_SUBMIT}" /> <input type="submit" name="cancel" class="btnlite" value="{L_CANCEL}"></td> diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html b/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html index e9839d3f84..b2e6468f5b 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html +++ b/phpBB/styles/subSilver/template/ucp_pm_viewfolder.html @@ -60,9 +60,6 @@ <td class="row1" width="25" align="center">{messagerow.PM_ICON_IMG}</td> <!-- ENDIF --> <!-- IF messagerow.S_PM_DELETED --><td class="row3"><!-- ELSE --><td class="row1"><!-- ENDIF --> - <!-- IF messagerow.S_PM_REPORTED --> - <a href="{messagerow.U_MCP_REPORT}">{REPORTED_IMG}</a> - <!-- ENDIF --> <!-- IF not messagerow.PM_IMG and messagerow.PM_CLASS --> <span class="{messagerow.PM_CLASS}"><img src="images/spacer.gif" width="10" height="10" alt="" border="0" /></span> <!-- ELSEIF messagerow.PM_IMG --> diff --git a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html index 4f175ac0ff..0e3cd78e4f 100644 --- a/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html +++ b/phpBB/styles/subSilver/template/ucp_pm_viewmessage.html @@ -64,16 +64,6 @@ <tr> <td> - <!-- IF S_MESSAGE_REPORTED --> - <table width="100%" cellspacing="0"> - <tr> - <td class="gensmall"><b class="postreported">» <a class="postreported" href="{U_MCP_REPORT}">{L_MESSAGE_REPORTED}</a></b></td> - </tr> - </table> - - <br clear="all" /> - <!-- ENDIF --> - <div class="postbody">{MESSAGE}</div> <!-- IF S_HAS_ATTACHMENTS --> @@ -105,7 +95,7 @@ <table width="100%" cellspacing="0"> <tr valign="middle"> - <td class="gensmall" align="right"><!-- IF U_REPORT --><a href="{U_REPORT}">{REPORT_IMG}</a> <!-- ENDIF --> <!-- IF U_INFO --><a href="{U_INFO}">{INFO_IMG}</a> <!-- ENDIF --> <!-- IF U_DELETE --><a href="{U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF --></td> + <td class="gensmall" align="right"> <!-- IF U_INFO --><a href="{U_INFO}">{INFO_IMG}</a> <!-- ENDIF --> <!-- IF U_DELETE --><a href="{U_DELETE}">{DELETE_IMG}</a> <!-- ENDIF --></td> </tr> </table> diff --git a/phpBB/styles/subSilver/template/ucp_prefs_personal.html b/phpBB/styles/subSilver/template/ucp_prefs_personal.html index b364b990c4..670ddc8a15 100644 --- a/phpBB/styles/subSilver/template/ucp_prefs_personal.html +++ b/phpBB/styles/subSilver/template/ucp_prefs_personal.html @@ -56,10 +56,6 @@ function dE(n,s){ <td class="row2"><input type="radio" name="popuppm" value="1"{POPUP_PM_YES} /><span class="genmed">{L_YES}</span> <input type="radio" name="popuppm" value="0"{POPUP_PM_NO} /><span class="genmed">{L_NO}</span></td> </tr> <tr> - <td class="row1" width="50%"><b class="genmed">{L_REPORT_PM_NOTIFY}:</b><br /><span class="gensmall">{L_REPORT_PM_NOTIFY_EXPLAIN}</span></td> - <td class="row2"><input type="radio" name="report_pm_notify" value="1"{REPORT_PM_YES} /><span class="genmed">{L_YES}</span> <input type="radio" name="report_pm_notify" value="0"{REPORT_PM_NO} /><span class="genmed">{L_NO}</span></td> - </tr> - <tr> <td class="row1" width="50%"><b class="genmed">{L_BOARD_LANGUAGE}:</b></td> <td class="row2"><select name="lang">{S_LANG_OPTIONS}</select></td> </tr> diff --git a/phpBB/styles/subSilver/template/ucp_reports_list.html b/phpBB/styles/subSilver/template/ucp_reports_list.html deleted file mode 100755 index cbb8b23852..0000000000 --- a/phpBB/styles/subSilver/template/ucp_reports_list.html +++ /dev/null @@ -1,32 +0,0 @@ -<!-- INCLUDE ucp_header.html --> - - <!-- $Id$ --> - <table class="tablebg" width="100%" cellspacing="1"> - <tr> - <td class="row3" colspan="6" align="center"><b class="gen">{L_YOUR_REPORTS}</b></td> - </tr> - <tr> - <th> {L_USER} </th> - <th> {L_TOPIC} </th> - <th> {L_FORUM} </th> - <th> {L_DATE} </th> - <th> {L_STATUS} </th> - </tr> - <!-- BEGIN report --> - <tr> - <td class="row1" width="15%" valign="top"><a class="gen" href="{report.U_VIEWPROFILE}">{report.POSTER}</a></span></td> - <td class="row2" width="15%" valign="top"><a class="gen" href="{report.U_TOPIC}">{report.TOPIC_TITLE}</a></td> - <td class="row1" width="15%" valign="top"><span class="gen"><a href="{report.U_USER}"><a href="{report.U_FORUM}">{report.FORUM_NAME}</a></span></td> - <td class="row2" width="15%" valign="top"><span class="gen">{report.REPORT_TIME}</span></td> - <td class="row1" width="15%" valign="top"><span class="gen">{report.REPORT_STATUS}</span></td> - </tr> - <!-- BEGINELSE --> - <tr> - <td class="row1" colspan="5" align="center"><span class="gen">{L_REPORTS_ZERO_TOTAL}</span></td> - </tr> - <!-- END report --> - </table> - - <br clear="all" /><br /> - -<!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/subSilver/template/ucp_reports_report.html b/phpBB/styles/subSilver/template/ucp_reports_report.html deleted file mode 100755 index beb5bed551..0000000000 --- a/phpBB/styles/subSilver/template/ucp_reports_report.html +++ /dev/null @@ -1,34 +0,0 @@ -<!-- INCLUDE ucp_header.html --> - -<!-- $Id$ --> - -<form method="post" action="{S_REPORT_ACTION}" name="report"> - <table class="tablebg" width="100%" cellspacing="1"> - <tr> - <th colspan="2"><!-- IF S_REPORT_POST -->{L_REPORT_POST}<!-- ELSE -->{L_REPORT_GENERAL}<!-- ENDIF --></th> - </tr> - <tr> - <td class="row3" colspan="2"><span class="gensmall"><!-- IF S_REPORT_POST -->{L_REPORT_POST_EXPLAIN}<!-- ELSE -->{L_REPORT_GENERAL_EXPLAIN}<!-- ENDIF --></span></td> - </tr> - <tr> - <td class="row1" width="22%"><b class="gen">{L_REASON}:</b></td> - <td class="row2" width="78%"><select name="reason_id"><!-- BEGIN reason --><option value="{reason.ID}"<!-- IF reason.S_SELECTED --> selected="selected"<!-- ENDIF -->>{reason.DESCRIPTION}</option><!-- END reason --></select></td> - </tr> - <!-- IF S_CAN_NOTIFY --> - <tr> - <td class="row1"><span class="gen"><b>{L_REPORT_NOTIFY}:</b></span><br /><span class="gensmall">{L_REPORT_NOTIFY_EXPLAIN}</span></td> - <td class="row2"><span class="gen"><input type="radio" name="notify" value="1" <!-- IF S_NOTIFY -->checked="checked" <!-- ENDIF -->/> {L_YES} <input type="radio" name="notify" value="0" <!-- IF not S_NOTIFY -->checked="checked" <!-- ENDIF -->/> {L_NO}</span></td> - </tr> - <!-- ENDIF --> - <tr> - <td class="row1" valign="top"><span class="gen"><b>{L_REPORT_MORE_INFO}:</b></span><br /><span class="gensmall">{L_REPORT_CAN_LEAVE_BLANK}</span></td> - <td class="row2"><textarea class="post" style="width:500px" name="report_text" rows="25" cols="40" class="post">{REPORT_TEXT}</textarea></td> - </tr> - <tr> - <td class="cat" colspan="2" align="center"><input type="submit" name="submit" class="btnmain" value="{L_SUBMIT}" /> <input type="submit" name="cancel" class="btnlite" value="{L_CANCEL}"></td> - </tr> - </table> -</form> - - -<!-- INCLUDE ucp_footer.html -->
\ No newline at end of file diff --git a/phpBB/styles/subSilver/theme/stylesheet.css b/phpBB/styles/subSilver/theme/stylesheet.css index 8709f0f665..49ef82c870 100644 --- a/phpBB/styles/subSilver/theme/stylesheet.css +++ b/phpBB/styles/subSilver/theme/stylesheet.css @@ -498,9 +498,6 @@ input.radio { /* Private messages ------------------ */ -.pm_message_reported_colour { - background-color: #FFFFFF; - } .pm_marked_colour { background-color: #000000; } diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index bd4a2a96b3..5758a26377 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1285,7 +1285,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_YIM' => $user_cache[$poster_id]['yim'], 'U_JABBER' => $user_cache[$poster_id]['jabber'], - 'U_REPORT' => "{$phpbb_root_path}report.$phpEx$SID&p=" . $row['post_id'], + 'U_REPORT' => ($auth->acl_get('f_report', $forum_id)) ? "{$phpbb_root_path}report.$phpEx$SID&p=" . $row['post_id'] : '', 'U_MCP_REPORT' => ($auth->acl_gets('m_', 'a_', 'f_report', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=main&mode=post_details&p=" . $row['post_id'] : '', 'U_MCP_APPROVE' => ($auth->acl_get('m_approve', $forum_id)) ? "{$phpbb_root_path}mcp.$phpEx$SID&i=queue&mode=unapproved_posts&action=approve&post_id_list[]=" . $row['post_id'] : '', 'U_MINI_POST' => "{$phpbb_root_path}viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#p' . $row['post_id'], |