<commit_before><?php
/**
 * TorrentPier – Bull-powered BitTorrent tracker engine
 *
 * @copyright Copyright (c) 2005-2018 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
 */

namespace TorrentPier\Legacy;

/**
 * Class Atom
 * @package TorrentPier\Legacy
 */
class Atom
{
    /**
     * Update forum feed
     *
     * @param int $forum_id
     * @param array $forum_data
     *
     * @return bool
     */
    public static function update_forum_feed($forum_id, $forum_data)
    {
        global $bb_cfg, $lang;
        $file_path = $bb_cfg['atom']['path'] . '/f/' . $forum_id . '.atom';
        $select_tor_sql = $join_tor_sql = '';
        if ($forum_id == 0) {
            $forum_data['forum_name'] = $lang['ATOM_GLOBAL_FEED'];
        }
        if ($forum_id > 0 && $forum_data['allow_reg_tracker']) {<commit_msg>Fix global atom feed name<commit_after><?php
/**
 * TorrentPier – Bull-powered BitTorrent tracker engine
 *
 * @copyright Copyright (c) 2005-2018 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
 */

namespace TorrentPier\Legacy;

/**
 * Class Atom
 * @package TorrentPier\Legacy
 */
class Atom
{
    /**
     * Update forum feed
     *
     * @param int $forum_id
     * @param array $forum_data
     *
     * @return bool
     */
    public static function update_forum_feed($forum_id, $forum_data)
    {
        global $bb_cfg, $lang;
        $file_path = $bb_cfg['atom']['path'] . '/f/' . $forum_id . '.atom';
        $select_tor_sql = $join_tor_sql = '';
        if ($forum_id == 0) {
            $forum_data['forum_name'] = $lang['ATOM_GLOBAL_FEED'] ?? $bb_cfg['server_name'];
        }
        if ($forum_id > 0 && $forum_data['allow_reg_tracker']) {
{'fraction_non_alphanumeric': 0.14519326065411298, 'fraction_numerical': 0.009910802775024777, 'mean_word_length': 2.860420650095602, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6772448', 'n_tokens_mistral': 717, 'n_tokens_neox': 670, 'n_words': 139}