private static function try_list($opt, $listtype, $sort = null) { global $Conf, $Me; if ($listtype == "u" && $Me->privChair) { $searchtype = defval($opt, "t") === "all" ? "all" : "pc"; $q = "select contactId from ContactInfo"; if ($searchtype == "pc") { $q .= " where (roles&" . Contact::ROLE_PC . ")!=0"; } $result = Dbl::ql("{$q} order by lastName, firstName, email"); $a = array(); while ($row = edb_row($result)) { $a[] = (int) $row[0]; } Dbl::free($result); return self::create("u/" . $searchtype, $a, $searchtype == "pc" ? "Program committee" : "Users", hoturl_site_relative_raw("users", "t={$searchtype}")); } else { $search = new PaperSearch($Me, $opt); $x = $search->session_list_object($sort); if ($sort || $search->has_sort()) { $pl = new PaperList($search, array("sort" => $sort)); $x->ids = $pl->id_array(); } return $x; } }