Skip to content

Commit

Permalink
pkp/pkp-lib#8333 Replaced CONTEXT_ID_NONE by SITE_CONTEXT_ID
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jul 23, 2024
1 parent 908ab97 commit e2ddc3c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions classes/services/NavigationMenuService.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function __construct()
*/
public function getMenuItemTypesCallback($hookName, $args)
{
$types = & $args[0];
$types = &$args[0];

$ompTypes = [
self::NMI_TYPE_CATALOG => [
Expand All @@ -64,7 +64,7 @@ public function getMenuItemTypesCallback($hookName, $args)

$request = Application::get()->getRequest();
$context = $request->getContext();
$contextId = $context ? $context->getId() : Application::CONTEXT_ID_NONE;
$contextId = $context?->getId() ?? Application::SITE_CONTEXT_ID;

$series = Repo::section()
->getCollector()
Expand Down Expand Up @@ -109,7 +109,7 @@ public function getMenuItemTypesCallback($hookName, $args)
*/
public function getMenuItemCustomEditTemplatesCallback($hookName, $args)
{
$templates = & $args[0];
$templates = &$args[0];

$ompTemplates = [
self::NMI_TYPE_CATEGORY => [
Expand All @@ -131,7 +131,7 @@ public function getMenuItemCustomEditTemplatesCallback($hookName, $args)
*/
public function getDisplayStatusCallback($hookName, $args)
{
$navigationMenuItem = & $args[0];
$navigationMenuItem = &$args[0];

$request = Application::get()->getRequest();
$dispatcher = $request->getDispatcher();
Expand All @@ -140,7 +140,7 @@ public function getDisplayStatusCallback($hookName, $args)
$isUserLoggedIn = Validation::isLoggedIn();
$isUserLoggedInAs = (bool) Validation::loggedInAs();
$context = $request->getContext();
$contextId = $context ? $context->getId() : Application::CONTEXT_ID_NONE;
$contextId = $context?->getId() ?? Application::SITE_CONTEXT_ID;

$this->transformNavMenuItemTitle($templateMgr, $navigationMenuItem);

Expand Down
2 changes: 1 addition & 1 deletion classes/submission/Collector.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function getQueryBuilder(): Builder
$assocType = Application::ASSOC_TYPE_PRESS;
$assocIds = is_array($this->contextIds)
? $this->contextIds
: [Application::CONTEXT_ID_NONE];
: [Application::SITE_CONTEXT_ID];
}

$q->leftJoin('features as sf', function ($join) use ($assocType, $assocIds) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function fetch($request, $template = null, $display = false)

$request = Application::get()->getRequest();
$context = $request->getContext();
$contextId = $context ? $context->getId() : Application::CONTEXT_ID_NONE;
$contextId = $context?->getId() ?? Application::SITE_CONTEXT_ID;

$series = Repo::section()
->getCollector()
Expand Down

0 comments on commit e2ddc3c

Please sign in to comment.