<commit_before><?php
// p2 - ݗ̃NX

/**
 * XL̃NX
 */
class ResArticle{
    var $name;
    var $mail;
    var $daytime;
    var $msg;
    var $ttitle;
    var $host;
    var $bbs;
    var $itaj;
    var $key;
    var $resnum;
    var $order; // Lԍ
}

/**
 * ݃ÕNX
 */
class ResHist{
    var $articles; // NX ResArticle ̃IuWFNgi[z
    var $num; // i[ꂽ BrdMenuCate IuWFNg̐
    
    var $resrange; // array( 'start' => i, 'to' => i, 'nofirst' => bool )
    
    /**
     * RXgN^
     */
    function ResHist()
    {
        $this->articles = array();
        $this->num = 0;
    }
    
    /**
     * ݃O lines p[Xēǂݍ
     *
     * @param  array    $lines
     * @return boolean  
     */
    function readLines($lines)
    {
        $n = 1;
        if (!is_array($lines)) {
            trigger_error(__FUNCTION__ . '(), ' . 'illegal argument', E_USER_WARNING);
            return false;
        }
        
        foreach ($lines as $aline) {

            $aResArticle =& new ResArticle();
    
            $resar = explode("<>", rtrim($aline));
            $aResArticle->name  = $resar[0];
            $aResArticle->mail  = $resar[1];
            $aResArticle->daytime = $resar[2];
            $aResArticle->msg   = $resar[3];
            $aResArticle->ttitle = $resar[4];
            $aResArticle->host  = $resar[5];
            $aResArticle->bbs   = $resar[6];
            if (!$aResArticle->itaj  = P2Util::getItaName($aResArticle->host, $aResArticle->bbs)) {
                $aResArticle->itaj = $aResArticle->bbs;
            }
            $aResArticle->key   = $resar[7];
            $aResArticle->resnum = $resar[8];
    
            $this->addRes($aResArticle);
    
            $n++;
        }
        return true;
    }
    
    /**
     * Xǉ
     *
     * @return void
     */
    function addRes(&$aResArticle)
    {
        $this->articles[] =& $aResArticle;
        $this->num++;
    }    
    
    /**
     * XL\ PCp
     *
     * @return void
     */
    function showArticles()
    {
        global $_conf, $STYLE;
        
        $sid_q = (defined('SID')) ? '&amp;' . strip_tags(SID) : '';<commit_msg>bug fixed: add, $aResArticle->order = $n;<commit_after><?php
// p2 - ݗ̃NX

/**
 * XL̃NX
 */
class ResArticle{
    var $name;
    var $mail;
    var $daytime;
    var $msg;
    var $ttitle;
    var $host;
    var $bbs;
    var $itaj;
    var $key;
    var $resnum;
    var $order; // Lԍ
}

/**
 * ݃ÕNX
 */
class ResHist{
    var $articles; // NX ResArticle ̃IuWFNgi[z
    var $num; // i[ꂽ BrdMenuCate IuWFNg̐
    
    var $resrange; // array( 'start' => i, 'to' => i, 'nofirst' => bool )
    
    /**
     * RXgN^
     */
    function ResHist()
    {
        $this->articles = array();
        $this->num = 0;
    }
    
    /**
     * ݃O lines p[Xēǂݍ
     *
     * @param  array    $lines
     * @return boolean  
     */
    function readLines($lines)
    {
        $n = 1;
        if (!is_array($lines)) {
            trigger_error(__FUNCTION__ . '(), ' . 'illegal argument', E_USER_WARNING);
            return false;
        }
        
        foreach ($lines as $aline) {

            $aResArticle =& new ResArticle();
    
            $resar = explode("<>", rtrim($aline));
            $aResArticle->name  = $resar[0];
            $aResArticle->mail  = $resar[1];
            $aResArticle->daytime = $resar[2];
            $aResArticle->msg   = $resar[3];
            $aResArticle->ttitle = $resar[4];
            $aResArticle->host  = $resar[5];
            $aResArticle->bbs   = $resar[6];
            if (!$aResArticle->itaj  = P2Util::getItaName($aResArticle->host, $aResArticle->bbs)) {
                $aResArticle->itaj = $aResArticle->bbs;
            }
            $aResArticle->key   = $resar[7];
            $aResArticle->resnum = $resar[8];
            
            $aResArticle->order = $n;
            
            $this->addRes($aResArticle);
    
            $n++;
        }
        return true;
    }
    
    /**
     * Xǉ
     *
     * @return void
     */
    function addRes(&$aResArticle)
    {
        $this->articles[] =& $aResArticle;
        $this->num++;
    }    
    
    /**
     * XL\ PCp
     *
     * @return void
     */
    function showArticles()
    {
        global $_conf, $STYLE;
        
        $sid_q = (defined('SID')) ? '&amp;' . strip_tags(SID) : '';
{'fraction_non_alphanumeric': 0.1671683260013892, 'fraction_numerical': 0.006019912016670526, 'mean_word_length': 1.4799081515499426, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 51, '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': '4500497', 'n_tokens_mistral': 1637, 'n_tokens_neox': 1569, 'n_words': 280}