From f577e795640fcbeeb2e3d70ae8dfaeb5ae447ce0 Mon Sep 17 00:00:00 2001 From: "glix08@gmail.com" Date: Sun, 26 Jan 2014 18:28:56 +0000 Subject: [PATCH] r568 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Новый - HTML5; фикс добавления поисковых слов в базу, если поисковым движком выбран Sphinx; удаление seo_link (бессмысленная функция, никакой роли в современном SEO не играющая); удаление QUIRKS_MODE (морально устарело); фикс ссылки поиска пользователя; пустая папка upgrade для будущих ревизий. git-svn-id: https://torrentpier2.googlecode.com/svn/trunk@568 a8ac35ab-4ca4-ca47-4c2d-a49a94f06293 --- .../converter/TBDevYSE_pre6/root/convert.php | 2 +- .../converter/TBDevYSE_pre6/root/recover.php | 2 +- other/recover/recover.php | 2 +- upload/config.php | 7 ++--- upload/includes/bbcode.php | 4 ++- upload/includes/functions.php | 15 +--------- upload/includes/page_header.php | 14 +-------- upload/misc.php | 2 +- upload/search.php | 6 ++-- upload/templates/admin/index.tpl | 2 +- upload/templates/board_disabled_exit.php | 2 +- upload/templates/default/page_header.tpl | 29 ++++++++++--------- 12 files changed, 31 insertions(+), 56 deletions(-) diff --git a/other/converter/TBDevYSE_pre6/root/convert.php b/other/converter/TBDevYSE_pre6/root/convert.php index 27d047626..e07682eaa 100644 --- a/other/converter/TBDevYSE_pre6/root/convert.php +++ b/other/converter/TBDevYSE_pre6/root/convert.php @@ -19,7 +19,7 @@ error_reporting(E_ALL); @ini_set('display_errors', 1); ?> - + diff --git a/other/converter/TBDevYSE_pre6/root/recover.php b/other/converter/TBDevYSE_pre6/root/recover.php index c6dccd39d..d408166f9 100644 --- a/other/converter/TBDevYSE_pre6/root/recover.php +++ b/other/converter/TBDevYSE_pre6/root/recover.php @@ -15,7 +15,7 @@ while (@ob_end_flush()); ob_implicit_flush(); ?> - + diff --git a/other/recover/recover.php b/other/recover/recover.php index 2af559ef3..4a0cc0de4 100644 --- a/other/recover/recover.php +++ b/other/recover/recover.php @@ -15,7 +15,7 @@ $user->session_start(); while (@ob_end_flush()); ob_implicit_flush(); -?> +?> diff --git a/upload/config.php b/upload/config.php index c06e31aa4..7ce54326e 100644 --- a/upload/config.php +++ b/upload/config.php @@ -55,8 +55,8 @@ $domain_name = (!empty($_SERVER['SERVER_NAME'])) ? $_SERVER['SERVER_NAME'] : $do // Increase number of revision after update $bb_cfg['tp_version'] = '2.5 (unstable)'; -$bb_cfg['tp_release_date'] = '23-01-2014'; -$bb_cfg['tp_release_state'] = 'R567'; +$bb_cfg['tp_release_date'] = '26-01-2014'; +$bb_cfg['tp_release_state'] = 'R568'; // Database $charset = 'utf8'; @@ -537,7 +537,4 @@ $bb_cfg['captcha'] = array( 'img_path' => BB_PATH .'/images/captcha/', # without '/' ); -// SEO -$bb_cfg['seo_link_home_page'] = false; - define('BB_CFG_LOADED', true); \ No newline at end of file diff --git a/upload/includes/bbcode.php b/upload/includes/bbcode.php index 8afc01f56..720e4290c 100644 --- a/upload/includes/bbcode.php +++ b/upload/includes/bbcode.php @@ -419,11 +419,13 @@ function replace_synonyms ($text) function add_search_words ($post_id, $post_message, $topic_title = '', $only_return_words = false) { + global $bb_cfg; + $text = $topic_title .' '. $post_message; $text = strip_bbcode_uid($text); $words = ($text) ? extract_search_words($text) : array(); - if ($only_return_words) + if ($only_return_words || $bb_cfg['search_engine_type'] == 'sphinx') { return join("\n", $words); } diff --git a/upload/includes/functions.php b/upload/includes/functions.php index 263380d79..02ddc8658 100644 --- a/upload/includes/functions.php +++ b/upload/includes/functions.php @@ -2024,7 +2024,7 @@ function redirect ($url) if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) { header('Refresh: 0; URL='. $redirect_url); - echo 'Redirect
If your browser does not support meta redirection please click HERE to be redirected
'; + echo 'Redirect
If your browser does not support meta redirection please click HERE to be redirected
'; exit; } @@ -2826,17 +2826,4 @@ function profile_url ($data) } return $profile; -} - -function seo_link_header ($str) -{ - /** - * Функция обработки url. Сверяет url с переданным выражением. - */ - global $bb_cfg; - - $regexp = "/{$str}\.php/"; - $return = ($bb_cfg['seo_link_home_page']) ? ((preg_match($regexp, $_SERVER['SCRIPT_NAME'])) ? false : true) : true; - - return $return; } \ No newline at end of file diff --git a/upload/includes/page_header.php b/upload/includes/page_header.php index 48e3cc70c..f0e77922e 100644 --- a/upload/includes/page_header.php +++ b/upload/includes/page_header.php @@ -165,25 +165,13 @@ if ($bb_cfg['reports_enabled']) else $report_list = ''; // Report [END] -// FOR SEO -$template->assign_vars(array( - 'SEO_LINK_INDEX_PAGE' => seo_link_header('index'), - 'SEO_LINK_TRACKER_PAGE' => seo_link_header('tracker'), - 'SEO_LINK_SEARCH_PAGE' => seo_link_header('search'), - 'SEO_LINK_FAQ_PAGE' => seo_link_header('faq'), - 'SEO_LINK_GROUP_PAGE' => seo_link_header('groupcp'), - 'SEO_LINK_MEMEBERLIST_PAGE' => seo_link_header('memberlist'), -)); - - $template->assign_vars(array( 'SIMPLE_HEADER' => !empty($gen_simple_header), 'IN_ADMIN' => defined('IN_ADMIN'), - 'QUIRKS_MODE' => !empty($page_cfg['quirks_mode']), 'SHOW_ADS' => (!$logged_in || isset($bb_cfg['show_ads_users'][$user->id]) || (!($is_admin || $is_mod) && $user->show_ads)), - 'USER_HIDE_CAT' => (BB_SCRIPT == 'index'), + 'USER_HIDE_CAT' => (BB_SCRIPT == 'index'), 'USER_RUS' => ($userdata['user_lang'] != 'english') ? true : false, diff --git a/upload/misc.php b/upload/misc.php index 2c2e827c0..f19e2adc3 100644 --- a/upload/misc.php +++ b/upload/misc.php @@ -114,7 +114,7 @@ elseif ($do == 'info') $in_info = true; - ?> + ?> diff --git a/upload/search.php b/upload/search.php index 323976349..9f8911be9 100644 --- a/upload/search.php +++ b/upload/search.php @@ -295,7 +295,7 @@ if (empty($_GET) && empty($_POST)) 'THIS_USER_ID' => $userdata['user_id'], 'THIS_USER_NAME' => addslashes($userdata['username']), 'SEARCH_ACTION' => "search.php", - 'U_SEARCH_USER' => "search.php?mode=searchuser&input_name=$poster_name_key", + 'U_SEARCH_USER' => "search.php?mode=searchuser&input_name=$poster_name_key", 'ONLOAD_FOCUS_ID' => 'text_match_input', 'MY_TOPICS_ID' => 'my_topics', @@ -501,14 +501,14 @@ if ($post_mode) if ($text_match_sql) { $search_match_topics_csv = ''; - $title_match_topics = get_title_match_topics($text_match_sql, $forum_selected); + $title_match_topics = get_title_match_topics($text_match_sql, $forum_selected); if (!$search_match_topics_csv = join(',', $title_match_topics)) { bb_die($lang['NO_SEARCH_MATCH']); } - $where_id = ($title_match) ? 'topic_id' : 'post_id'; + $where_id = ($title_match) ? 'topic_id' : 'post_id'; $SQL['WHERE'][] = "$tbl.$where_id IN($search_match_topics_csv)"; prevent_huge_searches($SQL); diff --git a/upload/templates/admin/index.tpl b/upload/templates/admin/index.tpl index d5882a226..6d6c8dbce 100644 --- a/upload/templates/admin/index.tpl +++ b/upload/templates/admin/index.tpl @@ -1,7 +1,7 @@ - + diff --git a/upload/templates/board_disabled_exit.php b/upload/templates/board_disabled_exit.php index ffbc7d4f5..73de87cae 100644 --- a/upload/templates/board_disabled_exit.php +++ b/upload/templates/board_disabled_exit.php @@ -15,7 +15,7 @@ if (!empty($_POST['message'])) $message .= $_POST['message']; } -?> +?> diff --git a/upload/templates/default/page_header.tpl b/upload/templates/default/page_header.tpl index 73c2120b0..fa88362db 100644 --- a/upload/templates/default/page_header.tpl +++ b/upload/templates/default/page_header.tpl @@ -1,4 +1,5 @@ - + + @@ -378,21 +379,21 @@ if (top != self) {
- {L_HOME}| - {L_TRACKER}| - {L_SEARCH}| + {L_HOME}| + {L_TRACKER}| + {L_SEARCH}| {L_TERMS}| - {L_FAQ}| - {L_USERGROUPS}| - {L_MEMBERLIST}| + {L_FAQ}| + {L_USERGROUPS}| + {L_MEMBERLIST}| - - {REPORT_LIST} · - - - {REPORT_LIST} · - + + {REPORT_LIST} · + + + {REPORT_LIST} · + @@ -411,7 +412,7 @@ if (top != self) {