The problem is probably that these accepted-then-archived papers remain listed in the "published_papers" table of the database. I'm hesitant to simply delete these entries directly into the database (any side effect?), so as a workaround, we must tell the SQL query to also check the status of the paper in the "papers" table:
In PaperSearchDAO.inc.php, add near the top an "import('paper.Paper');" which contains the definition of "SUBMISSION_STATUS_PUBLISHED".
Then add to the SQL query in function getPhraseResults the following:
"papers pp," in the FROM section
" pa.paper_id = pp.paper_id AND" in the WHERE section
"pp.status = ' . SUBMISSION_STATUS_PUBLISHED . ' AND" in the WHERE section.
Here is how the query looks like afterwards:
- Code: Select all
$result = &$this->retrieveCached(
COUNT(*) AS count
NATURAL JOIN ' . $sqlFrom . '
pa.paper_id = o.paper_id AND
pa.paper_id = pp.paper_id AND
pp.status = ' . SUBMISSION_STATUS_PUBLISHED . ' AND
i.sched_conf_id = pa.sched_conf_id AND ' .
$sqlWhere . '
GROUP BY o.paper_id
ORDER BY count DESC
LIMIT ' . $limit,
3600 * $cacheHours // Cache for 24 hours
I don't know if it may prevent some results to show up or induce other side effects but I don't see any reason why a paper that has its status "PUBLISHED" in the table "papers" whould not be listed in the table "published_papers" anyway. The contrary appears to be the problem: a paper listed in "published_papers" may have its status entry not being set to "PUBLISHED" in the table "papers".
Anyway, use it at your own risks!