Skip to content

Commit

Permalink
pkp/healthSciences#258 Resolve Smarty warning
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Dec 6, 2024
1 parent a3b36a3 commit cb47652
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions classes/template/PKPTemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ public function initialize(PKPRequest $request)
}

// Register custom functions
$this->registerPlugin('modifier', 'trim', trim(...));
$this->registerPlugin('modifier', 'date_format', $this->smartyDateFormat(...));
$this->registerPlugin('modifier', 'is_numeric', is_numeric(...));
$this->registerPlugin('modifier', 'get_class', get_class(...));
Expand Down Expand Up @@ -987,7 +988,7 @@ public function setupBackendPage()

if ($request->getContext()) {
if (count(array_intersect([Role::ROLE_ID_MANAGER, Role::ROLE_ID_SITE_ADMIN, Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_ASSISTANT, Role::ROLE_ID_REVIEWER, Role::ROLE_ID_AUTHOR], $userRoles))) {
if(Config::getVar('features', 'enable_new_submission_listing')) {
if (Config::getVar('features', 'enable_new_submission_listing')) {
if (count(array_intersect([Role::ROLE_ID_MANAGER, Role::ROLE_ID_SITE_ADMIN, Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_ASSISTANT], $userRoles))) {
$dashboardViews = Repo::submission()->getDashboardViews($request->getContext(), $request->getUser(), [Role::ROLE_ID_MANAGER, Role::ROLE_ID_SITE_ADMIN, Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_ASSISTANT]);
$requestedPage = $router->getRequestedPage($request);
Expand Down Expand Up @@ -1016,7 +1017,7 @@ public function setupBackendPage()
'submenu' => $viewsData
];
}
if(count(array_intersect([ Role::ROLE_ID_REVIEWER], $userRoles))) {
if (count(array_intersect([ Role::ROLE_ID_REVIEWER], $userRoles))) {
$dashboardViews = Repo::submission()->getDashboardViews($request->getContext(), $request->getUser(), [Role::ROLE_ID_REVIEWER]);
$requestedPage = $router->getRequestedPage($request);
$requestedOp = $router->getRequestedOp($request);
Expand All @@ -1037,7 +1038,7 @@ public function setupBackendPage()
'icon' => 'ReviewAssignments',
];
}
if(count(array_intersect([ Role::ROLE_ID_AUTHOR], $userRoles))) {
if (count(array_intersect([ Role::ROLE_ID_AUTHOR], $userRoles))) {
$dashboardViews = Repo::submission()->getDashboardViews($request->getContext(), $request->getUser(), [Role::ROLE_ID_AUTHOR]);
$requestedPage = $router->getRequestedPage($request);
$requestedOp = $router->getRequestedOp($request);
Expand Down

0 comments on commit cb47652

Please sign in to comment.