<commit_before><div class="container">
    <div class="hero-unit visible-desktop visible-tablet">
        <h1>Forums</h1>
        <p>
            The ultimate community site, where beginners to seasoned players can 
            interact with one another and talk about their passion.
        </p>
    </div>
    <ul class="breadcrumb" id="top">
        <li><a href="<?=$this->url(array(
            'module' => 'community',
            'controller' => 'forum',
            'action' => 'index'
        ))?>">Forums</a></li>
        <? 
        foreach($this->breadcrumbs->getPages() as $page)
        {
            if(!$page->active){
            ?>
            <li class="divider">/</li>
            <li><a href="<?=$this->url(array(
                'module' => $page->module,
                'controller' => $page->controller,
                'action' => $page->action,
                'id' => $page->id
            ))?>"><?=$page->label?></a></li>
            <?
            }else{
            ?>
            <li class="divider">/</li>
            <li><?=$page->label?></li>
            <?
            }
        }
        ?>
    </ul>
    <table class="table table-striped table-bordered" id="<?=str_replace(" ", "",$this->forum->getName())?>">
        <thead style="margin-bottom:10px;">
            <tr>
                <h3 class="pull-left"><span rel="tooltip" title="<?=$this->forum->getDescription()?>"class="headertip"><?=ucwords($this->forum->getName())?></span></h3>
            </tr>
            <tr><a href="<?=$this->url(array(
                    'module' => 'community',
                    'controller' => 'thread',
                    'action' => 'add',
                    'forum' => $this->forum->getId()
                ))?>" class="btn btn-primary btn-mini pull-right"><i class="icon-comment icon-white"></i> New Thread</a></tr>
        </thead>
        <tbody>
        <?
        foreach($this->forum->getThreads() as $thread)
        {
            ?>
            <tr>
                <td class="span8">
                    <h4 class="pull-left">
                        <a href="<?=$this->url(array(
                            'module' => 'community',
                            'controller' => 'post',
                            'action' => 'index',
                            'thread' => $thread->getId()
                        ))?>"><i class="<? echo ($thread->locked ? 'icon-folder-close' : 'icon-folder-open');?>"></i> <?=ucwords($thread->getName())?></a> <small class="visible-desktop visible-tablet"><?=$thread->getDescription()?></small>
                    </h4><commit_msg>added check to whether forum is open or locked to prevent new posts<commit_after><div class="container">
    <div class="hero-unit visible-desktop visible-tablet">
        <h1>Forums</h1>
        <p>
            The ultimate community site, where beginners to seasoned players can 
            interact with one another and talk about their passion.
        </p>
    </div>
    <ul class="breadcrumb" id="top">
        <li><a href="<?=$this->url(array(
            'module' => 'community',
            'controller' => 'forum',
            'action' => 'index'
        ))?>">Forums</a></li>
        <? 
        foreach($this->breadcrumbs->getPages() as $page)
        {
            if(!$page->active){
            ?>
            <li class="divider">/</li>
            <li><a href="<?=$this->url(array(
                'module' => $page->module,
                'controller' => $page->controller,
                'action' => $page->action,
                'id' => $page->id
            ))?>"><?=$page->label?></a></li>
            <?
            }else{
            ?>
            <li class="divider">/</li>
            <li><?=$page->label?></li>
            <?
            }
        }
        ?>
    </ul>
    <table class="table table-striped table-bordered" id="<?=str_replace(" ", "",$this->forum->getName())?>">
        <thead style="margin-bottom:10px;">
            <tr>
                <h3 class="pull-left"><span rel="tooltip" title="<?=$this->forum->getDescription()?>"class="headertip"><?=ucwords($this->forum->getName())?></span></h3>
            </tr>
            <tr>
            <? if($this->forum->open){ ?>
            <a href="<?=$this->url(array(
                    'module' => 'community',
                    'controller' => 'thread',
                    'action' => 'add',
                    'forum' => $this->forum->getId()
                ))?>" class="btn btn-primary btn-mini pull-right"><i class="icon-comment icon-white"></i> New Thread</a>
            <? } ?>
            </tr>
        </thead>
        <tbody>
        <?
        foreach($this->forum->getThreads() as $thread)
        {
            ?>
            <tr>
                <td class="span8">
                    <h4 class="pull-left">
                        <a href="<?=$this->url(array(
                            'module' => 'community',
                            'controller' => 'post',
                            'action' => 'index',
                            'thread' => $thread->getId()
                        ))?>"><i class="<? echo ($thread->locked ? 'icon-folder-close' : 'icon-folder-open');?>"></i> <?=ucwords($thread->getName())?></a> <small class="visible-desktop visible-tablet"><?=$thread->getDescription()?></small>
                    </h4>
{'fraction_non_alphanumeric': 0.19966442953020133, 'fraction_numerical': 0.003355704697986577, 'mean_word_length': 1.5105287786616752, 'pattern_counts': {'":': 0, '<': 135, '<?xml version=': 0, '>': 221, 'https://': 0, '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': '5042761', 'n_tokens_mistral': 1536, 'n_tokens_neox': 1504, 'n_words': 266}