$aThread->setDayRes($nowtime); // 生存数set if ($aThread->isonline) { $online_num++; } // リストに追加 $aThreadList->addThread($aThread); unset($aThread); $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('FORLOOP_HIP'); } $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('FORLOOP'); $GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('FOOT'); // 既にdat落ちしているスレは自動的にあぼーんを解除する autoTAbornOff($aThreadList, $ta_keys); // ソート sortThreads($aThreadList); //=============================================================== // プリント //=============================================================== // 携帯 if ($_conf['ktai']) { // {{{ 倉庫にtorder付与 if ($aThreadList->spmode == "soko") { if ($aThreadList->threads) { $soko_torder = 1; $newthreads = array(); foreach ($aThreadList->threads as $at) { $at->torder = $soko_torder++; $newthreads[] = $at; unset($at); }
function get_all_threads($daerahUser, $id) { $data = array('threads.*', 'categories.category_name'); $threadsByTACategory = $this->getThreadsByTACategory($id, $data); $threadsByTATopic = $this->getThreadsByTATopic($id, $data); $threadsByTAId = $this->getThreadsByTAId($id, $data); $closeThreads = $this->getThreadsByClose($id, $data); $userThreads = $this->get_threads_by_user($daerahUser, $id); $allThreads = array(); foreach ($threadsByTATopic as $tbt) { if (!in_array($tbt, $allThreads)) { $allThreads[] = $tbt; } } foreach ($threadsByTACategory as $tbc) { if (!in_array($tbc, $allThreads)) { $allThreads[] = $tbc; } } foreach ($closeThreads as $tbi) { if (!in_array($tbi, $allThreads)) { $allThreads[] = $tbi; } } foreach ($threadsByTAId as $tbi) { if (!in_array($tbi, $allThreads)) { $allThreads[] = $tbi; } } foreach ($userThreads as $tbt) { if (!in_array($tbt, $allThreads)) { $allThreads[] = $tbt; } } $categories = $this->get_categories(); $result = sortThreads($allThreads, $categories); return $result; }