Minor improvements (#259)

* Minor improvements

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2023-09-24 13:30:25 +07:00 committed by GitHub
parent ccd04a45ec
commit 5f4fe7fca5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 6 deletions

3
.gitignore vendored
View File

@ -10,6 +10,7 @@ internal_data/log/
internal_data/sitemap/*.xml
internal_data/triggers/
library/config.local.php
spam_filter_words.txt
### Archives ###
*.log
@ -33,4 +34,4 @@ $RECYCLE.BIN/
.Spotlight-V100
.Trashes
*.orig
*.rej
*.rej

View File

@ -9,7 +9,7 @@
- Added missing translation in admin_ug_auth [\#254](https://github.com/torrentpier/torrentpier-lts/pull/254) ([belomaxorka](https://github.com/belomaxorka))
- Support for IDN domains [\#252](https://github.com/torrentpier/torrentpier-lts/pull/252) ([belomaxorka](https://github.com/belomaxorka))
- Fixed cache directory auto-creating with SQLite [\#247](https://github.com/torrentpier/torrentpier-lts/pull/247) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#245](https://github.com/torrentpier/torrentpier-lts/pull/245), [\#246](https://github.com/torrentpier/torrentpier-lts/pull/246), [\#248](https://github.com/torrentpier/torrentpier-lts/pull/248), [\#249](https://github.com/torrentpier/torrentpier-lts/pull/249), [\#250](https://github.com/torrentpier/torrentpier-lts/pull/250), [\#251](https://github.com/torrentpier/torrentpier-lts/pull/251), [\#253](https://github.com/torrentpier/torrentpier-lts/pull/253), [\#255](https://github.com/torrentpier/torrentpier-lts/pull/255), [\#256](https://github.com/torrentpier/torrentpier-lts/pull/256), [\#257](https://github.com/torrentpier/torrentpier-lts/pull/257), [\#258](https://github.com/torrentpier/torrentpier-lts/pull/258) ([belomaxorka](https://github.com/belomaxorka))
- Minor improvements [\#245](https://github.com/torrentpier/torrentpier-lts/pull/245), [\#246](https://github.com/torrentpier/torrentpier-lts/pull/246), [\#248](https://github.com/torrentpier/torrentpier-lts/pull/248), [\#249](https://github.com/torrentpier/torrentpier-lts/pull/249), [\#250](https://github.com/torrentpier/torrentpier-lts/pull/250), [\#251](https://github.com/torrentpier/torrentpier-lts/pull/251), [\#253](https://github.com/torrentpier/torrentpier-lts/pull/253), [\#255](https://github.com/torrentpier/torrentpier-lts/pull/255), [\#256](https://github.com/torrentpier/torrentpier-lts/pull/256), [\#257](https://github.com/torrentpier/torrentpier-lts/pull/257), [\#258](https://github.com/torrentpier/torrentpier-lts/pull/258), [\#259](https://github.com/torrentpier/torrentpier-lts/pull/259) ([belomaxorka](https://github.com/belomaxorka))
## [v2.1.5-2023.08-HotFix](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.08-HotFix) (2023-09-17)
[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.08...v2.1.5-2023.08-HotFix)

View File

@ -425,7 +425,10 @@ $bb_cfg['max_search_words_per_post'] = 200; // максимальное
$bb_cfg['search_min_word_len'] = 3; // минимальное число слов для поиска
$bb_cfg['search_max_word_len'] = 35; // максимальное число слов для поиска
$bb_cfg['limit_max_search_results'] = false; // ограничить число результатов поиска (указать максимальное число результатов) (false - выключено)
$bb_cfg['spam_filter_file_path'] = ''; // INT_DATA_DIR . 'spam_filter_words.txt';
$bb_cfg['spam_filter_file_path'] = false; // спам фильтр (нужно указать путь, например: INT_DATA_DIR . 'spam_filter_words.txt';) (false - выключено)
$bb_cfg['spam_filter_replacement'] = '*СПАМ*'; // слово на которое будет заменен спам
$bb_cfg['autocorrect_wkl'] = true; // autocorrect wrong keyboard layout
// Posting

View File

@ -621,7 +621,6 @@ class bbcode
{
global $bb_cfg;
static $spam_words = null;
static $spam_replace = ' СПАМ';
if (isset($this))
{
@ -671,7 +670,7 @@ class bbcode
}
$spam_exp = join('|', $spam_exp);
$text = preg_replace("/($spam_exp)(\S*)/i", $spam_replace, $msg_decoded);
$text = preg_replace("/($spam_exp)(\S*)/i", $bb_cfg['spam_filter_replacement'], $msg_decoded);
$text = htmlCHR($text, false, ENT_NOQUOTES);
# bb_log(date("H:i:s") ." | ". sprintf('%.4f', (utime() - $tm_start)) ." | ". sprintf('%-6s', strlen($text)) ." | ". join(' ** ', $found_spam) ."\n", 'spam_filter');
}
@ -958,4 +957,4 @@ function get_parsed_post ($postrow, $mode = 'full', $return_chars = 600)
function update_post_html ($postrow)
{
DB()->query("DELETE FROM ". BB_POSTS_HTML ." WHERE post_id = ". (int) $postrow['post_id'] ." LIMIT 1");
}
}