Commit 8df754fed3593c3eee098edef95aef05921ae20f
1 parent
46098f3e
Fix deletion on expunge for the hashed layout.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5477 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
2 additions
and
7 deletions
lib/storage/ondiskhashedstoragemanager.inc.php
| ... | ... | @@ -260,17 +260,12 @@ class KTOnDiskHashedStorageManager extends KTStorageManager { |
| 260 | 260 | $oConfig =& KTConfig::getSingleton(); |
| 261 | 261 | $sCurrentPath = $this->getPath($oDocument); |
| 262 | 262 | |
| 263 | - // check if the deleted folder exists and create it if not | |
| 264 | - $sDeletedPrefix = sprintf("%s/Deleted", $oConfig->get('urls/documentRoot')); | |
| 265 | 263 | $sDocumentRoot = $oConfig->get('urls/documentRoot'); |
| 266 | 264 | |
| 267 | 265 | $aVersions = KTDocumentContentVersion::getByDocument($oDocument); |
| 268 | 266 | foreach ($aVersions as $oVersion) { |
| 269 | - $sPath = sprintf("Deleted/%s-%s", $oVersion->getId(), $oVersion->getFileName()); | |
| 270 | - $sFullPath = sprintf("%s/%s", $sDocumentRoot, $sPath); | |
| 271 | - if (file_exists($sFullPath)) { | |
| 272 | - unlink($sFullPath); | |
| 273 | - } | |
| 267 | + $sPath = sprintf('%s/%s', $sDocumentRoot, $oVersion->getStoragePath()); | |
| 268 | + @unlink($sPath); | |
| 274 | 269 | } |
| 275 | 270 | return true; |
| 276 | 271 | } | ... | ... |