mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Word censor code optimization (#1537)
* Word censor code optimization * Update CHANGELOG.md * Updated * Updated * Update build_censor.php * Update admin_words.php
This commit is contained in:
parent
126c75cd57
commit
5971379b6c
5 changed files with 35 additions and 7 deletions
21
library/includes/datastore/build_censor.php
Normal file
21
library/includes/datastore/build_censor.php
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* TorrentPier – Bull-powered BitTorrent tracker engine
|
||||
*
|
||||
* @copyright Copyright (c) 2005-2024 TorrentPier (https://torrentpier.com)
|
||||
* @link https://github.com/torrentpier/torrentpier for the canonical source repository
|
||||
* @license https://github.com/torrentpier/torrentpier/blob/master/LICENSE MIT License
|
||||
*/
|
||||
|
||||
if (!defined('BB_ROOT')) {
|
||||
die(basename(__FILE__));
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM " . BB_WORDS;
|
||||
$words = [];
|
||||
|
||||
foreach (DB()->fetch_rowset($sql) as $row) {
|
||||
$words[$row['word_id']] = $row;
|
||||
}
|
||||
|
||||
$this->store('censor', $words);
|
Loading…
Add table
Add a link
Reference in a new issue