DiscussionsController::sort PHP Method

sort() public method

Set user preference for sorting discussions.
public sort ( string $Target = '' )
$Target string The target to redirect to.
    public function sort($Target = '')
    {
        deprecated("sort");
        if (!Gdn::session()->isValid()) {
            throw permissionException();
        }
        if (!$this->Request->isAuthenticatedPostBack()) {
            throw forbiddenException('GET');
        }
        if ($Target) {
            redirect($Target);
        }
        // Send sorted discussions.
        $this->setData('Deprecated', true);
        $this->deliveryMethod(DELIVERY_METHOD_JSON);
        $this->render();
    }