Commit 9fd6ea861b95475bd5d6b77e5a3781cb107bac65
1 parent
0c40ec69
KTC-259
"HREF Error when attempting to access a document via a URL that specifies a non-existent document-id" Fixed. Added a boolean variable to the page object which checks for a link. Committed By: Yusuf Davids Reviewed By: Jonathan Byrne git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7843 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
3 changed files
with
10 additions
and
0 deletions
lib/templating/kt3template.inc.php
templates/kt3/standard_page.smarty
| ... | ... | @@ -332,7 +332,13 @@ |
| 332 | 332 | <div class="error_dashlet_rightrepeat_bottom"></div> |
| 333 | 333 | <div class="error_dashlet_leftrepeat_bottom"></div> |
| 334 | 334 | {foreach item=sError from=$page->errStack} |
| 335 | + | |
| 336 | + {if ($page->booleanLink == '0')} | |
| 335 | 337 | <p>{$sError|sanitize}</p> |
| 338 | + {else} | |
| 339 | + <p>{$sError}</p> | |
| 340 | + {/if} | |
| 341 | + | |
| 336 | 342 | {/foreach} |
| 337 | 343 | <div class="error_dashlet_topleft_small"></div> |
| 338 | 344 | <div class="error_dashlet_toprepeat_small"></div> | ... | ... |
view.php
| ... | ... | @@ -115,6 +115,9 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { |
| 115 | 115 | $oDocument =& Document::get($document_id); |
| 116 | 116 | if (PEAR::isError($oDocument)) { |
| 117 | 117 | $this->oPage->addError(sprintf(_kt("The document you attempted to retrieve is invalid. Please <a href=\"%s\">browse</a> for one."), KTBrowseUtil::getBrowseBaseUrl())); |
| 118 | + | |
| 119 | + $this->oPage->booleanLink = true; | |
| 120 | + | |
| 118 | 121 | return $this->do_error(); |
| 119 | 122 | } |
| 120 | 123 | $document_id = $oDocument->getId(); | ... | ... |