Commit f057f80e12ba84397b9654167bb26ec5a4f0acda
1 parent
5c815434
Get document id back from the oDocument object
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5518 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
2 deletions
view.php
| ... | ... | @@ -93,14 +93,15 @@ class ViewDocumentDispatcher extends KTStandardDispatcher { |
| 93 | 93 | $this->oPage->addError('No document was requested. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.'); |
| 94 | 94 | return $this->do_error(); |
| 95 | 95 | } |
| 96 | - $document_data["document_id"] = $document_id; | |
| 97 | - | |
| 98 | 96 | // try get the document. |
| 99 | 97 | $oDocument =& Document::get($document_id); |
| 100 | 98 | if (PEAR::isError($oDocument)) { |
| 101 | 99 | $this->oPage->addError('The document you attempted to retrieve is invalid. Please <a href="' . KTBrowseUtil::getBrowseBaseUrl() . '">browse</a> for one.'); |
| 102 | 100 | return $this->do_error(); |
| 103 | 101 | } |
| 102 | + $document_id = $oDocument->getId(); | |
| 103 | + $document_data["document_id"] = $oDocument->getId(); | |
| 104 | + | |
| 104 | 105 | |
| 105 | 106 | if (!KTBrowseUtil::inAdminMode($this->oUser, $oDocument->getFolderId())) { |
| 106 | 107 | if ($oDocument->getStatusID() == ARCHIVED) { | ... | ... |