mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 21:16:07 +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
|
- clear login failures when login by webdav succeeds
|
||||||
- output log of restapi in LogManagement
|
- output log of restapi in LogManagement
|
||||||
- new hook to add more tabs for sections 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
|
Changes in version 5.1.27
|
||||||
|
|
|
@ -87,6 +87,12 @@ set nobackup
|
||||||
set nowritebackup
|
set nowritebackup
|
||||||
set noswapfile
|
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
|
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
|
this case, because it still does the file renaming which is turned off by
|
||||||
'nowritebackup'.
|
'nowritebackup'.
|
||||||
|
|
|
@ -56,14 +56,14 @@ class RestapiController { /* {{{ */
|
||||||
foreach($attributes as $attrdefid=>$attribute) {
|
foreach($attributes as $attrdefid=>$attribute) {
|
||||||
$attrdef = $attribute->getAttributeDefinition();
|
$attrdef = $attribute->getAttributeDefinition();
|
||||||
$attrvalues[] = array(
|
$attrvalues[] = array(
|
||||||
'id'=>$attrdef->getId(),
|
'id'=>(int) $attrdef->getId(),
|
||||||
'name'=>$attrdef->getName(),
|
'name'=>$attrdef->getName(),
|
||||||
'value'=>$attribute->getValue()
|
'value'=>$attribute->getValue()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $attrvalues;
|
return $attrvalues;
|
||||||
}
|
} /* }}} */
|
||||||
|
|
||||||
protected function __getDocumentData($document) { /* {{{ */
|
protected function __getDocumentData($document) { /* {{{ */
|
||||||
$data = array(
|
$data = array(
|
||||||
|
@ -110,7 +110,7 @@ class RestapiController { /* {{{ */
|
||||||
}
|
}
|
||||||
$attributes = $this->__getAttributesData($lc);
|
$attributes = $this->__getAttributesData($lc);
|
||||||
if($attributes) {
|
if($attributes) {
|
||||||
$data['version-attributes'] = $attributes;
|
$data['version_attributes'] = $attributes;
|
||||||
}
|
}
|
||||||
return $data;
|
return $data;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
@ -2611,9 +2611,6 @@ class TestController { /* {{{ */
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
//$app = new Slim(array('mode'=>'development', '_session.handler'=>null));
|
|
||||||
$app = new \Slim\App();
|
|
||||||
|
|
||||||
/* Middleware for authentication */
|
/* Middleware for authentication */
|
||||||
class Auth { /* {{{ */
|
class Auth { /* {{{ */
|
||||||
|
|
||||||
|
@ -2706,6 +2703,8 @@ class Auth { /* {{{ */
|
||||||
}
|
}
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
$app = new \Slim\App();
|
||||||
|
|
||||||
$container = $app->getContainer();
|
$container = $app->getContainer();
|
||||||
$container['dms'] = $dms;
|
$container['dms'] = $dms;
|
||||||
$container['config'] = $settings;
|
$container['config'] = $settings;
|
||||||
|
@ -2798,6 +2797,14 @@ $app->get('/attributedefinitions', \RestapiController::class.':getAttributeDefin
|
||||||
$app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName');
|
$app->put('/attributedefinitions/{id}/name', \RestapiController::class.':changeAttributeDefinitionName');
|
||||||
$app->get('/echo/{data}', \TestController::class.':echoData');
|
$app->get('/echo/{data}', \TestController::class.':echoData');
|
||||||
$app->get('/statstotal', \RestapiController::class.':getStatsTotal');
|
$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();
|
$app->run();
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user