torrentpier/library/includes/datastore/build_censor.php
Roman Kelesidis 5971379b6c
Word censor code optimization (#1537)
* Word censor code optimization

* Update CHANGELOG.md

* Updated

* Updated

* Update build_censor.php

* Update admin_words.php
2024-07-13 13:00:46 +07:00

22 lines
559 B
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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);