mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
8c826a0c0d
|
@ -140,7 +140,8 @@
|
|||
user extension
|
||||
- whether the apache module xsendfile is used, can be configured
|
||||
- add hooks for filtering tasks shown in the menu bar
|
||||
- allow to set more parameters when upload a document via restapi
|
||||
- allow to set more parameters when upload a document or creating a new folder
|
||||
via restapi
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.9
|
||||
|
|
|
@ -388,6 +388,17 @@ function createFolder($request, $response, $args) { /* {{{ */
|
|||
$params = $request->getParsedBody();
|
||||
if(!empty($params['name'])) {
|
||||
$comment = isset($params['comment']) ? $params['comment'] : '';
|
||||
if(isset($params['sequence'])) {
|
||||
$sequence = str_replace(',', '.', $params["sequence"]);
|
||||
if (!is_numeric($sequence))
|
||||
return $response->withJson(array('success'=>false, 'message'=>getMLText("invalid_sequence"), 'data'=>''), 400);
|
||||
} else {
|
||||
$dd = $parent->getSubFolders('s');
|
||||
if(count($dd) > 1)
|
||||
$sequence = $dd[count($dd)-1]->getSequence() + 1;
|
||||
else
|
||||
$sequence = 1.0;
|
||||
}
|
||||
$newattrs = array();
|
||||
if(!empty($params['attributes'])) {
|
||||
foreach($params['attributes'] as $attrname=>$attrvalue) {
|
||||
|
@ -397,7 +408,7 @@ function createFolder($request, $response, $args) { /* {{{ */
|
|||
}
|
||||
}
|
||||
}
|
||||
if($folder = $parent->addSubFolder($params['name'], $comment, $userobj, 0, $newattrs)) {
|
||||
if($folder = $parent->addSubFolder($params['name'], $comment, $userobj, $sequence, $newattrs)) {
|
||||
|
||||
$rec = __getFolderData($folder);
|
||||
return $response->withJson(array('success'=>true, 'message'=>'', 'data'=>$rec), 201);
|
||||
|
|
|
@ -37,9 +37,10 @@ class SeedDMS_View_ErrorDlg extends SeedDMS_Bootstrap_Style {
|
|||
$pagetitle = $this->params['pagetitle'];
|
||||
$errormsg = $this->params['errormsg'];
|
||||
$plain = $this->params['plain'];
|
||||
$settings = $this->params['settings'];
|
||||
|
||||
if(!$plain) {
|
||||
$this->htmlStartPage($pagetitle);
|
||||
if(!$plain) {
|
||||
$this->htmlStartPage($pagetitle, 'errorpage', $settings->_httpRoot."out");
|
||||
$this->globalNavigation();
|
||||
$this->contentStart();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user