mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
3b74689c9c
|
@ -252,6 +252,9 @@
|
|||
- clear login failures when login by webdav succeeds
|
||||
- output log of restapi in LogManagement
|
||||
- new hook to add more tabs for sections in LogManagement
|
||||
- rest api returns version attributes as 'version_attributes' (was
|
||||
'version-attributes'), each attribute also contains the name
|
||||
- new hook in rest api to add more routes in extensions
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
Changes in version 5.1.27
|
||||
|
|
|
@ -87,6 +87,12 @@ set nobackup
|
|||
set nowritebackup
|
||||
set noswapfile
|
||||
|
||||
If you want to restrict the settings to the directory where the dms
|
||||
is mounted by webdav, e.g. /media/webdav, you can set an auto command
|
||||
in .vimrc
|
||||
|
||||
autocmd BufNewFile,BufRead /media/webdav/* set nobackup nowritebackup noswapfile
|
||||
|
||||
Creating the backup file in a directory outside of WebDAV doesn't help in
|
||||
this case, because it still does the file renaming which is turned off by
|
||||
'nowritebackup'.
|
||||
|
|
|
@ -56,14 +56,14 @@ class RestapiController { /* {{{ */
|
|||
foreach($attributes as $attrdefid=>$attribute) {
|
||||
$attrdef = $attribute->getAttributeDefinition();
|
||||
$attrvalues[] = array(
|
||||
'id'=>$attrdef->getId(),
|
||||
'id'=>(int) $attrdef->getId(),
|
||||
'name'=>$attrdef->getName(),
|
||||
'value'=>$attribute->getValue()
|
||||
);
|
||||
}
|
||||
}
|
||||
return $attrvalues;
|
||||
}
|
||||
} /* }}} */
|
||||
|
||||
protected function __getDocumentData($document) { /* {{{ */
|
||||
$data = array(
|
||||
|
@ -110,7 +110,7 @@ class RestapiController { /* {{{ */
|
|||
}
|
||||
$attributes = $this->__getAttributesData($lc);
|
||||
if($attributes) {
|
||||
$data['version-attributes'] = $attributes;
|
||||
$data['version_attributes'] = $attributes;
|
||||
}
|
||||
return $data;
|
||||
} /* }}} */
|
||||
|
@ -2611,9 +2611,6 @@ class TestController { /* {{{ */
|
|||
} /* }}} */
|
||||
} /* }}} */
|
||||
|
||||
//$app = new Slim(array('mode'=>'development', '_session.handler'=>null));
|
||||
$app = new \Slim\App();
|
||||
|
||||
/* Middleware for authentication */
|
||||
class Auth { /* {{{ */
|
||||
|
||||
|
@ -2706,6 +2703,8 @@ class Auth { /* {{{ */
|
|||
}
|
||||
} /* }}} */
|
||||
|
||||
$app = new \Slim\App();
|
||||
|
||||
$container = $app->getContainer();
|
||||
$container['dms'] = $dms;
|
||||
$container['config'] = $settings;
|
||||
|
@ -2798,6 +2797,14 @@ $app->get('/attributedefinitions', \RestapiController::class.':getAttributeDefin
|
|||
$app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName');
|
||||
$app->get('/echo/{data}', \TestController::class.':echoData');
|
||||
$app->get('/statstotal', \RestapiController::class.':getStatsTotal');
|
||||
|
||||
if(isset($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'])) {
|
||||
foreach($GLOBALS['SEEDDMS_HOOKS']['initRestAPI'] as $hookObj) {
|
||||
if (method_exists($hookObj, 'addRoute')) {
|
||||
$hookObj->addRoute($app);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$app->run();
|
||||
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue
Block a user