mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 15:05:43 +02:00
Preliminary 'freeze' on permissions awaiting developer feedback, testing, etc. Caching of non-dynmaic config and acl option elements.
git-svn-id: file:///svn/phpbb/trunk@2970 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
a7d186fd91
commit
1edc9d362f
@ -41,17 +41,13 @@ $phpbb_root_path = '../';
|
|||||||
require($phpbb_root_path . 'extension.inc');
|
require($phpbb_root_path . 'extension.inc');
|
||||||
require('pagestart.' . $phpEx);
|
require('pagestart.' . $phpEx);
|
||||||
|
|
||||||
//
|
|
||||||
// Do we have ban permissions?
|
// Do we have ban permissions?
|
||||||
//
|
|
||||||
if ( !$auth->acl_get('a_ban') )
|
if ( !$auth->acl_get('a_ban') )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// Mode setting
|
// Mode setting
|
||||||
//
|
|
||||||
if ( isset($_POST['mode']) || isset($_GET['mode']) )
|
if ( isset($_POST['mode']) || isset($_GET['mode']) )
|
||||||
{
|
{
|
||||||
$mode = ( isset($_POST['mode']) ) ? $_POST['mode'] : $_GET['mode'];
|
$mode = ( isset($_POST['mode']) ) ? $_POST['mode'] : $_GET['mode'];
|
||||||
@ -63,15 +59,15 @@ else
|
|||||||
|
|
||||||
$current_time = time();
|
$current_time = time();
|
||||||
|
|
||||||
//
|
|
||||||
// Start program
|
// Start program
|
||||||
//
|
if ( isset($_POST['bansubmit']) || isset($_GET['bansubmit']) )
|
||||||
if ( isset($_POST['bansubmit']) )
|
|
||||||
{
|
{
|
||||||
$ban_reason = ( isset($_POST['banreason']) ) ? $_POST['banreason'] : '';
|
$ban = ( !empty($_POST['ban']) ) ? $_POST['ban'] : $_GET['ban'];
|
||||||
$ban_list = array_unique(explode("\n", $_POST['ban']));
|
$ban_list = array_unique(explode("\n", $ban));
|
||||||
$ban_list_log = implode(', ', $ban_list);
|
$ban_list_log = implode(', ', $ban_list);
|
||||||
|
|
||||||
|
$ban_reason = ( isset($_POST['banreason']) ) ? $_POST['banreason'] : '';
|
||||||
|
|
||||||
if ( !empty($_POST['banlength']) )
|
if ( !empty($_POST['banlength']) )
|
||||||
{
|
{
|
||||||
if ( $_POST['banlength'] != -1 || empty($_POST['banlengthother']) )
|
if ( $_POST['banlength'] != -1 || empty($_POST['banlengthother']) )
|
||||||
@ -207,11 +203,9 @@ if ( isset($_POST['bansubmit']) )
|
|||||||
|
|
||||||
for($i = 0; $i < count($ban_list); $i++)
|
for($i = 0; $i < count($ban_list); $i++)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
// This ereg match is based on one by php@unreelpro.com
|
// This ereg match is based on one by php@unreelpro.com
|
||||||
// contained in the annotated php manual at php.com (ereg
|
// contained in the annotated php manual at php.com (ereg
|
||||||
// section)
|
// section)
|
||||||
//
|
|
||||||
if ( eregi('^(([[:alnum:]\*]+([-_.][[:alnum:]\*]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$', trim($ban_list[$i])) )
|
if ( eregi('^(([[:alnum:]\*]+([-_.][[:alnum:]\*]+)*\.?)|(\*))@([[:alnum:]]+([-_]?[[:alnum:]]+)*\.){1,3}([[:alnum:]]{2,6})$', trim($ban_list[$i])) )
|
||||||
{
|
{
|
||||||
$banlist[] = '\'' . trim($ban_list[$i]) . '\'';
|
$banlist[] = '\'' . trim($ban_list[$i]) . '\'';
|
||||||
|
@ -42,11 +42,12 @@ define('IN_PHPBB', 1);
|
|||||||
$phpbb_root_path = '../';
|
$phpbb_root_path = '../';
|
||||||
require($phpbb_root_path . 'extension.inc');
|
require($phpbb_root_path . 'extension.inc');
|
||||||
require('pagestart.' . $phpEx);
|
require('pagestart.' . $phpEx);
|
||||||
|
require($phpbb_root_path . 'includes/functions_admin.' . $phpEx);
|
||||||
|
|
||||||
// Are we authed?
|
// Are we authed?
|
||||||
if ( !$auth->acl_get('a_general') )
|
if ( !$auth->acl_get('a_general') )
|
||||||
{
|
{
|
||||||
message_die(MESSAGE, $user->lang['No_admin']);
|
trigger_error($user->lang['No_admin']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get mod
|
// Get mod
|
||||||
@ -83,8 +84,11 @@ while ( $row = $db->sql_fetchrow($result) )
|
|||||||
|
|
||||||
if ( isset($_POST['submit']) )
|
if ( isset($_POST['submit']) )
|
||||||
{
|
{
|
||||||
|
// Re-cache config data
|
||||||
|
config_config($new);
|
||||||
|
|
||||||
add_admin_log('log_' . $mode . '_config');
|
add_admin_log('log_' . $mode . '_config');
|
||||||
message_die(MESSAGE, $user->lang['Config_updated']);
|
trigger_error($user->lang['Config_updated']);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -46,7 +46,7 @@ require($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
|||||||
// Do we have forum admin permissions?
|
// Do we have forum admin permissions?
|
||||||
if ( !$auth->acl_get('a_auth') )
|
if ( !$auth->acl_get('a_auth') )
|
||||||
{
|
{
|
||||||
message_die(MESSAGE, $user->lang['No_admin']);
|
trigger_error($user->lang['No_admin']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define some vars
|
// Define some vars
|
||||||
@ -78,16 +78,19 @@ switch ( $mode )
|
|||||||
$l_title_explain = $user->lang['Permissions_explain'];
|
$l_title_explain = $user->lang['Permissions_explain'];
|
||||||
$l_can = '_can';
|
$l_can = '_can';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'moderators':
|
case 'moderators':
|
||||||
$l_title = $user->lang['Moderators'];
|
$l_title = $user->lang['Moderators'];
|
||||||
$l_title_explain = $user->lang['Moderators_explain'];
|
$l_title_explain = $user->lang['Moderators_explain'];
|
||||||
$l_can = '_can';
|
$l_can = '_can';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'supermoderators':
|
case 'supermoderators':
|
||||||
$l_title = $user->lang['Super_Moderators'];
|
$l_title = $user->lang['Super_Moderators'];
|
||||||
$l_title_explain = $user->lang['Super_Moderators_explain'];
|
$l_title_explain = $user->lang['Super_Moderators_explain'];
|
||||||
$l_can = '_can';
|
$l_can = '_can';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'administrators':
|
case 'administrators':
|
||||||
$l_title = $user->lang['Administrators'];
|
$l_title = $user->lang['Administrators'];
|
||||||
$l_title_explain = $user->lang['Administrators_explain'];
|
$l_title_explain = $user->lang['Administrators_explain'];
|
||||||
@ -147,12 +150,10 @@ else if ( isset($_POST['delete']) )
|
|||||||
trigger_error('Permissions updated successfully');
|
trigger_error('Permissions updated successfully');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get required information, either all forums if
|
// Get required information, either all forums if no id was
|
||||||
// no id was specified or just the requsted if it
|
// specified or just the requsted if it was
|
||||||
// was
|
|
||||||
if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators' )
|
if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators' )
|
||||||
{
|
{
|
||||||
//
|
|
||||||
// Clear some vars, grab some info if relevant ...
|
// Clear some vars, grab some info if relevant ...
|
||||||
$s_hidden_fields = '';
|
$s_hidden_fields = '';
|
||||||
|
|
||||||
@ -394,8 +395,8 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
|
|||||||
// NEEDS COMPLETING ... OR SCRAPPING :D
|
// NEEDS COMPLETING ... OR SCRAPPING :D
|
||||||
quick_options = new Array();
|
quick_options = new Array();
|
||||||
quick_options['basic'] = new Array();
|
quick_options['basic'] = new Array();
|
||||||
quick_options['basic']['allow'] = '34, 36,';
|
quick_options['basic']['allow'] = '';
|
||||||
quick_options['basic']['deny'] = '35,';
|
quick_options['basic']['deny'] = '';
|
||||||
quick_options['basic']['inherit'] = '';
|
quick_options['basic']['inherit'] = '';
|
||||||
quick_options['advanced'] = new Array();
|
quick_options['advanced'] = new Array();
|
||||||
|
|
||||||
@ -412,6 +413,7 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
|
|||||||
{
|
{
|
||||||
if (option)
|
if (option)
|
||||||
{
|
{
|
||||||
|
document.acl.set.selectedIndex = 0;
|
||||||
var expr = new RegExp(/\d+/);
|
var expr = new RegExp(/\d+/);
|
||||||
for (i = 0; i < document.acl.length; i++)
|
for (i = 0; i < document.acl.length; i++)
|
||||||
{
|
{
|
||||||
@ -478,9 +480,9 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators
|
|||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="<?php echo $row_class; ?>"><?php echo $l_can_cell; ?></td>
|
<td class="<?php echo $row_class; ?>"><?php echo $l_can_cell; ?></td>
|
||||||
<td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_option_id']; ?>]" value="<?php echo ACL_ALLOW; ?>"<?php echo $allow_type; ?> /></td>
|
<td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_value']; ?>]" value="<?php echo ACL_ALLOW; ?>"<?php echo $allow_type; ?> /></td>
|
||||||
<td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_option_id']; ?>]" value="<?php echo ACL_DENY; ?>"<?php echo $deny_type; ?> /></td>
|
<td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_value']; ?>]" value="<?php echo ACL_DENY; ?>"<?php echo $deny_type; ?> /></td>
|
||||||
<td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_option_id']; ?>]" value="<?php echo ACL_INHERIT; ?>"<?php echo $inherit_type; ?> /></td>
|
<td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_value']; ?>]" value="<?php echo ACL_INHERIT; ?>"<?php echo $inherit_type; ?> /></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
@ -174,8 +174,8 @@ elseif ( isset($_GET['pane']) && $_GET['pane'] == 'right' )
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get forum statistics
|
// Get forum statistics
|
||||||
$total_posts = get_db_stat('postcount');
|
$total_posts = $board_config['num_posts'];
|
||||||
$total_topics = get_db_stat('topiccount');
|
$total_topics = $board_config['num_topics'];
|
||||||
$total_users = $board_config['num_users'];
|
$total_users = $board_config['num_users'];
|
||||||
|
|
||||||
$start_date = $user->format_date($board_config['board_startdate']);
|
$start_date = $user->format_date($board_config['board_startdate']);
|
||||||
|
@ -37,6 +37,7 @@ if ( !get_magic_quotes_gpc() )
|
|||||||
}
|
}
|
||||||
|
|
||||||
require($phpbb_root_path . 'config.'.$phpEx);
|
require($phpbb_root_path . 'config.'.$phpEx);
|
||||||
|
require($phpbb_root_path . 'config_cache.'.$phpEx);
|
||||||
|
|
||||||
if ( !defined('PHPBB_INSTALLED') )
|
if ( !defined('PHPBB_INSTALLED') )
|
||||||
{
|
{
|
||||||
@ -44,13 +45,11 @@ if ( !defined('PHPBB_INSTALLED') )
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set PHP error handler to ours
|
// Include files
|
||||||
set_error_handler('msg_handler');
|
require($phpbb_root_path . 'includes/template.'.$phpEx);
|
||||||
|
require($phpbb_root_path . 'includes/session.'.$phpEx);
|
||||||
// Define some constants/variables
|
require($phpbb_root_path . 'includes/functions.'.$phpEx);
|
||||||
$board_config = array();
|
require($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
|
||||||
$theme = array();
|
|
||||||
$lang = array();
|
|
||||||
|
|
||||||
// User related
|
// User related
|
||||||
define('ANONYMOUS', 0);
|
define('ANONYMOUS', 0);
|
||||||
@ -135,22 +134,23 @@ define('VOTE_DESC_TABLE', $table_prefix.'vote_desc');
|
|||||||
define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
|
define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
|
||||||
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
|
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
|
||||||
|
|
||||||
// Include files
|
// Set PHP error handler to ours
|
||||||
require($phpbb_root_path . 'includes/template.'.$phpEx);
|
set_error_handler('msg_handler');
|
||||||
require($phpbb_root_path . 'includes/session.'.$phpEx);
|
|
||||||
require($phpbb_root_path . 'includes/functions.'.$phpEx);
|
|
||||||
require($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
|
|
||||||
require($phpbb_root_path . 'config_cache.'.$phpEx);
|
|
||||||
|
|
||||||
// Instantiate some basic classes
|
// Need these here so instantiate them now
|
||||||
$user = new user();
|
|
||||||
$auth = new auth();
|
|
||||||
$template = new Template();
|
$template = new Template();
|
||||||
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||||
|
|
||||||
// Obtain boardwide default config
|
// Obtain boardwide default config (rebuilding cache if reqd)
|
||||||
|
if ( empty($board_config) )
|
||||||
|
{
|
||||||
|
require_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||||
|
$board_config = config_config();
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "SELECT *
|
$sql = "SELECT *
|
||||||
FROM " . CONFIG_TABLE;
|
FROM " . CONFIG_TABLE . "
|
||||||
|
WHERE is_dynamic = 1";
|
||||||
$result = $db->sql_query($sql, false);
|
$result = $db->sql_query($sql, false);
|
||||||
|
|
||||||
while ( $row = $db->sql_fetchrow($result) )
|
while ( $row = $db->sql_fetchrow($result) )
|
||||||
@ -158,12 +158,23 @@ while ( $row = $db->sql_fetchrow($result) )
|
|||||||
$board_config[$row['config_name']] = $row['config_value'];
|
$board_config[$row['config_name']] = $row['config_value'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Re-cache acl options if reqd
|
||||||
|
if ( empty($acl_options) )
|
||||||
|
{
|
||||||
|
require_once($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
|
||||||
|
$auth_admin = new auth_admin();
|
||||||
|
$acl_options = $auth_admin->acl_cache_options();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Instantiate some basic classes
|
||||||
|
$user = new user();
|
||||||
|
$auth = new auth();
|
||||||
|
|
||||||
// Show 'Board is disabled' message
|
// Show 'Board is disabled' message
|
||||||
if ( $board_config['board_disable'] && !defined('IN_ADMIN') && !defined('IN_LOGIN') )
|
if ( $board_config['board_disable'] && !defined('IN_ADMIN') && !defined('IN_LOGIN') )
|
||||||
{
|
{
|
||||||
$message = ( !empty($board_config['board_disable_msg']) ) ? $board_config['board_disable_msg'] : 'Board_disable';
|
$message = ( !empty($board_config['board_disable_msg']) ) ? $board_config['board_disable_msg'] : 'Board_disable';
|
||||||
message_die(MESSAGE, $message, 'Information');
|
trigger_error($message);
|
||||||
//trigger_error($message);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// addslashes to vars if magic_quotes_gpc is off
|
// addslashes to vars if magic_quotes_gpc is off
|
||||||
|
@ -41,20 +41,12 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('prune_enable','1')
|
|||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable','1');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('email_enable','1');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('privmsg_disable','0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('gzip_compress','0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_users', '0');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('record_online_date', '0');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', '');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_name', '');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('server_port', '');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('script_path', '');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('newest_user_id', '1');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('newest_username', '');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('num_users', '1');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('num_posts', '1');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('num_topics', '1');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_load', '2.0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('limit_load', '2.0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('active_sessions', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('active_sessions', '0');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_gc', '3600');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_gc', '3600');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('session_last_gc', '0');
|
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '4');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ip_check', '4');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '2.1.0 [20021004]');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '2.1.0 [20021004]');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '0');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '0');
|
||||||
@ -84,58 +76,82 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('auth_method','db')
|
|||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_server', '');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_server', '');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_base_dn', '');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_base_dn', '');
|
||||||
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_uid', '');
|
INSERT INTO phpbb_config (config_name, config_value) VALUES ('ldap_uid', '');
|
||||||
|
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_users', '0', 1);
|
||||||
|
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('record_online_date', '0', 1);
|
||||||
|
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_user_id', '1', 1);
|
||||||
|
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('newest_username', '', 1);
|
||||||
|
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_users', '1', 1);
|
||||||
|
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_posts', '1', 1);
|
||||||
|
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('num_topics', '1', 1);
|
||||||
|
INSERT INTO phpbb_config (config_name, config_value, is_dynamic) VALUES ('session_last_gc', '0', 1);
|
||||||
|
|
||||||
# -- auth options
|
# -- auth options
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_');
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_');
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_list', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_');
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_read', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_post', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_reply', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_edit', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_delete', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_poll', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_vote', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_announce', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_sticky', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_attach', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_download', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_html', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_bbcode', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_smilies', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_img', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_flash', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_sigs', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_search', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_email', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_rate', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_print', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_ignoreflood', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_local) VALUES ('f_ignorequeue', 1);
|
||||||
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_list');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_read');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_edit', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_post');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_delete', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_reply');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_move', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_edit');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_lock', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_delete');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_split', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_poll');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_merge', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_vote');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_approve', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_announce');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_unrate', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_sticky');
|
INSERT INTO phpbb_auth_options (auth_value, is_local, is_global) VALUES ('m_auth', 1, 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_attach');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_download');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_html');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_bbcode');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_smilies');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_img');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_flash');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_sigs');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_search');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_email');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_rate');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_print');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_ignoreflood');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('f_ignorequeue');
|
|
||||||
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_edit');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_delete');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_confserver', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_move');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_confdefaults', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_lock');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_user', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_split');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_useradd', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_merge');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_userdel', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_approve');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_names', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_unrate');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_group', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('m_auth');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_groupadd', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_groupdel', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_forum', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_forumadd', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_forumdel', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_posts', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_ban', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_authforums', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_authmods', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_authadmins', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_email', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_styles', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_backup', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_restore', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_search', 1);
|
||||||
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('a_clearlogs', 1);
|
||||||
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_general');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('u_', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_user');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('u_email', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_group');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('u_pm', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_forum');
|
INSERT INTO phpbb_auth_options (auth_value, is_global) VALUES ('u_avatar', 1);
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_post');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_ban');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_auth');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_email');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_styles');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_backup');
|
|
||||||
INSERT INTO phpbb_auth_options (auth_value) VALUES ('a_clearlogs');
|
|
||||||
|
|
||||||
|
|
||||||
# -- phpbb_styles
|
# -- phpbb_styles
|
||||||
@ -188,11 +204,6 @@ INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_allow_de
|
|||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_allow_deny) SELECT 2, 1, auth_option_id, 8 FROM phpbb_auth_options WHERE auth_value LIKE 'f_%';
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_allow_deny) SELECT 2, 1, auth_option_id, 8 FROM phpbb_auth_options WHERE auth_value LIKE 'f_%';
|
||||||
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_allow_deny) SELECT 5, 0, auth_option_id, 8 FROM phpbb_auth_options WHERE auth_value LIKE 'a_%';
|
INSERT INTO phpbb_auth_groups (group_id, forum_id, auth_option_id, auth_allow_deny) SELECT 5, 0, auth_option_id, 8 FROM phpbb_auth_options WHERE auth_value LIKE 'a_%';
|
||||||
|
|
||||||
# -- Prefetch auth
|
|
||||||
INSERT INTO phpbb_auth_prefetch (user_id, forum_id, auth_option_id, auth_allow_deny) SELECT 0, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_value IN ('f_list', 'f_read', 'f_post', 'f_reply');
|
|
||||||
INSERT INTO phpbb_auth_prefetch (user_id, forum_id, auth_option_id, auth_allow_deny) SELECT 2, 0, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_value LIKE 'a_%';
|
|
||||||
INSERT INTO phpbb_auth_prefetch (user_id, forum_id, auth_option_id, auth_allow_deny) SELECT 2, 1, auth_option_id, 1 FROM phpbb_auth_options WHERE auth_value LIKE 'm_%';
|
|
||||||
|
|
||||||
|
|
||||||
# -- Demo Topic
|
# -- Demo Topic
|
||||||
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_first_post_id, topic_last_post_id, topic_last_poster_id, topic_last_post_time) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 1, 1, 2, 972086460);
|
INSERT INTO phpbb_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_first_post_id, topic_last_post_id, topic_last_poster_id, topic_last_post_time) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 1, 1, 2, 972086460);
|
||||||
|
@ -40,26 +40,14 @@ CREATE TABLE phpbb_auth_groups (
|
|||||||
CREATE TABLE phpbb_auth_options (
|
CREATE TABLE phpbb_auth_options (
|
||||||
auth_option_id tinyint(4) NOT NULL auto_increment,
|
auth_option_id tinyint(4) NOT NULL auto_increment,
|
||||||
auth_value char(20) NOT NULL,
|
auth_value char(20) NOT NULL,
|
||||||
|
is_global tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
|
is_local tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
founder_only tinyint(1) DEFAULT '0' NOT NULL,
|
founder_only tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
PRIMARY KEY (auth_option_id),
|
PRIMARY KEY (auth_option_id),
|
||||||
KEY auth_value (auth_value)
|
KEY auth_value (auth_value)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------
|
|
||||||
#
|
|
||||||
# Table structure for table `phpbb_auth_prefetch`
|
|
||||||
#
|
|
||||||
CREATE TABLE phpbb_auth_prefetch (
|
|
||||||
user_id mediumint(8) UNSIGNED NOT NULL default '0',
|
|
||||||
forum_id mediumint(8) unsigned NOT NULL default '0',
|
|
||||||
auth_option_id smallint(5) unsigned NOT NULL default '0',
|
|
||||||
auth_allow_deny tinyint(4) NOT NULL default '1',
|
|
||||||
KEY user_id (user_id),
|
|
||||||
KEY auth_option_id (auth_option_id)
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
#
|
#
|
||||||
# Table structure for table `phpbb_auth_users`
|
# Table structure for table `phpbb_auth_users`
|
||||||
@ -99,7 +87,9 @@ CREATE TABLE phpbb_banlist (
|
|||||||
CREATE TABLE phpbb_config (
|
CREATE TABLE phpbb_config (
|
||||||
config_name varchar(255) NOT NULL,
|
config_name varchar(255) NOT NULL,
|
||||||
config_value varchar(255) NOT NULL,
|
config_value varchar(255) NOT NULL,
|
||||||
PRIMARY KEY (config_name)
|
is_dynamic DEFAULT '0' NOT NULL,
|
||||||
|
PRIMARY KEY (config_name),
|
||||||
|
KEY is_dynamic (is_dynamic)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -136,6 +126,7 @@ CREATE TABLE phpbb_forums (
|
|||||||
forum_last_poster_name varchar(30),
|
forum_last_poster_name varchar(30),
|
||||||
display_on_index tinyint(1) DEFAULT '1' NOT NULL,
|
display_on_index tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
post_count_inc tinyint(1) DEFAULT '1' NOT NULL,
|
post_count_inc tinyint(1) DEFAULT '1' NOT NULL,
|
||||||
|
moderated tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
prune_enable tinyint(1) DEFAULT '0' NOT NULL,
|
prune_enable tinyint(1) DEFAULT '0' NOT NULL,
|
||||||
prune_next int(11) UNSIGNED,
|
prune_next int(11) UNSIGNED,
|
||||||
prune_days tinyint(4) UNSIGNED NOT NULL,
|
prune_days tinyint(4) UNSIGNED NOT NULL,
|
||||||
@ -144,7 +135,6 @@ CREATE TABLE phpbb_forums (
|
|||||||
KEY left_id (left_id),
|
KEY left_id (left_id),
|
||||||
KEY forum_last_post_id (forum_last_post_id)
|
KEY forum_last_post_id (forum_last_post_id)
|
||||||
);
|
);
|
||||||
# forum_last_topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user