Skip to content

Commit

Permalink
Reduce Smarty warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Jun 22, 2024
1 parent 55cbbea commit e9acec2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions classes/template/TemplateManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
use APP\core\Application;
use APP\core\PageRouter;
use APP\file\PublicFileManager;
use APP\journal\Journal;
use PKP\config\Config;
use PKP\core\PKPSessionGuard;
use PKP\facades\Locale;
Expand Down Expand Up @@ -60,6 +61,8 @@ public function initialize($request)
$this->assign('sitePublicFilesDir', $siteFilesDir);
$this->assign('publicFilesDir', $siteFilesDir); // May be overridden by journal

$this->registerClass(Journal::class, Journal::class);

if ($site->getData('styleSheet')) {
$this->addStyleSheet(
'siteStylesheet',
Expand Down
2 changes: 1 addition & 1 deletion plugins/importexport/native/templates/results.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<ul>
{foreach from=$content item=contentItem}
<li>
{if $contentItem instanceof \APP\submission\Submission}
{if $contentItem instanceof APP\submission\Submission}
{$contentItem->getLocalizedTitle()|strip_unsafe_html}</li>
{else}
{$contentItem->getIssueIdentification()|escape}
Expand Down
2 changes: 1 addition & 1 deletion templates/frontend/objects/article_details.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<article class="obj_article_details">

{* Indicate if this is only a preview *}
{if $publication->getData('status') !== \PKP\submission\PKPSubmission::STATUS_PUBLISHED}
{if $publication->getData('status') !== PKP\submission\PKPSubmission::STATUS_PUBLISHED}
<div class="cmp_notification notice">
{capture assign="submissionUrl"}{url page="workflow" op="access" path=$article->getId()}{/capture}
{translate key="submission.viewingPreview" url=$submissionUrl}
Expand Down
4 changes: 2 additions & 2 deletions templates/frontend/objects/article_summary.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{assign var="heading" value="h2"}
{/if}

{if (!$section.hideAuthor && $publication->getData('hideAuthor') == APP\submission\Submission::AUTHOR_TOC_DEFAULT) || $publication->getData('hideAuthor') == \APP\submission\Submission::AUTHOR_TOC_SHOW}
{if (!$section.hideAuthor && $publication->getData('hideAuthor') == APP\submission\Submission::AUTHOR_TOC_DEFAULT) || $publication->getData('hideAuthor') == APP\submission\Submission::AUTHOR_TOC_SHOW}
{assign var="showAuthor" value=true}
{/if}

Expand Down Expand Up @@ -94,7 +94,7 @@
{/if}
<li>
{assign var="hasArticleAccess" value=$hasAccess}
{if $currentContext->getSetting('publishingMode') == \APP\journal\Journal::PUBLISHING_MODE_OPEN || $publication->getData('accessStatus') == \APP\submission\Submission::ARTICLE_ACCESS_OPEN}
{if $currentContext->getSetting('publishingMode') == APP\journal\Journal::PUBLISHING_MODE_OPEN || $publication->getData('accessStatus') == APP\submission\Submission::ARTICLE_ACCESS_OPEN}
{assign var="hasArticleAccess" value=1}
{/if}
{assign var="id" value="article-{$article->getId()}-galley-{$galley->getId()}"}
Expand Down
4 changes: 2 additions & 2 deletions templates/frontend/objects/galley_link.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
{/if}

{* Get path for URL *}
{if $parent instanceOf \APP\issue\Issue}
{if $parent instanceOf APP\issue\Issue}
{assign var="page" value="issue"}
{assign var="parentId" value=$parent->getBestIssueId()}
{assign var="path" value=$parentId|to_array:$galley->getBestGalleyId()}
{else}{* \APP\submission\Submission *}
{else}{* APP\submission\Submission *}
{assign var="page" value="article"}
{if $publication}
{if $publication->getId() !== $parent->getData('currentPublicationId')}
Expand Down

0 comments on commit e9acec2

Please sign in to comment.