|
13.04.2006, 02:09
Обновляем форум BBtoNuke с версии 2.0.19 до 2.0.20
Открываем modules/Forums/admin/admin_board.php
Находим (52):
PHP код:
$cookie_name = str_replace('.', '_', $new['cookie_name']); }
Заменяем на:
PHP код:
$new['cookie_name'] = str_replace('.', '_', $new['cookie_name']); } // Attempt to prevent a common mistake with this value, // http:// is the protocol and not part of the server name if ($config_name == 'server_name') { $new['server_name'] = str_replace('http://', '', $new['server_name']); }
Находим(197):
PHP код:
"L_DISABLED" => $lang['Disabled'], "L_ABILITIES_SETTINGS" => $lang['Abilities_settings'], "L_MAX_POLL_OPTIONS" => $lang['Max_poll_options'], "L_FLOOD_INTERVAL" => $lang['Flood_Interval'], "L_FLOOD_INTERVAL_EXPLAIN" => $lang['Flood_Interval_explain'],
Ниже добавляем:
PHP код:
"L_SEARCH_FLOOD_INTERVAL" => $lang['Search_Flood_Interval'], "L_SEARCH_FLOOD_INTERVAL_EXPLAIN" => $lang['Search_Flood_Interval_explain'],
Находим (285):
PHP код:
'AUTOLOGIN_TIME' => (int) $new['max_autologin_time'], "BOARD_EMAIL_FORM_ENABLE" => $board_email_form_yes, "BOARD_EMAIL_FORM_DISABLE" => $board_email_form_no, "MAX_POLL_OPTIONS" => $new['max_poll_options'], "FLOOD_INTERVAL" => $new['flood_interval'],
Ниже добавляем:
PHP код:
"SEARCH_FLOOD_INTERVAL" => $new['search_flood_interval'],
Открываем modules/Forums/admin/admin_db_utilities.php
Находим (507):
PHP код:
unset($schema_vals); unset($schema_fields); unset($schema_insert);
Заменяем на:
PHP код:
$schema_vals = ''; $schema_fields = ''; $schema_insert = '';
Находим (519):
Замените на:
Открываем modules/Forums/admin/admin_forums.php
Найдите (42):
PHP код:
"auth_post" => AUTH_ALL, "auth_reply" => AUTH_ALL,
Замените на:
PHP код:
"auth_post" => AUTH_REG, "auth_reply" => AUTH_REG,
Открываем modules/Forums/admin/admin_groups.php
Найдите (107):
PHP код:
$sql = "SELECT user_id, username FROM " . USERS_TABLE . " WHERE user_id <> " . ANONYMOUS . " ORDER BY username"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql); } while ( $row = $db->sql_fetchrow($result) ) { if ( $row['user_id'] == $group_info['group_moderator'] ) { $group_moderator = $row['username']; }
Замените на:
PHP код:
if ($group_info['group_moderator'] != '') { $sql = "SELECT user_id, username FROM " . USERS_TABLE . " WHERE user_id = " . $group_info['group_moderator']; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql); } if ( !($row = $db->sql_fetchrow($result)) ) { message_die(GENERAL_ERROR, 'Could not obtain user info for moderator list', '', __LINE__, __FILE__, $sql); } $group_moderator = $row['username']; } else { $group_moderator = '';
Найдите (259):
PHP код:
$group_name = isset($HTTP_POST_VARS['group_name']) ? trim($HTTP_POST_VARS['group_name']) : '';
Замените на:
PHP код:
$group_name = isset($HTTP_POST_VARS['group_name']) ? htmlspecialchars(trim($HTTP_POST_VARS['group_name'])) : '';
Открываем modules/Forums/admin/admin_ranks.php
Найдите и удалите (22):
Найдите(25):
PHP код:
{ $file = basename(__FILE__); $module['Users']['Ranks'] = $file; return; }
Ниже добавьте:
Найдите (41):
PHP код:
$mode = ($HTTP_GET_VARS['mode']) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
Замените на:
PHP код:
$mode = (isset($HTTP_GET_VARS['mode'])) ? $HTTP_GET_VARS['mode'] : $HTTP_POST_VARS['mode'];
Найдите (58):
Ниже добавьте:
PHP код:
// Restrict mode input to valid options $mode = ( in_array($mode, array('add', 'edit', 'save', 'delete')) ) ? $mode : '';
Найдите (214):
PHP код:
} else { $rank_id = 0; } if( $rank_id )
Замените на:
PHP код:
} else { $rank_id = 0; } $confirm = isset($HTTP_POST_VARS['confirm']); if( $rank_id && $confirm )
|
|