Exemple #1
0
 public function display_thread()
 {
     $info = $this->thread()->get_threadInfo();
     if (isset($_GET['action'])) {
         $poll = new Poll($info);
         switch ($_GET['action']) {
             case 'editpoll':
                 $poll->render_poll_form(true);
                 break;
             case 'deletepoll':
                 $poll->delete_poll();
                 break;
             case 'newpoll':
                 $poll->render_poll_form();
                 break;
             case 'edit':
                 $this->render_edit_form();
                 break;
             case 'reply':
                 $this->render_reply_form();
                 break;
             default:
                 redirect(clean_request('', array('action'), false));
         }
     } else {
         $response = self::check_download_request();
         if ($response == true) {
             redirect(clean_request("", array("getfile"), false));
         }
         // +1 threadviews
         $this->increment_thread_views($info['thread']['thread_id']);
         // +1 see who is viewing thread
         $this->thread()->set_thread_visitor();
         if ($info['thread']['forum_users'] == true) {
             $info['thread_users'] = $this->get_participated_users($info);
         }
         render_thread($info);
     }
 }
Exemple #2
0
        case 'reply':
            $thread->render_reply_form();
            break;
        default:
            redirect(clean_request('', array('action'), false));
    }
} else {
    $info = $thread->get_thread_data();
    // +1 threadviews
    $thread::increment_thread_views($info['thread']['thread_id']);
    // +1 see who is viewing thread
    $thread->set_thread_visitor();
    if ($info['thread']['forum_users'] == true) {
        $info['thread_users'] = $thread->get_participated_users($info);
    }
    render_thread($info);
}
/* Errors */
/* changed
if (isset($_GET['error'])) {
	if ($_GET['error'] == 'vote') {
		notify($locale['forum_0800'], $locale['forum_0801']);
	} elseif ($_GET['error'] == 'vote_self') {
		notify($locale['forum_0800'], $locale['forum_0802']);
	}
}

/* Jumps to last links -- there is another with pid in Line 264 */
/*
if (isset($_GET['pid']) && isnum($_GET['pid'])) {
	$result = dbquery("SELECT thread_id FROM ".DB_FORUM_POSTS." WHERE post_id='".$_GET['pid']."'");