PHPFusion\Forums\Moderator::mod_renew_thread PHP Метод

mod_renew_thread() приватный Метод

Moderator Action - Renew Thread Modal pop up confirmation of thread being renewed
private mod_renew_thread ( )
    private function mod_renew_thread()
    {
        $locale = fusion_get_locale();
        if (iMOD) {
            $result = dbquery("SELECT p.post_id, p.post_author, p.post_datestamp, f.forum_id, f.forum_cat\n\t\t\t\t\tFROM " . DB_FORUM_POSTS . " p\n\t\t\t\t\tINNER JOIN " . DB_FORUM_THREADS . " t ON p.thread_id=t.thread_id\n\t\t\t\t\tINNER JOIN " . DB_FORUMS . " f on f.forum_id = t.forum_id\n\t\t\t\t\tWHERE p.thread_id='" . intval($this->thread_id) . "' AND t.thread_hidden=0 AND p.post_hidden=0\n\t\t\t\t\tORDER BY p.post_id DESC LIMIT 1\n\t\t\t\t\t");
            if (dbrows($result) > 0) {
                $data = dbarray($result);
                dbquery("UPDATE " . DB_FORUM_POSTS . " SET post_datestamp='" . time() . "' WHERE post_id='" . $data['post_id'] . "'");
                dbquery("UPDATE " . DB_FORUM_THREADS . " SET thread_lastpost='" . time() . "', thread_lastpostid='" . $data['post_id'] . "', thread_lastuser='" . $data['post_author'] . "' WHERE thread_id='" . intval($this->thread_id) . "'");
                dbquery("UPDATE " . DB_FORUMS . " SET forum_lastpost='" . time() . "', forum_lastuser='" . $data['post_author'] . "' WHERE forum_id='" . $this->forum_id . "'");
                ob_start();
                echo openmodal('renew', $locale['forum_0758'], array('class' => 'modal-center', 'static' => 1));
                echo "<div style='text-align:center'><br />\n" . $locale['forum_0759'] . "<br /><br />\n";
                echo "<a href='" . INFUSIONS . "forum/index.php?viewforum&amp;forum_id=" . $this->forum_id . "&amp;parent_id=" . $this->parent_id . "'>" . $locale['forum_0702'] . "</a><br /><br />\n";
                echo "<a href='" . INFUSIONS . "forum/index.php'>" . $locale['forum_0703'] . "</a><br /><br /></div>\n";
                echo closemodal();
                add_to_footer(ob_get_contents());
                ob_end_clean();
            } else {
                redirect(INFUSIONS . "forum/index.php");
            }
        }
    }