예제 #1
0
            $where[] = "paperId={$p}";
            $where[] = "action like '%(papers% {$p},%'";
            $where[] = "action like '%(papers% {$p})%'";
        }
        $wheres[] = "(" . join(" or ", $where) . ")";
    } else {
        if (!count($Search->warnings)) {
            $Conf->warnMsg("No papers match that search.");
        }
        $wheres[] = "false";
    }
}
if ($_REQUEST["acct"]) {
    $ids = array();
    $accts = $_REQUEST["acct"];
    while ($word = PaperSearch::pop_word($accts)) {
        $flags = ContactSearch::F_TAG;
        if (substr($word, 0, 1) === "\"") {
            $flags |= ContactSearch::F_QUOTED;
            $word = preg_replace(',(?:\\A"|"\\z),', "", $word);
        }
        $Search = new ContactSearch($flags, $word, $Me);
        foreach ($Search->ids as $id) {
            $ids[$id] = $id;
        }
    }
    $where = array();
    if (count($ids)) {
        $result = Dbl::qe("select contactId, email from ContactInfo where contactId ?a", $ids);
        while ($row = edb_row($result)) {
            $where[] = "contactId={$row['0']}";