Skip to content

Commit

Permalink
#8333 Fixes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasraoni committed Jul 24, 2024
1 parent c74e54c commit 43c7374
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions classes/navigationMenu/NavigationMenuDAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public function installSettings(?int $contextId, string $filename): bool
$xmlParser = new PKPXMLParser();
$tree = $xmlParser->parse($filename);

if ($contextId === Application::SITE_CONTEXT_ID) {
if ($contextId == Application::SITE_CONTEXT_ID) {
$siteDao = DAORegistry::getDAO('SiteDAO'); /** @var SiteDAO $siteDao */
$site = $siteDao->getSite();
}
Expand All @@ -198,7 +198,7 @@ public function installSettings(?int $contextId, string $filename): bool

foreach ($tree->getChildren() as $navigationMenuNode) {
$site = $navigationMenuNode->getAttribute('site');
if ($contextId === Application::SITE_CONTEXT_ID && !$site) {
if ($contextId == Application::SITE_CONTEXT_ID && !$site) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion classes/navigationMenu/NavigationMenuItemDAO.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function getByTypeAndTitleLocaleKey(?int $contextId, string $menuItemType
*
* @return DAOResultFactory<NavigationMenuItem>
*/
public function getByType(string $type, ?int $contextId = Application::SITE_CONTEXT_ID_ALL)
public function getByType(string $type, ?int $contextId = Application::SITE_CONTEXT_ID_ALL): DAOResultFactory
{
$params = [$type];
if ($contextId !== Application::SITE_CONTEXT_ID_ALL) {
Expand Down

0 comments on commit 43c7374

Please sign in to comment.