Skip to content

Commit

Permalink
pkp#8700 Namespaced PubObjectsExportPlugin constants
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed May 28, 2024
1 parent f5b69f8 commit 6fca5cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions classes/galley/DAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace PKP\galley;

use APP\facades\Repo;
use APP\plugins\PubObjectsExportPlugin;
use APP\publication\Publication;
use Illuminate\Database\Query\Builder;
use Illuminate\Support\Collection;
Expand Down Expand Up @@ -287,8 +288,7 @@ public function getExportable($contextId, $pubIdType = null, $title = null, $aut
if ($issueId) {
$params[] = (int) $issueId;
}
import('classes.plugins.PubObjectsExportPlugin'); // Constant
if ($pubIdSettingName && $pubIdSettingValue && $pubIdSettingValue != EXPORT_STATUS_NOT_DEPOSITED) {
if ($pubIdSettingName && $pubIdSettingValue && $pubIdSettingValue != PubObjectsExportPlugin::EXPORT_STATUS_NOT_DEPOSITED) {
$params[] = $pubIdSettingValue;
}

Expand All @@ -311,8 +311,8 @@ public function getExportable($contextId, $pubIdType = null, $title = null, $aut
. ($title != null ? ' AND (pst.setting_name = ? AND pst.setting_value LIKE ?)' : '')
. ($author != null ? ' AND (asgs.setting_value LIKE ? OR asfs.setting_value LIKE ?)' : '')
. ($issueId != null ? ' AND (ps.setting_name = \'issueId\' AND ps.setting_value = ? AND ps.locale = \'\'' : '')
. (($pubIdSettingName != null && $pubIdSettingValue != null && $pubIdSettingValue == EXPORT_STATUS_NOT_DEPOSITED) ? ' AND gss.setting_value IS NULL' : '')
. (($pubIdSettingName != null && $pubIdSettingValue != null && $pubIdSettingValue != EXPORT_STATUS_NOT_DEPOSITED) ? ' AND gss.setting_value = ?' : '')
. (($pubIdSettingName != null && $pubIdSettingValue != null && $pubIdSettingValue == PubObjectsExportPlugin::EXPORT_STATUS_NOT_DEPOSITED) ? ' AND gss.setting_value IS NULL' : '')
. (($pubIdSettingName != null && $pubIdSettingValue != null && $pubIdSettingValue != PubObjectsExportPlugin::EXPORT_STATUS_NOT_DEPOSITED) ? ' AND gss.setting_value = ?' : '')
. (($pubIdSettingName != null && is_null($pubIdSettingValue)) ? ' AND (gss.setting_value IS NULL OR gss.setting_value = \'\')' : '');

$result = $this->deprecatedDao->retrieveRange(
Expand Down

0 comments on commit 6fca5cb

Please sign in to comment.