diff --git a/lib/templating/kt3template.inc.php b/lib/templating/kt3template.inc.php index 702a988..b8f0793 100644 --- a/lib/templating/kt3template.inc.php +++ b/lib/templating/kt3template.inc.php @@ -65,6 +65,7 @@ class KTPage { /** context-relevant information */ var $errStack = Array(); + var $booleanLink = false; var $infoStack = Array(); var $portlets = Array(); var $show_portlets = true; diff --git a/templates/kt3/standard_page.smarty b/templates/kt3/standard_page.smarty index f533c7d..c2e7b0c 100644 --- a/templates/kt3/standard_page.smarty +++ b/templates/kt3/standard_page.smarty @@ -332,7 +332,13 @@
{foreach item=sError from=$page->errStack} + + {if ($page->booleanLink == '0')}

{$sError|sanitize}

+ {else} +

{$sError}

+ {/if} + {/foreach}
diff --git a/view.php b/view.php index 8713108..920f897 100755 --- a/view.php +++ b/view.php @@ -115,6 +115,9 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { $oDocument =& Document::get($document_id); if (PEAR::isError($oDocument)) { $this->oPage->addError(sprintf(_kt("The document you attempted to retrieve is invalid. Please browse for one."), KTBrowseUtil::getBrowseBaseUrl())); + + $this->oPage->booleanLink = true; + return $this->do_error(); } $document_id = $oDocument->getId();