Skip to content
This repository was archived by the owner on Dec 14, 2021. It is now read-only.

Commit 292bdab

Browse files
author
Hüseyin Mert
authored
Merge pull request #1689 from ojs/hotfix/lockss-manifest
update article list query
2 parents 1a7ddfe + 8917eff commit 292bdab

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Ojs/SiteBundle/Controller/LockssController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Ojs\SiteBundle\Controller;
44

55
use Ojs\CoreBundle\Controller\OjsController;
6+
use Ojs\CoreBundle\Params\ArticleStatuses;
67
use Ojs\JournalBundle\Entity\Journal;
78
use Symfony\Component\HttpFoundation\Response;
89
use Doctrine\ORM\Query\ResultSetMapping;
@@ -73,8 +74,8 @@ public function monthAction($slug, $year, $month)
7374

7475
$monthKey = array_search($month, $months);
7576

76-
$sql = 'SELECT id,doi FROM article WHERE doi is not null AND EXTRACT(YEAR FROM created) ='.$year;
77-
$sql .= 'AND EXTRACT(MONTH FROM created) ='.$monthKey;
77+
$sql = 'SELECT id,doi FROM article WHERE doi is not null AND journal_id = '.$journal->getId().' AND status = '.ArticleStatuses::STATUS_PUBLISHED.' AND EXTRACT(YEAR FROM pubdate) ='.$year;
78+
$sql .= 'AND EXTRACT(MONTH FROM pubdate) ='.$monthKey;
7879

7980
$rsm = new ResultSetMapping();
8081
$rsm->addScalarResult('id','id');

0 commit comments

Comments
 (0)