$perpage = $perpage ? $perpage : 20;
$sorturl = 'group.php?' . $vbulletin->session->vars['sessionurl'] . "do=$doaction" . ($perpage != 20 ? "&pp=$perpage" : '');