|
13.04.2006, 02:59
Открываем modules/Forums/common.php
Находим (169):
PHP код:
$userdata = array(); $theme = array(); $images = array(); $lang = array(); $nav_links = array();
Ниже добавляем:
Открываем db/mssql.php
Находим (292):
PHP код:
$row[$key] = stripslashes($value);
Замените на:
PHP код:
$row[$key] = ($value === ' ') ? '' : stripslashes($value);
Найдите (320):
PHP код:
$rowset[$i][$key] = stripslashes($value);
Замените на:
PHP код:
$rowset[$i][$key] = ($value === ' ') ? '' : stripslashes($value);
Найдите (259):
PHP код:
$result = stripslashes($this->row[$query_id][$field]);
Замените на:
PHP код:
$result = ($this->row[$query_id][$field] === ' ') ? '' : stripslashes($this->row[$query_id][$field]);
Открываем includes/auth.php
Найдите (276):
PHP код:
{ for($k = 0; $k < count($f_access); $k++) { $value = $f_access[$k][$key]; $f_forum_id = $f_access[$k]['forum_id'];
Ниже добавьте:
PHP код:
$u_access[$f_forum_id] = isset($u_access[$f_forum_id]) ? $u_access[$f_forum_id] : array();
Найдите (325):
PHP код:
else { for($k = 0; $k < count($f_access); $k++) { $f_forum_id = $f_access[$k]['forum_id'];
Ниже добавьте:
PHP код:
$u_access[$f_forum_id] = isset($u_access[$f_forum_id]) ? $u_access[$f_forum_id] : array();
Открываем includes/bbcode.php
Найдите (198):
PHP код:
$patterns[] = "#\[img:$uid\]([^?].*?)\[/img:$uid\]#i"; $replacements[] = $bbcode_tpl['img']; // matches a xxxx://www.phpbb.com code.. $patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]|\[(?!url=))*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url1']; // www.phpbb.com code.. (no xxxx:// prefix). $patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]|\[(?!url=))*?)\[/url\]#is";
Замените на:
PHP код:
$patterns[] = "#\[img:$uid\]([^?](?:[^\[]+|\[(?!url))*?)\[/img:$uid\]#i"; $replacements[] = $bbcode_tpl['img']; // matches a xxxx://www.phpbb.com code.. $patterns[] = "#\[url\]([\w]+?://([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is"; $replacements[] = $bbcode_tpl['url1']; // www.phpbb.com code.. (no xxxx:// prefix). $patterns[] = "#\[url\]((www|ftp)\.([\w\#$%&~/.\-;:=,?@\]+]+|\[(?!url=))*?)\[/url\]#is";
Найдите (237):
Замените на:
Открываем includes/functions.php
Найдите (142):
Ниже добавьте: (изменено)
PHP код:
/** * Our own generator of random values * This uses a constantly changing value as the base for generating the values * The board wide setting is updated once per page if this code is called * With thanks to Anthrax101 for the inspiration on this one * Added in phpBB 2.0.20 */ function dss_rand() { global $db, $board_config, $dss_seeded; $val = $board_config['rand_seed'] . microtime(); $val = md5($val); $board_config['rand_seed'] = md5($board_config['rand_seed'] . $val . 'a'); if($dss_seeded !== true) { $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '" . $board_config['rand_seed'] . "' WHERE config_name = 'rand_seed'"; if( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Unable to reseed PRNG", "", __LINE__, __FILE__, $sql); } $dss_seeded = true; } return substr($val, 4, 16); }
Найдите (419):
PHP код:
message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]");
Замените на:
PHP код:
// We are trying to setup a style which does not exist in the database // Try to fallback to the board default (if the user had a custom style) // and then any users using this style to the default if it succeeds if ( $style != $board_config['default_style']) { $sql = 'SELECT * FROM ' . THEMES_TABLE . ' WHERE themes_id = ' . $board_config['default_style']; if ( !($result = $db->sql_query($sql)) ) { message_die(CRITICAL_ERROR, 'Could not query database for theme info'); } if ( $row = $db->sql_fetchrow($result) ) { $db->sql_freeresult($result); $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . $board_config['default_style'] . " WHERE user_style = $style"; if ( !($result = $db->sql_query($sql)) ) { message_die(CRITICAL_ERROR, 'Could not update user theme info'); } } else { message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); } } else { message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); }
Найдите (725):
PHP код:
$debug_text .= '</br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file);
Замените на:
PHP код:
$debug_text .= '<br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file);
Найдите (752):
PHP код:
if ( empty($template) ) { $ThemeSel = get_theme(); if (file_exists("themes/$ThemeSel/forums/".$board_config['board_template']."/index_body.tpl")) { $template = new Template("themes/$ThemeSel/forums/".$board_config['board_template'].""); } else { $template = new Template($phpbb_root_path . 'templates/' . $board_config['board_template']); } } if ( empty($theme) )
Замените на:
PHP код:
if ( empty($template) || empty($theme) )
|
|