Commit 37030f8ee8ff9e032e324296c7a5459dab1a3691
1 parent
fb153cec
- add should work right even with _no_ metadata
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@4793 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
3 additions
and
2 deletions
lib/documentmanagement/documentutil.inc.php
| ... | ... | @@ -119,8 +119,10 @@ class KTDocumentUtil { |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | function &_add($oFolder, $sFilename, $oUser, $aOptions) { |
| 122 | + global $default; | |
| 123 | + | |
| 122 | 124 | $oContents = KTUtil::arrayGet($aOptions, 'contents'); |
| 123 | - $aMetadata = KTUtil::arrayGet($aOptions, 'metadata'); | |
| 125 | + $aMetadata = KTUtil::arrayGet($aOptions, 'metadata', null, false); | |
| 124 | 126 | $oDocumentType = KTUtil::arrayGet($aOptions, 'documenttype'); |
| 125 | 127 | $sDescription = KTUtil::arrayGet($aOptions, 'description', $sFilename); |
| 126 | 128 | |
| ... | ... | @@ -146,7 +148,6 @@ class KTDocumentUtil { |
| 146 | 148 | |
| 147 | 149 | if (is_null($oContents)) { |
| 148 | 150 | $res = KTDocumentUtil::setIncomplete($oDocument, "contents"); |
| 149 | - var_dump($res); | |
| 150 | 151 | if (PEAR::isError($res)) { |
| 151 | 152 | $oDocument->delete(); |
| 152 | 153 | return $res; | ... | ... |