From e7f0bcaeb9c824f30ddcb27cb0fa42a004e1afda Mon Sep 17 00:00:00 2001 From: kevin_fourie Date: Tue, 13 May 2008 07:58:29 +0000 Subject: [PATCH] Reverted... --- lib/documentmanagement/documentcontentversion.inc.php | 6 ------ lib/documentmanagement/documentutil.inc.php | 10 +--------- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/documentmanagement/documentcontentversion.inc.php b/lib/documentmanagement/documentcontentversion.inc.php index 9633905..dbf0f9a 100644 --- a/lib/documentmanagement/documentcontentversion.inc.php +++ b/lib/documentmanagement/documentcontentversion.inc.php @@ -61,8 +61,6 @@ class KTDocumentContentVersion extends KTEntity { /** Where in the storage this file can be found */ var $sStoragePath; - var $md5hash; - var $_aFieldToSelect = array( "iId" => "id", @@ -74,7 +72,6 @@ class KTDocumentContentVersion extends KTEntity { "iMajorVersion" => 'major_version', "iMinorVersion" => 'minor_version', "sStoragePath" => 'storage_path', - 'md5hash' => 'md5hash' ); function KTDocumentContentVersion() { @@ -82,7 +79,6 @@ class KTDocumentContentVersion extends KTEntity { function getFileName() { return $this->sFileName; } function setFileName($sNewValue) { $this->sFileName = $sNewValue; } - function getDocumentId() { return $this->iDocumentId; } function getFileSize() { return $this->iSize; } function setFileSize($iNewValue) { $this->iSize = $iNewValue; } function getSize() { return $this->iSize; } @@ -95,8 +91,6 @@ class KTDocumentContentVersion extends KTEntity { function setMinorVersionNumber($iNewValue) { $this->iMinorVersion = $iNewValue; } function getStoragePath() { return $this->sStoragePath; } function setStoragePath($sNewValue) { $this->sStoragePath = $sNewValue; } - function getStorageHash() { return $this->md5hash; } - function setStorageHash($sNewValue) { $this->md5hash = $sNewValue; } function getVersion() { return sprintf("%s.%s", $this->getMajorVersionNumber(), $this->getMinorVersionNumber()); diff --git a/lib/documentmanagement/documentutil.inc.php b/lib/documentmanagement/documentutil.inc.php index 3741357..a4033e8 100644 --- a/lib/documentmanagement/documentutil.inc.php +++ b/lib/documentmanagement/documentutil.inc.php @@ -71,16 +71,8 @@ class KTDocumentUtil { } KTDocumentUtil::copyMetadata($oDocument, $iPreviousMetadataVersion); - - $md5hash = md5_file($sFilename); - $content = $oDocument->_oDocumentContentVersion; - $content->setStorageHash($md5hash); - $content->update(); - if (empty($aOptions)) $aOptions = array(); - $aOptions['md5hash'] = $md5hash; - - if (!$oStorage->upload($oDocument, $sFilename, $aOptions)) { + if ( !$oStorage->upload( $oDocument, $sFilename)) { return PEAR::raiseError(_kt('An error occurred while storing the new file')); } -- libgit2 0.21.4