Skip to content

Commit

Permalink
pkp/pkp-lib#5023 Fix obsolete constant name
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Aug 28, 2019
1 parent b8b8152 commit 645e640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions classes/search/ArticleSearch.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ function getSparseArray($unorderedResults, $orderBy, $orderDir, $exclude) {
$orderBy = 'score';
} else {
// Retrieve a metrics report for all articles.
$column = STATISTICS_DIMENSION_ARTICLE_ID;
$column = STATISTICS_DIMENSION_SUBMISSION_ID;
$filter = array(
STATISTICS_DIMENSION_ASSOC_TYPE => array(ASSOC_TYPE_GALLEY, ASSOC_TYPE_SUBMISSION),
STATISTICS_DIMENSION_ARTICLE_ID => array(array_keys($unorderedResults))
STATISTICS_DIMENSION_SUBMISSION_ID => array(array_keys($unorderedResults))
);
if ($orderBy == 'popularityMonth') {
$oneMonthAgo = date('Ymd', strtotime('-1 month'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ function callbackTemplateArticlePageFooter($hookName, $params) {
$application = Application::getApplication();
$metricType = $application->getDefaultMetricType();
if (empty($metricType)) $smarty->assign('noMetricSelected', true);
$column = STATISTICS_DIMENSION_ARTICLE_ID;
$column = STATISTICS_DIMENSION_SUBMISSION_ID;
$filter = array(
STATISTICS_DIMENSION_ASSOC_TYPE => array(ASSOC_TYPE_GALLEY, ASSOC_TYPE_SUBMISSION),
STATISTICS_DIMENSION_ARTICLE_ID => array($results)
STATISTICS_DIMENSION_SUBMISSION_ID => array($results)
);
$orderBy = array(STATISTICS_METRIC => STATISTICS_ORDER_DESC);
$statsReport = $application->getMetrics($metricType, $column, $filter, $orderBy);
Expand Down

0 comments on commit 645e640

Please sign in to comment.