Commit 13c980793c2aaa41955574226039a74381b877de
1 parent
7a2b0bb4
Allow for the download of previous document content versions.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4450 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
6 additions
and
1 deletions
plugins/ktcore/KTDocumentActions.php
| @@ -25,7 +25,12 @@ class KTDocumentViewAction extends KTDocumentAction { | @@ -25,7 +25,12 @@ class KTDocumentViewAction extends KTDocumentAction { | ||
| 25 | $oStorage =& KTStorageManagerUtil::getSingleton(); | 25 | $oStorage =& KTStorageManagerUtil::getSingleton(); |
| 26 | $oDocumentTransaction = & new DocumentTransaction($this->oDocument, "Document downloaded", 'ktcore.transactions.download'); | 26 | $oDocumentTransaction = & new DocumentTransaction($this->oDocument, "Document downloaded", 'ktcore.transactions.download'); |
| 27 | $oDocumentTransaction->create(); | 27 | $oDocumentTransaction->create(); |
| 28 | - $oStorage->download($this->oDocument); | 28 | + $sVersion = KTUtil::arrayGet($_REQUEST, 'version'); |
| 29 | + if ($sVersion) { | ||
| 30 | + $oStorage->downloadVersion($this->oDocument, $sVersion); | ||
| 31 | + } else { | ||
| 32 | + $oStorage->download($this->oDocument); | ||
| 33 | + } | ||
| 29 | exit(0); | 34 | exit(0); |
| 30 | } | 35 | } |
| 31 | } | 36 | } |