private function get_private_reply_sql(stdClass $user, bool $canseeprivatereplies) {
        $params = [];
        $privatewhere = '';
        if (!$canseeprivatereplies) {
            $privatewhere = ' AND (p.privatereplyto = :privatereplyto OR p.userid = :privatereplyfrom OR p.privatereplyto = 0)';
            $params['privatereplyto'] = $user->id;
            $params['privatereplyfrom'] = $user->id;
        }

        return [
            'where' => $privatewhere,
            'params' => $params,
        ];
    }
private function get_private_reply_sql(stdClass $user, bool $canseeprivatereplies) {
        $params = [];
        $privatewhere = '';
        if (!$canseeprivatereplies) {
            $privatewhere = ' AND (p.privatereplyto = :privatereplyto OR p.userid = :privatereplyfrom OR p.privatereplyto = 0)';
            $params['privatereplyto'] = $user->id;
            $params['privatereplyfrom'] = $user->id;
        }

        return [
            'where' => $privatewhere,
            'params' => $params,
        ];
    }
private function get_private_reply_sql ( stdClass $ user , bool $ canseeprivatereplies ) { $ params = [ ] ; $ privatewhere = '' ; if ( ! $ canseeprivatereplies ) { $ privatewhere = ' AND (p.privatereplyto = :privatereplyto OR p.userid = :privatereplyfrom OR p.privatereplyto = 0)' ; $ params [ 'privatereplyto' ] = $ user -> id ; $ params [ 'privatereplyfrom' ] = $ user -> id ; } return [ 'where' => $ privatewhere , 'params' => $ params , ] ; }
Get the SQL where and additional parameters to use to restrict posts to private reply posts.

@param   stdClass    $user The user to fetch counts for
@param   bool        $canseeprivatereplies Whether this user can see all private replies or not
@return  array       The SQL WHERE clause, and parameters to use in the SQL.
Get the SQL where and additional parameters to use to restrict posts to private reply posts .