예제 #1
0
 /**
  * コンストラクタ
  */
 protected function __construct(ThreadRead $aThread, $matome = false)
 {
     global $_conf;
     // スレッドオブジェクトを登録
     $this->thread = $aThread;
     $this->str_to_link_regex = $this->_buildStrToLinkRegex();
     // まとめ読みモードか否か
     if ($matome) {
         $this->_matome = ++self::$_matome_count;
     } else {
         $this->_matome = false;
     }
     $this->_url_handlers = array();
     $this->_user_url_handlers = array();
     $this->_ngaborn_frequent = 0;
     if ($_conf['ngaborn_frequent']) {
         if ($_conf['ngaborn_frequent_dayres'] == 0) {
             $this->_ngaborn_frequent = $_conf['ngaborn_frequent'];
         } elseif ($this->thread->setDayRes() && $this->thread->dayres < $_conf['ngaborn_frequent_dayres']) {
             $this->_ngaborn_frequent = $_conf['ngaborn_frequent'];
         }
     }
     $this->_has_ngaborns = false;
     $this->_aborn_nums = array();
     $this->_ng_nums = array();
     if (P2Util::isHostBbsPink($this->thread->host)) {
         $this->_redirector = self::REDIRECTOR_PINKTOWER;
     } elseif (P2Util::isHost2chs($this->thread->host)) {
         $this->_redirector = self::REDIRECTOR_IMENU;
     } elseif (P2Util::isHostMachiBbs($this->thread->host)) {
         $this->_redirector = self::REDIRECTOR_MACHIBBS;
     } else {
         $this->_redirector = self::REDIRECTOR_NONE;
     }
     $this->_quote_res_nums = array();
     $this->_quote_res_nums_checked = array();
     $this->_quote_res_nums_done = array();
 }