mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 13:42:04 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
b88e05fe22
|
@ -793,13 +793,21 @@ switch($command) {
|
||||||
$workflow = $user->getMandatoryWorkflow();
|
$workflow = $user->getMandatoryWorkflow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$expires = false;
|
$expires = false;
|
||||||
if($settings->_presetExpirationDate) {
|
if($settings->_presetExpirationDate) {
|
||||||
$expires = strtotime($settings->_presetExpirationDate);
|
$expires = strtotime($settings->_presetExpirationDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$keywords = isset($_POST["keywords"]) ? trim($_POST["keywords"]) : '';
|
||||||
|
|
||||||
|
$categories = isset($_POST["categories"]) ? $_POST["categories"] : null;
|
||||||
$cats = array();
|
$cats = array();
|
||||||
|
if($categories) {
|
||||||
|
foreach($categories as $catid) {
|
||||||
|
if($cat = $dms->getDocumentCategory($catid))
|
||||||
|
$cats[] = $cat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$controller = Controller::factory('AddDocument', array('dms'=>$dms, 'user'=>$user));
|
$controller = Controller::factory('AddDocument', array('dms'=>$dms, 'user'=>$user));
|
||||||
$controller->setParam('documentsource', 'upload');
|
$controller->setParam('documentsource', 'upload');
|
||||||
|
@ -808,7 +816,7 @@ switch($command) {
|
||||||
$controller->setParam('name', $name);
|
$controller->setParam('name', $name);
|
||||||
$controller->setParam('comment', $comment);
|
$controller->setParam('comment', $comment);
|
||||||
$controller->setParam('expires', $expires);
|
$controller->setParam('expires', $expires);
|
||||||
$controller->setParam('keywords', '');
|
$controller->setParam('keywords', $keywords);
|
||||||
$controller->setParam('categories', $cats);
|
$controller->setParam('categories', $cats);
|
||||||
$controller->setParam('owner', $user);
|
$controller->setParam('owner', $user);
|
||||||
$controller->setParam('userfiletmp', $userfiletmp);
|
$controller->setParam('userfiletmp', $userfiletmp);
|
||||||
|
|
|
@ -822,9 +822,13 @@ function onAddClipboard(ev) { /* {{{ */
|
||||||
if (typeof obj.data('comment') !== 'undefined') {
|
if (typeof obj.data('comment') !== 'undefined') {
|
||||||
fd.append('comment', obj.data('comment'));
|
fd.append('comment', obj.data('comment'));
|
||||||
}
|
}
|
||||||
|
if (typeof obj.data('keywords') !== 'undefined') {
|
||||||
|
fd.append('keywords', obj.data('keywords'));
|
||||||
|
}
|
||||||
fd.append('userfile', files[i]);
|
fd.append('userfile', files[i]);
|
||||||
fd.append('command', 'uploaddocument');
|
fd.append('command', 'uploaddocument');
|
||||||
this.getFormData(fd, obj.data('attributes'), 'attributes');
|
this.getFormData(fd, obj.data('attributes'), 'attributes');
|
||||||
|
this.getFormData(fd, obj.data('categories'), 'categories');
|
||||||
// fd.append('path', files[i].webkitRelativePath);
|
// fd.append('path', files[i].webkitRelativePath);
|
||||||
|
|
||||||
statusbar.parent().show();
|
statusbar.parent().show();
|
||||||
|
|
|
@ -853,9 +853,13 @@ function onAddClipboard(ev) { /* {{{ */
|
||||||
if (typeof obj.data('comment') !== 'undefined') {
|
if (typeof obj.data('comment') !== 'undefined') {
|
||||||
fd.append('comment', obj.data('comment'));
|
fd.append('comment', obj.data('comment'));
|
||||||
}
|
}
|
||||||
|
if (typeof obj.data('keywords') !== 'undefined') {
|
||||||
|
fd.append('keywords', obj.data('keywords'));
|
||||||
|
}
|
||||||
fd.append('userfile', files[i]);
|
fd.append('userfile', files[i]);
|
||||||
fd.append('command', 'uploaddocument');
|
fd.append('command', 'uploaddocument');
|
||||||
this.getFormData(fd, obj.data('attributes'), 'attributes');
|
this.getFormData(fd, obj.data('attributes'), 'attributes');
|
||||||
|
this.getFormData(fd, obj.data('categories'), 'categories');
|
||||||
// fd.append('path', files[i].webkitRelativePath);
|
// fd.append('path', files[i].webkitRelativePath);
|
||||||
|
|
||||||
statusbar.parent().show();
|
statusbar.parent().show();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user